generated-configure.sh revision 2722:e13a7182a131
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701FIXPATH_DETACH_FLAG
702FIXPATH
703BUILD_GTEST
704ENABLE_AOT
705GCOV_ENABLED
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714LDFLAGS_TESTEXE
715LDFLAGS_TESTLIB
716CXXFLAGS_TESTEXE
717CXXFLAGS_TESTLIB
718CFLAGS_TESTEXE
719CFLAGS_TESTLIB
720OPENJDK_BUILD_JVM_LIBS
721OPENJDK_BUILD_JVM_ASFLAGS
722OPENJDK_BUILD_JVM_LDFLAGS
723OPENJDK_BUILD_JVM_CFLAGS
724OPENJDK_BUILD_LDFLAGS_HASH_STYLE
725OPENJDK_BUILD_LDFLAGS_CXX_JDK
726OPENJDK_BUILD_JDKEXE_LIBS
727OPENJDK_BUILD_JDKLIB_LIBS
728OPENJDK_BUILD_LDFLAGS_JDKEXE
729OPENJDK_BUILD_LDFLAGS_JDKLIB
730OPENJDK_BUILD_CXXFLAGS_JDKEXE
731OPENJDK_BUILD_CXXFLAGS_JDKLIB
732OPENJDK_BUILD_CFLAGS_JDKEXE
733OPENJDK_BUILD_CFLAGS_JDKLIB
734OPENJDK_BUILD_CXXSTD_CXXFLAG
735JVM_LIBS
736JVM_ASFLAGS
737JVM_LDFLAGS
738JVM_CFLAGS
739LDFLAGS_HASH_STYLE
740LDFLAGS_CXX_JDK
741JDKEXE_LIBS
742JDKLIB_LIBS
743LDFLAGS_JDKEXE
744LDFLAGS_JDKLIB
745CXXFLAGS_JDKEXE
746CXXFLAGS_JDKLIB
747CFLAGS_JDKEXE
748CFLAGS_JDKLIB
749MACOSX_VERSION_MIN
750CXXSTD_CXXFLAG
751JDK_ARCH_ABI_PROP_NAME
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JIB_JAR
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795BUILD_AS
796BUILD_LDCXX
797BUILD_LD
798BUILD_STRIP
799BUILD_OBJCOPY
800BUILD_AR
801BUILD_NM
802BUILD_CXX
803BUILD_CC
804BUILD_SYSROOT_LDFLAGS
805BUILD_SYSROOT_CFLAGS
806ac_ct_OBJDUMP
807OBJDUMP
808ac_ct_OBJCOPY
809OBJCOPY
810ac_ct_NM
811ac_ct_STRIP
812GNM
813NM
814STRIP
815MSBUILD
816DUMPBIN
817RC
818MT
819LIPO
820ac_ct_AR
821AR
822AS
823LDCXX
824LD
825CXXCPP
826CPP
827CXX_VERSION_NUMBER
828CC_VERSION_NUMBER
829ac_ct_CXX
830CXXFLAGS
831CXX
832TOOLCHAIN_PATH_CXX
833POTENTIAL_CXX
834OBJEXT
835EXEEXT
836ac_ct_CC
837CPPFLAGS
838LDFLAGS
839CFLAGS
840CC
841TOOLCHAIN_PATH_CC
842POTENTIAL_CC
843TOOLCHAIN_VERSION
844VS_LIB
845VS_INCLUDE
846VS_PATH
847CYGWIN_LINK
848SYSROOT_LDFLAGS
849SYSROOT_CFLAGS
850EXTRA_LDFLAGS
851EXTRA_CXXFLAGS
852EXTRA_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_MAN
865IMPORT_MODULES_LEGAL
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883JAVAC_FLAGS
884BOOT_JDK_MODULAR
885BOOT_JDK_SOURCETARGET
886JARSIGNER
887JAR
888JAVAH
889JAVAC
890JAVA
891BOOT_JDK
892JAVA_CHECK
893JAVAC_CHECK
894VERSION_IS_GA
895VERSION_SHORT
896VERSION_STRING
897VERSION_NUMBER_FOUR_POSITIONS
898VERSION_NUMBER
899VERSION_OPT
900VERSION_BUILD
901VERSION_PRE
902VERSION_PATCH
903VERSION_SECURITY
904VERSION_MINOR
905VERSION_MAJOR
906MACOSX_BUNDLE_ID_BASE
907MACOSX_BUNDLE_NAME_BASE
908HOTSPOT_VM_DISTRO
909COMPANY_NAME
910JDK_RC_PLATFORM_NAME
911PRODUCT_SUFFIX
912PRODUCT_NAME
913LAUNCHER_NAME
914JLINK_KEEP_PACKAGED_MODULES
915COPYRIGHT_YEAR
916COMPRESS_JARS
917INCLUDE_SA
918UNLIMITED_CRYPTO
919CACERTS_FILE
920ENABLE_HEADLESS_ONLY
921DEFAULT_MAKE_TARGET
922OS_VERSION_MICRO
923OS_VERSION_MINOR
924OS_VERSION_MAJOR
925PKG_CONFIG
926BASH_ARGS
927SETFILE
928CODESIGN
929XATTR
930DSYMUTIL
931IS_GNU_TIME
932PATCH
933DTRACE
934FLOCK
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
962JVM_VARIANT_MAIN
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968USERNAME
969CANONICAL_TOPDIR
970ORIGINAL_TOPDIR
971TOPDIR
972PATH_SEP
973HOTSPOT_BUILD_CPU_DEFINE
974HOTSPOT_BUILD_CPU_ARCH
975HOTSPOT_BUILD_CPU
976HOTSPOT_BUILD_OS_TYPE
977HOTSPOT_BUILD_OS
978OPENJDK_BUILD_BUNDLE_PLATFORM
979OPENJDK_BUILD_OS_EXPORT_DIR
980OPENJDK_BUILD_CPU_OSARCH
981OPENJDK_BUILD_CPU_ISADIR
982OPENJDK_BUILD_CPU_LEGACY_LIB
983OPENJDK_BUILD_CPU_LEGACY
984HOTSPOT_TARGET_CPU_DEFINE
985HOTSPOT_TARGET_CPU_ARCH
986HOTSPOT_TARGET_CPU
987HOTSPOT_TARGET_OS_TYPE
988HOTSPOT_TARGET_OS
989DEFINE_CROSS_COMPILE_ARCH
990OPENJDK_TARGET_BUNDLE_PLATFORM
991OPENJDK_TARGET_OS_EXPORT_DIR
992OPENJDK_TARGET_CPU_OSARCH
993OPENJDK_TARGET_CPU_ISADIR
994OPENJDK_TARGET_CPU_LEGACY_LIB
995OPENJDK_TARGET_CPU_LEGACY
996REQUIRED_OS_VERSION
997REQUIRED_OS_ARCH
998REQUIRED_OS_NAME
999COMPILE_TYPE
1000OPENJDK_TARGET_CPU_ENDIAN
1001OPENJDK_TARGET_CPU_BITS
1002OPENJDK_TARGET_CPU_ARCH
1003OPENJDK_TARGET_CPU
1004OPENJDK_TARGET_OS_ENV
1005OPENJDK_TARGET_OS_TYPE
1006OPENJDK_TARGET_OS
1007OPENJDK_BUILD_CPU_ENDIAN
1008OPENJDK_BUILD_CPU_BITS
1009OPENJDK_BUILD_CPU_ARCH
1010OPENJDK_BUILD_CPU
1011OPENJDK_BUILD_OS_ENV
1012OPENJDK_BUILD_OS_TYPE
1013OPENJDK_BUILD_OS
1014OPENJDK_BUILD_AUTOCONF_NAME
1015OPENJDK_TARGET_AUTOCONF_NAME
1016target_os
1017target_vendor
1018target_cpu
1019target
1020host_os
1021host_vendor
1022host_cpu
1023host
1024build_os
1025build_vendor
1026build_cpu
1027build
1028PANDOC
1029NICE
1030CPIO
1031DF
1032READLINK
1033CYGPATH
1034SED
1035FGREP
1036EGREP
1037GREP
1038AWK
1039XARGS
1040WHICH
1041WC
1042UNIQ
1043UNAME
1044TR
1045TOUCH
1046TEE
1047TAR
1048TAIL
1049SORT
1050SH
1051RMDIR
1052RM
1053PRINTF
1054NAWK
1055MV
1056MKTEMP
1057MKDIR
1058LS
1059LN
1060GZIP
1061GUNZIP
1062HEAD
1063FIND
1064FILE
1065EXPR
1066ECHO
1067DIRNAME
1068DIFF
1069DATE
1070CUT
1071CP
1072COMM
1073CMP
1074CHMOD
1075CAT
1076BASH
1077BASENAME
1078DATE_WHEN_CONFIGURED
1079ORIGINAL_PATH
1080CONFIGURE_COMMAND_LINE
1081target_alias
1082host_alias
1083build_alias
1084LIBS
1085ECHO_T
1086ECHO_N
1087ECHO_C
1088DEFS
1089mandir
1090localedir
1091libdir
1092psdir
1093pdfdir
1094dvidir
1095htmldir
1096infodir
1097docdir
1098oldincludedir
1099includedir
1100localstatedir
1101sharedstatedir
1102sysconfdir
1103datadir
1104datarootdir
1105libexecdir
1106sbindir
1107bindir
1108program_transform_name
1109prefix
1110exec_prefix
1111PACKAGE_URL
1112PACKAGE_BUGREPORT
1113PACKAGE_STRING
1114PACKAGE_VERSION
1115PACKAGE_TARNAME
1116PACKAGE_NAME
1117PATH_SEPARATOR
1118SHELL'
1119ac_subst_files=''
1120ac_user_opts='
1121enable_option_checking
1122with_target_bits
1123enable_openjdk_only
1124with_custom_make_dir
1125with_jdk_variant
1126enable_debug
1127with_debug_level
1128with_jvm_variants
1129with_cpu_port
1130with_devkit
1131with_sys_root
1132with_sysroot
1133with_tools_dir
1134with_toolchain_path
1135with_extra_path
1136with_sdk_name
1137with_conf_name
1138with_output_sync
1139with_default_make_target
1140enable_headless_only
1141with_cacerts_file
1142enable_unlimited_crypto
1143with_copyright_year
1144enable_keep_packaged_modules
1145with_milestone
1146with_update_version
1147with_user_release_suffix
1148with_build_number
1149with_version_string
1150with_version_pre
1151with_version_opt
1152with_version_build
1153with_version_major
1154with_version_minor
1155with_version_security
1156with_version_patch
1157with_boot_jdk
1158with_build_jdk
1159with_add_source_root
1160with_override_source_root
1161with_adds_and_overrides
1162with_override_langtools
1163with_override_corba
1164with_override_jaxp
1165with_override_jaxws
1166with_override_hotspot
1167with_override_nashorn
1168with_override_jdk
1169with_import_hotspot
1170with_import_modules
1171enable_static_build
1172with_toolchain_type
1173with_extra_cflags
1174with_extra_cxxflags
1175with_extra_ldflags
1176with_toolchain_version
1177with_build_devkit
1178with_jtreg
1179with_jib
1180with_abi_profile
1181enable_warnings_as_errors
1182with_native_debug_symbols
1183enable_debug_symbols
1184enable_zip_debug_info
1185enable_native_coverage
1186enable_dtrace
1187enable_aot
1188enable_hotspot_gtest
1189with_stdc__lib
1190with_msvcr_dll
1191with_msvcp_dll
1192with_x
1193with_cups
1194with_cups_include
1195with_freetype
1196with_freetype_include
1197with_freetype_lib
1198with_freetype_src
1199enable_freetype_bundling
1200with_alsa
1201with_alsa_include
1202with_alsa_lib
1203with_libffi
1204with_libffi_include
1205with_libffi_lib
1206enable_libffi_bundling
1207with_libjpeg
1208with_giflib
1209with_libpng
1210with_zlib
1211with_lcms
1212with_dxsdk
1213with_dxsdk_lib
1214with_dxsdk_include
1215with_jvm_features
1216with_jvm_interpreter
1217enable_jtreg_failure_handler
1218enable_generate_classlist
1219with_num_cores
1220with_memory_size
1221with_jobs
1222with_test_jobs
1223with_boot_jdk_jvmargs
1224with_sjavac_server_java
1225enable_sjavac
1226enable_javac_server
1227enable_icecc
1228enable_precompiled_headers
1229enable_ccache
1230with_ccache_dir
1231'
1232      ac_precious_vars='build_alias
1233host_alias
1234target_alias
1235BASENAME
1236BASH
1237CAT
1238CHMOD
1239CMP
1240COMM
1241CP
1242CUT
1243DATE
1244DIFF
1245DIRNAME
1246ECHO
1247EXPR
1248FILE
1249FIND
1250HEAD
1251GUNZIP
1252GZIP
1253LN
1254LS
1255MKDIR
1256MKTEMP
1257MV
1258NAWK
1259PRINTF
1260RM
1261RMDIR
1262SH
1263SORT
1264TAIL
1265TAR
1266TEE
1267TOUCH
1268TR
1269UNAME
1270UNIQ
1271WC
1272WHICH
1273XARGS
1274AWK
1275GREP
1276EGREP
1277FGREP
1278SED
1279CYGPATH
1280READLINK
1281DF
1282CPIO
1283NICE
1284PANDOC
1285MAKE
1286UNZIP
1287ZIPEXE
1288LDD
1289OTOOL
1290READELF
1291HG
1292STAT
1293TIME
1294FLOCK
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  --enable-aot[=yes/no/auto]
1989                          enable ahead of time compilation feature. Default is
1990                          auto, where aot is enabled if all dependencies are
1991                          present.
1992  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1993  --disable-freetype-bundling
1994                          disable bundling of the freetype library with the
1995                          build result [enabled on Windows or when using
1996                          --with-freetype, disabled otherwise]
1997  --enable-libffi-bundling
1998                          enable bundling of libffi.so to make the built JDK
1999                          runnable on more systems
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2035                          (arm64,aarch64) [aarch64]
2036  --with-devkit           use this devkit for compilers, tools and resources
2037  --with-sys-root         alias for --with-sysroot for backwards compatability
2038  --with-sysroot          use this directory as sysroot
2039  --with-tools-dir        alias for --with-toolchain-path for backwards
2040                          compatibility
2041  --with-toolchain-path   prepend these directories when searching for
2042                          toolchain binaries (compilers etc)
2043  --with-extra-path       prepend these directories to the default path
2044  --with-sdk-name         use the platform SDK of the given name. [macosx]
2045  --with-conf-name        use this as the name of the configuration [generated
2046                          from important configuration options]
2047  --with-output-sync      set make output sync type if supported by make.
2048                          [recurse]
2049  --with-default-make-target
2050                          set the default make target [exploded-image]
2051  --with-cacerts-file     specify alternative cacerts file
2052  --with-copyright-year   Set copyright year value for build [current year]
2053  --with-milestone        Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-update-version   Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-user-release-suffix
2058                          Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-build-number     Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-version-string   Set version string [calculated]
2063  --with-version-pre      Set the base part of the version 'PRE' field
2064                          (pre-release identifier) ['internal']
2065  --with-version-opt      Set version 'OPT' field (build metadata)
2066                          [<timestamp>.<user>.<dirname>]
2067  --with-version-build    Set version 'BUILD' field (build number) [not
2068                          specified]
2069  --with-version-major    Set version 'MAJOR' field (first number) [current
2070                          source value]
2071  --with-version-minor    Set version 'MINOR' field (second number) [current
2072                          source value]
2073  --with-version-security Set version 'SECURITY' field (third number) [current
2074                          source value]
2075  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2076                          specified]
2077  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2078  --with-build-jdk        path to JDK of same version as is being built[the
2079                          newly built JDK]
2080  --with-add-source-root  Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-source-root
2083                          Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-adds-and-overrides
2086                          Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-langtools
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-corba   Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxp    Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxws   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-hotspot Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-nashorn Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jdk     Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-import_hotspot   Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-modules   import a set of prebuilt modules either as a zip
2106                          file or an exploded directory
2107  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2108                          to show possible values [platform dependent]
2109  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2110  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2111  --with-extra-ldflags    extra flags to be used when linking jdk
2112  --with-toolchain-version
2113                          the version of the toolchain to look for, use
2114                          '--help' to show possible values [platform
2115                          dependent]
2116  --with-build-devkit     Devkit to use for the build platform toolchain
2117  --with-jtreg            Regression Test Harness [probed]
2118  --with-jib              Jib dependency management tool [not used]
2119  --with-abi-profile      specify ABI profile for ARM builds
2120                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2121                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2122                          [toolchain dependent]
2123  --with-native-debug-symbols
2124                          set the native debug symbol configuration (none,
2125                          internal, external, zipped) [varying]
2126  --with-stdc++lib=<static>,<dynamic>,<default>
2127                          force linking of the C++ runtime on Linux to either
2128                          static or dynamic, default is static with dynamic as
2129                          fallback
2130  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2131                          (Windows only) [probed]
2132  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2133                          (Windows only) [probed]
2134  --with-x                use the X Window System
2135  --with-cups             specify prefix directory for the cups package
2136                          (expecting the headers under PATH/include)
2137  --with-cups-include     specify directory for the cups include files
2138  --with-freetype         specify prefix directory for the freetype package
2139                          (expecting the libraries under PATH/lib and the
2140                          headers under PATH/include)
2141  --with-freetype-include specify directory for the freetype include files
2142  --with-freetype-lib     specify directory for the freetype library
2143  --with-freetype-src     specify directory with freetype sources to
2144                          automatically build the library (experimental,
2145                          Windows-only)
2146  --with-alsa             specify prefix directory for the alsa package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-alsa-include     specify directory for the alsa include files
2150  --with-alsa-lib         specify directory for the alsa library
2151  --with-libffi           specify prefix directory for the libffi package
2152                          (expecting the libraries under PATH/lib and the
2153                          headers under PATH/include)
2154  --with-libffi-include   specify directory for the libffi include files
2155  --with-libffi-lib       specify directory for the libffi library
2156  --with-libjpeg          use libjpeg from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-giflib           use giflib from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-libpng           use libpng from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-zlib             use zlib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-lcms             use lcms2 from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-dxsdk            Deprecated. Option is kept for backwards
2167                          compatibility and is ignored
2168  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-include    Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-jvm-features     additional JVM features to enable (separated by
2173                          comma), use '--help' to show possible values [none]
2174  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-num-cores        number of cores in the build system, e.g.
2177                          --with-num-cores=8 [probed]
2178  --with-memory-size      memory (in MB) available in the build system, e.g.
2179                          --with-memory-size=1024 [probed]
2180  --with-jobs             number of parallel jobs to let make run [calculated
2181                          based on cores and memory]
2182  --with-test-jobs        number of parallel tests jobs to run [based on build
2183                          jobs]
2184  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2185                          invocations of boot JDK, overriding the default
2186                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2187                          -enableassertions"
2188  --with-sjavac-server-java
2189                          use this java binary for running the sjavac
2190                          background server [Boot JDK java]
2191  --with-ccache-dir       where to store ccache files [~/.ccache]
2192
2193Some influential environment variables:
2194  BASENAME    Override default value for BASENAME
2195  BASH        Override default value for BASH
2196  CAT         Override default value for CAT
2197  CHMOD       Override default value for CHMOD
2198  CMP         Override default value for CMP
2199  COMM        Override default value for COMM
2200  CP          Override default value for CP
2201  CUT         Override default value for CUT
2202  DATE        Override default value for DATE
2203  DIFF        Override default value for DIFF
2204  DIRNAME     Override default value for DIRNAME
2205  ECHO        Override default value for ECHO
2206  EXPR        Override default value for EXPR
2207  FILE        Override default value for FILE
2208  FIND        Override default value for FIND
2209  HEAD        Override default value for HEAD
2210  GUNZIP      Override default value for GUNZIP
2211  GZIP        Override default value for GZIP
2212  LN          Override default value for LN
2213  LS          Override default value for LS
2214  MKDIR       Override default value for MKDIR
2215  MKTEMP      Override default value for MKTEMP
2216  MV          Override default value for MV
2217  NAWK        Override default value for NAWK
2218  PRINTF      Override default value for PRINTF
2219  RM          Override default value for RM
2220  RMDIR       Override default value for RMDIR
2221  SH          Override default value for SH
2222  SORT        Override default value for SORT
2223  TAIL        Override default value for TAIL
2224  TAR         Override default value for TAR
2225  TEE         Override default value for TEE
2226  TOUCH       Override default value for TOUCH
2227  TR          Override default value for TR
2228  UNAME       Override default value for UNAME
2229  UNIQ        Override default value for UNIQ
2230  WC          Override default value for WC
2231  WHICH       Override default value for WHICH
2232  XARGS       Override default value for XARGS
2233  AWK         Override default value for AWK
2234  GREP        Override default value for GREP
2235  EGREP       Override default value for EGREP
2236  FGREP       Override default value for FGREP
2237  SED         Override default value for SED
2238  CYGPATH     Override default value for CYGPATH
2239  READLINK    Override default value for READLINK
2240  DF          Override default value for DF
2241  CPIO        Override default value for CPIO
2242  NICE        Override default value for NICE
2243  PANDOC      Override default value for PANDOC
2244  MAKE        Override default value for MAKE
2245  UNZIP       Override default value for UNZIP
2246  ZIPEXE      Override default value for ZIPEXE
2247  LDD         Override default value for LDD
2248  OTOOL       Override default value for OTOOL
2249  READELF     Override default value for READELF
2250  HG          Override default value for HG
2251  STAT        Override default value for STAT
2252  TIME        Override default value for TIME
2253  FLOCK       Override default value for FLOCK
2254  DTRACE      Override default value for DTRACE
2255  PATCH       Override default value for PATCH
2256  DSYMUTIL    Override default value for DSYMUTIL
2257  XATTR       Override default value for XATTR
2258  CODESIGN    Override default value for CODESIGN
2259  SETFILE     Override default value for SETFILE
2260  PKG_CONFIG  path to pkg-config utility
2261  JAVA        Override default value for JAVA
2262  JAVAC       Override default value for JAVAC
2263  JAVAH       Override default value for JAVAH
2264  JAR         Override default value for JAR
2265  JARSIGNER   Override default value for JARSIGNER
2266  CC          C compiler command
2267  CFLAGS      C compiler flags
2268  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2269              nonstandard directory <lib dir>
2270  LIBS        libraries to pass to the linker, e.g. -l<library>
2271  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2272              you have headers in a nonstandard directory <include dir>
2273  CXX         C++ compiler command
2274  CXXFLAGS    C++ compiler flags
2275  CPP         C preprocessor
2276  CXXCPP      C++ preprocessor
2277  AS          Override default value for AS
2278  AR          Override default value for AR
2279  LIPO        Override default value for LIPO
2280  STRIP       Override default value for STRIP
2281  NM          Override default value for NM
2282  GNM         Override default value for GNM
2283  OBJCOPY     Override default value for OBJCOPY
2284  OBJDUMP     Override default value for OBJDUMP
2285  BUILD_CC    Override default value for BUILD_CC
2286  BUILD_CXX   Override default value for BUILD_CXX
2287  BUILD_NM    Override default value for BUILD_NM
2288  BUILD_AR    Override default value for BUILD_AR
2289  BUILD_OBJCOPY
2290              Override default value for BUILD_OBJCOPY
2291  BUILD_STRIP Override default value for BUILD_STRIP
2292  JTREGEXE    Override default value for JTREGEXE
2293  XMKMF       Path to xmkmf, Makefile generator for X Window System
2294  FREETYPE_CFLAGS
2295              C compiler flags for FREETYPE, overriding pkg-config
2296  FREETYPE_LIBS
2297              linker flags for FREETYPE, overriding pkg-config
2298  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2299  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2300  LIBFFI_CFLAGS
2301              C compiler flags for LIBFFI, overriding pkg-config
2302  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2303  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2304  PNG_LIBS    linker flags for PNG, overriding pkg-config
2305  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2306  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2307  ICECC_CMD   Override default value for ICECC_CMD
2308  ICECC_CREATE_ENV
2309              Override default value for ICECC_CREATE_ENV
2310  ICECC_WRAPPER
2311              Override default value for ICECC_WRAPPER
2312  CCACHE      Override default value for CCACHE
2313
2314Use these variables to override the choices made by `configure' or to help
2315it to find libraries and programs with nonstandard names/locations.
2316
2317Report bugs to <build-dev@openjdk.java.net>.
2318OpenJDK home page: <http://openjdk.java.net>.
2319_ACEOF
2320ac_status=$?
2321fi
2322
2323if test "$ac_init_help" = "recursive"; then
2324  # If there are subdirs, report their specific --help.
2325  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2326    test -d "$ac_dir" ||
2327      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2328      continue
2329    ac_builddir=.
2330
2331case "$ac_dir" in
2332.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2333*)
2334  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2335  # A ".." for each directory in $ac_dir_suffix.
2336  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2337  case $ac_top_builddir_sub in
2338  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2339  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2340  esac ;;
2341esac
2342ac_abs_top_builddir=$ac_pwd
2343ac_abs_builddir=$ac_pwd$ac_dir_suffix
2344# for backward compatibility:
2345ac_top_builddir=$ac_top_build_prefix
2346
2347case $srcdir in
2348  .)  # We are building in place.
2349    ac_srcdir=.
2350    ac_top_srcdir=$ac_top_builddir_sub
2351    ac_abs_top_srcdir=$ac_pwd ;;
2352  [\\/]* | ?:[\\/]* )  # Absolute name.
2353    ac_srcdir=$srcdir$ac_dir_suffix;
2354    ac_top_srcdir=$srcdir
2355    ac_abs_top_srcdir=$srcdir ;;
2356  *) # Relative name.
2357    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2358    ac_top_srcdir=$ac_top_build_prefix$srcdir
2359    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2360esac
2361ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2362
2363    cd "$ac_dir" || { ac_status=$?; continue; }
2364    # Check for guested configure.
2365    if test -f "$ac_srcdir/configure.gnu"; then
2366      echo &&
2367      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2368    elif test -f "$ac_srcdir/configure"; then
2369      echo &&
2370      $SHELL "$ac_srcdir/configure" --help=recursive
2371    else
2372      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2373    fi || ac_status=$?
2374    cd "$ac_pwd" || { ac_status=$?; break; }
2375  done
2376fi
2377
2378test -n "$ac_init_help" && exit $ac_status
2379if $ac_init_version; then
2380  cat <<\_ACEOF
2381OpenJDK configure jdk9
2382generated by GNU Autoconf 2.69
2383
2384Copyright (C) 2012 Free Software Foundation, Inc.
2385This configure script is free software; the Free Software Foundation
2386gives unlimited permission to copy, distribute and modify it.
2387_ACEOF
2388  exit
2389fi
2390
2391## ------------------------ ##
2392## Autoconf initialization. ##
2393## ------------------------ ##
2394
2395# ac_fn_c_try_compile LINENO
2396# --------------------------
2397# Try to compile conftest.$ac_ext, and return whether this succeeded.
2398ac_fn_c_try_compile ()
2399{
2400  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2401  rm -f conftest.$ac_objext
2402  if { { ac_try="$ac_compile"
2403case "(($ac_try" in
2404  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2405  *) ac_try_echo=$ac_try;;
2406esac
2407eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2408$as_echo "$ac_try_echo"; } >&5
2409  (eval "$ac_compile") 2>conftest.err
2410  ac_status=$?
2411  if test -s conftest.err; then
2412    grep -v '^ *+' conftest.err >conftest.er1
2413    cat conftest.er1 >&5
2414    mv -f conftest.er1 conftest.err
2415  fi
2416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2417  test $ac_status = 0; } && {
2418	 test -z "$ac_c_werror_flag" ||
2419	 test ! -s conftest.err
2420       } && test -s conftest.$ac_objext; then :
2421  ac_retval=0
2422else
2423  $as_echo "$as_me: failed program was:" >&5
2424sed 's/^/| /' conftest.$ac_ext >&5
2425
2426	ac_retval=1
2427fi
2428  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2429  as_fn_set_status $ac_retval
2430
2431} # ac_fn_c_try_compile
2432
2433# ac_fn_cxx_try_compile LINENO
2434# ----------------------------
2435# Try to compile conftest.$ac_ext, and return whether this succeeded.
2436ac_fn_cxx_try_compile ()
2437{
2438  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439  rm -f conftest.$ac_objext
2440  if { { ac_try="$ac_compile"
2441case "(($ac_try" in
2442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2443  *) ac_try_echo=$ac_try;;
2444esac
2445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2446$as_echo "$ac_try_echo"; } >&5
2447  (eval "$ac_compile") 2>conftest.err
2448  ac_status=$?
2449  if test -s conftest.err; then
2450    grep -v '^ *+' conftest.err >conftest.er1
2451    cat conftest.er1 >&5
2452    mv -f conftest.er1 conftest.err
2453  fi
2454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2455  test $ac_status = 0; } && {
2456	 test -z "$ac_cxx_werror_flag" ||
2457	 test ! -s conftest.err
2458       } && test -s conftest.$ac_objext; then :
2459  ac_retval=0
2460else
2461  $as_echo "$as_me: failed program was:" >&5
2462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464	ac_retval=1
2465fi
2466  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2467  as_fn_set_status $ac_retval
2468
2469} # ac_fn_cxx_try_compile
2470
2471# ac_fn_c_try_cpp LINENO
2472# ----------------------
2473# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2474ac_fn_c_try_cpp ()
2475{
2476  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477  if { { ac_try="$ac_cpp conftest.$ac_ext"
2478case "(($ac_try" in
2479  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2480  *) ac_try_echo=$ac_try;;
2481esac
2482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2483$as_echo "$ac_try_echo"; } >&5
2484  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2485  ac_status=$?
2486  if test -s conftest.err; then
2487    grep -v '^ *+' conftest.err >conftest.er1
2488    cat conftest.er1 >&5
2489    mv -f conftest.er1 conftest.err
2490  fi
2491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2492  test $ac_status = 0; } > conftest.i && {
2493	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2494	 test ! -s conftest.err
2495       }; then :
2496  ac_retval=0
2497else
2498  $as_echo "$as_me: failed program was:" >&5
2499sed 's/^/| /' conftest.$ac_ext >&5
2500
2501    ac_retval=1
2502fi
2503  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504  as_fn_set_status $ac_retval
2505
2506} # ac_fn_c_try_cpp
2507
2508# ac_fn_cxx_try_cpp LINENO
2509# ------------------------
2510# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2511ac_fn_cxx_try_cpp ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  if { { ac_try="$ac_cpp conftest.$ac_ext"
2515case "(($ac_try" in
2516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517  *) ac_try_echo=$ac_try;;
2518esac
2519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2520$as_echo "$ac_try_echo"; } >&5
2521  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2522  ac_status=$?
2523  if test -s conftest.err; then
2524    grep -v '^ *+' conftest.err >conftest.er1
2525    cat conftest.er1 >&5
2526    mv -f conftest.er1 conftest.err
2527  fi
2528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2529  test $ac_status = 0; } > conftest.i && {
2530	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2531	 test ! -s conftest.err
2532       }; then :
2533  ac_retval=0
2534else
2535  $as_echo "$as_me: failed program was:" >&5
2536sed 's/^/| /' conftest.$ac_ext >&5
2537
2538    ac_retval=1
2539fi
2540  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2541  as_fn_set_status $ac_retval
2542
2543} # ac_fn_cxx_try_cpp
2544
2545# ac_fn_c_try_link LINENO
2546# -----------------------
2547# Try to link conftest.$ac_ext, and return whether this succeeded.
2548ac_fn_c_try_link ()
2549{
2550  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551  rm -f conftest.$ac_objext conftest$ac_exeext
2552  if { { ac_try="$ac_link"
2553case "(($ac_try" in
2554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2555  *) ac_try_echo=$ac_try;;
2556esac
2557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2558$as_echo "$ac_try_echo"; } >&5
2559  (eval "$ac_link") 2>conftest.err
2560  ac_status=$?
2561  if test -s conftest.err; then
2562    grep -v '^ *+' conftest.err >conftest.er1
2563    cat conftest.er1 >&5
2564    mv -f conftest.er1 conftest.err
2565  fi
2566  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2567  test $ac_status = 0; } && {
2568	 test -z "$ac_c_werror_flag" ||
2569	 test ! -s conftest.err
2570       } && test -s conftest$ac_exeext && {
2571	 test "$cross_compiling" = yes ||
2572	 test -x conftest$ac_exeext
2573       }; then :
2574  ac_retval=0
2575else
2576  $as_echo "$as_me: failed program was:" >&5
2577sed 's/^/| /' conftest.$ac_ext >&5
2578
2579	ac_retval=1
2580fi
2581  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2582  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2583  # interfere with the next link command; also delete a directory that is
2584  # left behind by Apple's compiler.  We do this before executing the actions.
2585  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2586  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2587  as_fn_set_status $ac_retval
2588
2589} # ac_fn_c_try_link
2590
2591# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2592# ---------------------------------------------------------
2593# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2594# the include files in INCLUDES and setting the cache variable VAR
2595# accordingly.
2596ac_fn_cxx_check_header_mongrel ()
2597{
2598  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599  if eval \${$3+:} false; then :
2600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2601$as_echo_n "checking for $2... " >&6; }
2602if eval \${$3+:} false; then :
2603  $as_echo_n "(cached) " >&6
2604fi
2605eval ac_res=\$$3
2606	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2607$as_echo "$ac_res" >&6; }
2608else
2609  # Is the header compilable?
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2611$as_echo_n "checking $2 usability... " >&6; }
2612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614$4
2615#include <$2>
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_header_compiler=yes
2619else
2620  ac_header_compiler=no
2621fi
2622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2624$as_echo "$ac_header_compiler" >&6; }
2625
2626# Is the header present?
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2628$as_echo_n "checking $2 presence... " >&6; }
2629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631#include <$2>
2632_ACEOF
2633if ac_fn_cxx_try_cpp "$LINENO"; then :
2634  ac_header_preproc=yes
2635else
2636  ac_header_preproc=no
2637fi
2638rm -f conftest.err conftest.i conftest.$ac_ext
2639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2640$as_echo "$ac_header_preproc" >&6; }
2641
2642# So?  What about this header?
2643case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2644  yes:no: )
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2646$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2648$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2649    ;;
2650  no:yes:* )
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2652$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2654$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2656$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2658$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2660$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2661( $as_echo "## ----------------------------------------- ##
2662## Report this to build-dev@openjdk.java.net ##
2663## ----------------------------------------- ##"
2664     ) | sed "s/^/$as_me: WARNING:     /" >&2
2665    ;;
2666esac
2667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2668$as_echo_n "checking for $2... " >&6; }
2669if eval \${$3+:} false; then :
2670  $as_echo_n "(cached) " >&6
2671else
2672  eval "$3=\$ac_header_compiler"
2673fi
2674eval ac_res=\$$3
2675	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2676$as_echo "$ac_res" >&6; }
2677fi
2678  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2679
2680} # ac_fn_cxx_check_header_mongrel
2681
2682# ac_fn_cxx_try_run LINENO
2683# ------------------------
2684# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2685# that executables *can* be run.
2686ac_fn_cxx_try_run ()
2687{
2688  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2689  if { { ac_try="$ac_link"
2690case "(($ac_try" in
2691  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2692  *) ac_try_echo=$ac_try;;
2693esac
2694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2695$as_echo "$ac_try_echo"; } >&5
2696  (eval "$ac_link") 2>&5
2697  ac_status=$?
2698  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2699  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2700  { { case "(($ac_try" in
2701  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2702  *) ac_try_echo=$ac_try;;
2703esac
2704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2705$as_echo "$ac_try_echo"; } >&5
2706  (eval "$ac_try") 2>&5
2707  ac_status=$?
2708  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2709  test $ac_status = 0; }; }; then :
2710  ac_retval=0
2711else
2712  $as_echo "$as_me: program exited with status $ac_status" >&5
2713       $as_echo "$as_me: failed program was:" >&5
2714sed 's/^/| /' conftest.$ac_ext >&5
2715
2716       ac_retval=$ac_status
2717fi
2718  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2719  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2720  as_fn_set_status $ac_retval
2721
2722} # ac_fn_cxx_try_run
2723
2724# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2725# ---------------------------------------------------------
2726# Tests whether HEADER exists and can be compiled using the include files in
2727# INCLUDES, setting the cache variable VAR accordingly.
2728ac_fn_cxx_check_header_compile ()
2729{
2730  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2732$as_echo_n "checking for $2... " >&6; }
2733if eval \${$3+:} false; then :
2734  $as_echo_n "(cached) " >&6
2735else
2736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2737/* end confdefs.h.  */
2738$4
2739#include <$2>
2740_ACEOF
2741if ac_fn_cxx_try_compile "$LINENO"; then :
2742  eval "$3=yes"
2743else
2744  eval "$3=no"
2745fi
2746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2747fi
2748eval ac_res=\$$3
2749	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2750$as_echo "$ac_res" >&6; }
2751  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2752
2753} # ac_fn_cxx_check_header_compile
2754
2755# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2756# ----------------------------------------------
2757# Tries to find the compile-time value of EXPR in a program that includes
2758# INCLUDES, setting VAR accordingly. Returns whether the value could be
2759# computed
2760ac_fn_cxx_compute_int ()
2761{
2762  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2763  if test "$cross_compiling" = yes; then
2764    # Depending upon the size, compute the lo and hi bounds.
2765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2766/* end confdefs.h.  */
2767$4
2768int
2769main ()
2770{
2771static int test_array [1 - 2 * !(($2) >= 0)];
2772test_array [0] = 0;
2773return test_array [0];
2774
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779if ac_fn_cxx_try_compile "$LINENO"; then :
2780  ac_lo=0 ac_mid=0
2781  while :; do
2782    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2783/* end confdefs.h.  */
2784$4
2785int
2786main ()
2787{
2788static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2789test_array [0] = 0;
2790return test_array [0];
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_compile "$LINENO"; then :
2797  ac_hi=$ac_mid; break
2798else
2799  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2800			if test $ac_lo -le $ac_mid; then
2801			  ac_lo= ac_hi=
2802			  break
2803			fi
2804			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2805fi
2806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2807  done
2808else
2809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2810/* end confdefs.h.  */
2811$4
2812int
2813main ()
2814{
2815static int test_array [1 - 2 * !(($2) < 0)];
2816test_array [0] = 0;
2817return test_array [0];
2818
2819  ;
2820  return 0;
2821}
2822_ACEOF
2823if ac_fn_cxx_try_compile "$LINENO"; then :
2824  ac_hi=-1 ac_mid=-1
2825  while :; do
2826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828$4
2829int
2830main ()
2831{
2832static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2833test_array [0] = 0;
2834return test_array [0];
2835
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_compile "$LINENO"; then :
2841  ac_lo=$ac_mid; break
2842else
2843  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2844			if test $ac_mid -le $ac_hi; then
2845			  ac_lo= ac_hi=
2846			  break
2847			fi
2848			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2849fi
2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851  done
2852else
2853  ac_lo= ac_hi=
2854fi
2855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856fi
2857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858# Binary search between lo and hi bounds.
2859while test "x$ac_lo" != "x$ac_hi"; do
2860  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862/* end confdefs.h.  */
2863$4
2864int
2865main ()
2866{
2867static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2868test_array [0] = 0;
2869return test_array [0];
2870
2871  ;
2872  return 0;
2873}
2874_ACEOF
2875if ac_fn_cxx_try_compile "$LINENO"; then :
2876  ac_hi=$ac_mid
2877else
2878  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2879fi
2880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2881done
2882case $ac_lo in #((
2883?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2884'') ac_retval=1 ;;
2885esac
2886  else
2887    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888/* end confdefs.h.  */
2889$4
2890static long int longval () { return $2; }
2891static unsigned long int ulongval () { return $2; }
2892#include <stdio.h>
2893#include <stdlib.h>
2894int
2895main ()
2896{
2897
2898  FILE *f = fopen ("conftest.val", "w");
2899  if (! f)
2900    return 1;
2901  if (($2) < 0)
2902    {
2903      long int i = longval ();
2904      if (i != ($2))
2905	return 1;
2906      fprintf (f, "%ld", i);
2907    }
2908  else
2909    {
2910      unsigned long int i = ulongval ();
2911      if (i != ($2))
2912	return 1;
2913      fprintf (f, "%lu", i);
2914    }
2915  /* Do not output a trailing newline, as this causes \r\n confusion
2916     on some platforms.  */
2917  return ferror (f) || fclose (f) != 0;
2918
2919  ;
2920  return 0;
2921}
2922_ACEOF
2923if ac_fn_cxx_try_run "$LINENO"; then :
2924  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2925else
2926  ac_retval=1
2927fi
2928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2929  conftest.$ac_objext conftest.beam conftest.$ac_ext
2930rm -f conftest.val
2931
2932  fi
2933  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2934  as_fn_set_status $ac_retval
2935
2936} # ac_fn_cxx_compute_int
2937
2938# ac_fn_cxx_try_link LINENO
2939# -------------------------
2940# Try to link conftest.$ac_ext, and return whether this succeeded.
2941ac_fn_cxx_try_link ()
2942{
2943  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2944  rm -f conftest.$ac_objext conftest$ac_exeext
2945  if { { ac_try="$ac_link"
2946case "(($ac_try" in
2947  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948  *) ac_try_echo=$ac_try;;
2949esac
2950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2951$as_echo "$ac_try_echo"; } >&5
2952  (eval "$ac_link") 2>conftest.err
2953  ac_status=$?
2954  if test -s conftest.err; then
2955    grep -v '^ *+' conftest.err >conftest.er1
2956    cat conftest.er1 >&5
2957    mv -f conftest.er1 conftest.err
2958  fi
2959  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2960  test $ac_status = 0; } && {
2961	 test -z "$ac_cxx_werror_flag" ||
2962	 test ! -s conftest.err
2963       } && test -s conftest$ac_exeext && {
2964	 test "$cross_compiling" = yes ||
2965	 test -x conftest$ac_exeext
2966       }; then :
2967  ac_retval=0
2968else
2969  $as_echo "$as_me: failed program was:" >&5
2970sed 's/^/| /' conftest.$ac_ext >&5
2971
2972	ac_retval=1
2973fi
2974  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2975  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2976  # interfere with the next link command; also delete a directory that is
2977  # left behind by Apple's compiler.  We do this before executing the actions.
2978  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2979  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2980  as_fn_set_status $ac_retval
2981
2982} # ac_fn_cxx_try_link
2983
2984# ac_fn_cxx_check_func LINENO FUNC VAR
2985# ------------------------------------
2986# Tests whether FUNC exists, setting the cache variable VAR accordingly
2987ac_fn_cxx_check_func ()
2988{
2989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2991$as_echo_n "checking for $2... " >&6; }
2992if eval \${$3+:} false; then :
2993  $as_echo_n "(cached) " >&6
2994else
2995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2996/* end confdefs.h.  */
2997/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2998   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2999#define $2 innocuous_$2
3000
3001/* System header to define __stub macros and hopefully few prototypes,
3002    which can conflict with char $2 (); below.
3003    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3004    <limits.h> exists even on freestanding compilers.  */
3005
3006#ifdef __STDC__
3007# include <limits.h>
3008#else
3009# include <assert.h>
3010#endif
3011
3012#undef $2
3013
3014/* Override any GCC internal prototype to avoid an error.
3015   Use char because int might match the return type of a GCC
3016   builtin and then its argument prototype would still apply.  */
3017#ifdef __cplusplus
3018extern "C"
3019#endif
3020char $2 ();
3021/* The GNU C library defines this for functions which it implements
3022    to always fail with ENOSYS.  Some functions are actually named
3023    something starting with __ and the normal name is an alias.  */
3024#if defined __stub_$2 || defined __stub___$2
3025choke me
3026#endif
3027
3028int
3029main ()
3030{
3031return $2 ();
3032  ;
3033  return 0;
3034}
3035_ACEOF
3036if ac_fn_cxx_try_link "$LINENO"; then :
3037  eval "$3=yes"
3038else
3039  eval "$3=no"
3040fi
3041rm -f core conftest.err conftest.$ac_objext \
3042    conftest$ac_exeext conftest.$ac_ext
3043fi
3044eval ac_res=\$$3
3045	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3046$as_echo "$ac_res" >&6; }
3047  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3048
3049} # ac_fn_cxx_check_func
3050
3051# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3052# -------------------------------------------------------
3053# Tests whether HEADER exists and can be compiled using the include files in
3054# INCLUDES, setting the cache variable VAR accordingly.
3055ac_fn_c_check_header_compile ()
3056{
3057  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3059$as_echo_n "checking for $2... " >&6; }
3060if eval \${$3+:} false; then :
3061  $as_echo_n "(cached) " >&6
3062else
3063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3064/* end confdefs.h.  */
3065$4
3066#include <$2>
3067_ACEOF
3068if ac_fn_c_try_compile "$LINENO"; then :
3069  eval "$3=yes"
3070else
3071  eval "$3=no"
3072fi
3073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3074fi
3075eval ac_res=\$$3
3076	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3077$as_echo "$ac_res" >&6; }
3078  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3079
3080} # ac_fn_c_check_header_compile
3081cat >config.log <<_ACEOF
3082This file contains any messages produced by compilers while
3083running configure, to aid debugging if configure makes a mistake.
3084
3085It was created by OpenJDK $as_me jdk9, which was
3086generated by GNU Autoconf 2.69.  Invocation command line was
3087
3088  $ $0 $@
3089
3090_ACEOF
3091exec 5>>config.log
3092{
3093cat <<_ASUNAME
3094## --------- ##
3095## Platform. ##
3096## --------- ##
3097
3098hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3099uname -m = `(uname -m) 2>/dev/null || echo unknown`
3100uname -r = `(uname -r) 2>/dev/null || echo unknown`
3101uname -s = `(uname -s) 2>/dev/null || echo unknown`
3102uname -v = `(uname -v) 2>/dev/null || echo unknown`
3103
3104/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3105/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3106
3107/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3108/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3109/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3110/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3111/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3112/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3113/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3114
3115_ASUNAME
3116
3117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3118for as_dir in $PATH
3119do
3120  IFS=$as_save_IFS
3121  test -z "$as_dir" && as_dir=.
3122    $as_echo "PATH: $as_dir"
3123  done
3124IFS=$as_save_IFS
3125
3126} >&5
3127
3128cat >&5 <<_ACEOF
3129
3130
3131## ----------- ##
3132## Core tests. ##
3133## ----------- ##
3134
3135_ACEOF
3136
3137
3138# Keep a trace of the command line.
3139# Strip out --no-create and --no-recursion so they do not pile up.
3140# Strip out --silent because we don't want to record it for future runs.
3141# Also quote any args containing shell meta-characters.
3142# Make two passes to allow for proper duplicate-argument suppression.
3143ac_configure_args=
3144ac_configure_args0=
3145ac_configure_args1=
3146ac_must_keep_next=false
3147for ac_pass in 1 2
3148do
3149  for ac_arg
3150  do
3151    case $ac_arg in
3152    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3153    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3154    | -silent | --silent | --silen | --sile | --sil)
3155      continue ;;
3156    *\'*)
3157      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3158    esac
3159    case $ac_pass in
3160    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3161    2)
3162      as_fn_append ac_configure_args1 " '$ac_arg'"
3163      if test $ac_must_keep_next = true; then
3164	ac_must_keep_next=false # Got value, back to normal.
3165      else
3166	case $ac_arg in
3167	  *=* | --config-cache | -C | -disable-* | --disable-* \
3168	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3169	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3170	  | -with-* | --with-* | -without-* | --without-* | --x)
3171	    case "$ac_configure_args0 " in
3172	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3173	    esac
3174	    ;;
3175	  -* ) ac_must_keep_next=true ;;
3176	esac
3177      fi
3178      as_fn_append ac_configure_args " '$ac_arg'"
3179      ;;
3180    esac
3181  done
3182done
3183{ ac_configure_args0=; unset ac_configure_args0;}
3184{ ac_configure_args1=; unset ac_configure_args1;}
3185
3186# When interrupted or exit'd, cleanup temporary files, and complete
3187# config.log.  We remove comments because anyway the quotes in there
3188# would cause problems or look ugly.
3189# WARNING: Use '\'' to represent an apostrophe within the trap.
3190# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3191trap 'exit_status=$?
3192  # Save into config.log some information that might help in debugging.
3193  {
3194    echo
3195
3196    $as_echo "## ---------------- ##
3197## Cache variables. ##
3198## ---------------- ##"
3199    echo
3200    # The following way of writing the cache mishandles newlines in values,
3201(
3202  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3203    eval ac_val=\$$ac_var
3204    case $ac_val in #(
3205    *${as_nl}*)
3206      case $ac_var in #(
3207      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3208$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3209      esac
3210      case $ac_var in #(
3211      _ | IFS | as_nl) ;; #(
3212      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3213      *) { eval $ac_var=; unset $ac_var;} ;;
3214      esac ;;
3215    esac
3216  done
3217  (set) 2>&1 |
3218    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3219    *${as_nl}ac_space=\ *)
3220      sed -n \
3221	"s/'\''/'\''\\\\'\'''\''/g;
3222	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3223      ;; #(
3224    *)
3225      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3226      ;;
3227    esac |
3228    sort
3229)
3230    echo
3231
3232    $as_echo "## ----------------- ##
3233## Output variables. ##
3234## ----------------- ##"
3235    echo
3236    for ac_var in $ac_subst_vars
3237    do
3238      eval ac_val=\$$ac_var
3239      case $ac_val in
3240      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3241      esac
3242      $as_echo "$ac_var='\''$ac_val'\''"
3243    done | sort
3244    echo
3245
3246    if test -n "$ac_subst_files"; then
3247      $as_echo "## ------------------- ##
3248## File substitutions. ##
3249## ------------------- ##"
3250      echo
3251      for ac_var in $ac_subst_files
3252      do
3253	eval ac_val=\$$ac_var
3254	case $ac_val in
3255	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3256	esac
3257	$as_echo "$ac_var='\''$ac_val'\''"
3258      done | sort
3259      echo
3260    fi
3261
3262    if test -s confdefs.h; then
3263      $as_echo "## ----------- ##
3264## confdefs.h. ##
3265## ----------- ##"
3266      echo
3267      cat confdefs.h
3268      echo
3269    fi
3270    test "$ac_signal" != 0 &&
3271      $as_echo "$as_me: caught signal $ac_signal"
3272    $as_echo "$as_me: exit $exit_status"
3273  } >&5
3274  rm -f core *.core core.conftest.* &&
3275    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3276    exit $exit_status
3277' 0
3278for ac_signal in 1 2 13 15; do
3279  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3280done
3281ac_signal=0
3282
3283# confdefs.h avoids OS command line length limits that DEFS can exceed.
3284rm -f -r conftest* confdefs.h
3285
3286$as_echo "/* confdefs.h */" > confdefs.h
3287
3288# Predefined preprocessor variables.
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_NAME "$PACKAGE_NAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_VERSION "$PACKAGE_VERSION"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_STRING "$PACKAGE_STRING"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3308_ACEOF
3309
3310cat >>confdefs.h <<_ACEOF
3311#define PACKAGE_URL "$PACKAGE_URL"
3312_ACEOF
3313
3314
3315# Let the site file select an alternate cache file if it wants to.
3316# Prefer an explicitly selected file to automatically selected ones.
3317ac_site_file1=NONE
3318ac_site_file2=NONE
3319if test -n "$CONFIG_SITE"; then
3320  # We do not want a PATH search for config.site.
3321  case $CONFIG_SITE in #((
3322    -*)  ac_site_file1=./$CONFIG_SITE;;
3323    */*) ac_site_file1=$CONFIG_SITE;;
3324    *)   ac_site_file1=./$CONFIG_SITE;;
3325  esac
3326elif test "x$prefix" != xNONE; then
3327  ac_site_file1=$prefix/share/config.site
3328  ac_site_file2=$prefix/etc/config.site
3329else
3330  ac_site_file1=$ac_default_prefix/share/config.site
3331  ac_site_file2=$ac_default_prefix/etc/config.site
3332fi
3333for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3334do
3335  test "x$ac_site_file" = xNONE && continue
3336  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3337    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3338$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3339    sed 's/^/| /' "$ac_site_file" >&5
3340    . "$ac_site_file" \
3341      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3343as_fn_error $? "failed to load site script $ac_site_file
3344See \`config.log' for more details" "$LINENO" 5; }
3345  fi
3346done
3347
3348if test -r "$cache_file"; then
3349  # Some versions of bash will fail to source /dev/null (special files
3350  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3351  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3352    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3353$as_echo "$as_me: loading cache $cache_file" >&6;}
3354    case $cache_file in
3355      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3356      *)                      . "./$cache_file";;
3357    esac
3358  fi
3359else
3360  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3361$as_echo "$as_me: creating cache $cache_file" >&6;}
3362  >$cache_file
3363fi
3364
3365# Check that the precious variables saved in the cache have kept the same
3366# value.
3367ac_cache_corrupted=false
3368for ac_var in $ac_precious_vars; do
3369  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3370  eval ac_new_set=\$ac_env_${ac_var}_set
3371  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3372  eval ac_new_val=\$ac_env_${ac_var}_value
3373  case $ac_old_set,$ac_new_set in
3374    set,)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,set)
3379      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3380$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3381      ac_cache_corrupted=: ;;
3382    ,);;
3383    *)
3384      if test "x$ac_old_val" != "x$ac_new_val"; then
3385	# differences in whitespace do not lead to failure.
3386	ac_old_val_w=`echo x $ac_old_val`
3387	ac_new_val_w=`echo x $ac_new_val`
3388	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3390$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3391	  ac_cache_corrupted=:
3392	else
3393	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3394$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3395	  eval $ac_var=\$ac_old_val
3396	fi
3397	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3398$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3399	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3400$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3401      fi;;
3402  esac
3403  # Pass precious variables to config.status.
3404  if test "$ac_new_set" = set; then
3405    case $ac_new_val in
3406    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3407    *) ac_arg=$ac_var=$ac_new_val ;;
3408    esac
3409    case " $ac_configure_args " in
3410      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3411      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3412    esac
3413  fi
3414done
3415if $ac_cache_corrupted; then
3416  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3418  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3419$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3420  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3421fi
3422## -------------------- ##
3423## Main body of script. ##
3424## -------------------- ##
3425
3426ac_ext=c
3427ac_cpp='$CPP $CPPFLAGS'
3428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3430ac_compiler_gnu=$ac_cv_c_compiler_gnu
3431
3432
3433
3434ac_aux_dir=
3435for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3436  if test -f "$ac_dir/install-sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install-sh -c"
3439    break
3440  elif test -f "$ac_dir/install.sh"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/install.sh -c"
3443    break
3444  elif test -f "$ac_dir/shtool"; then
3445    ac_aux_dir=$ac_dir
3446    ac_install_sh="$ac_aux_dir/shtool install -c"
3447    break
3448  fi
3449done
3450if test -z "$ac_aux_dir"; then
3451  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3452fi
3453
3454# These three variables are undocumented and unsupported,
3455# and are intended to be withdrawn in a future Autoconf release.
3456# They can cause serious problems if a builder's source tree is in a directory
3457# whose full name contains unusual characters.
3458ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3459ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3460ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3461
3462
3463# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3464
3465#
3466# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3468#
3469# This code is free software; you can redistribute it and/or modify it
3470# under the terms of the GNU General Public License version 2 only, as
3471# published by the Free Software Foundation.  Oracle designates this
3472# particular file as subject to the "Classpath" exception as provided
3473# by Oracle in the LICENSE file that accompanied this code.
3474#
3475# This code is distributed in the hope that it will be useful, but WITHOUT
3476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3478# version 2 for more details (a copy is included in the LICENSE file that
3479# accompanied this code).
3480#
3481# You should have received a copy of the GNU General Public License version
3482# 2 along with this work; if not, write to the Free Software Foundation,
3483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3484#
3485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3486# or visit www.oracle.com if you need additional information or have any
3487# questions.
3488#
3489
3490#
3491# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3492#
3493# This program is free software; you can redistribute it and/or modify
3494# it under the terms of the GNU General Public License as published by
3495# the Free Software Foundation; either version 2 of the License, or
3496# (at your option) any later version.
3497#
3498# This program is distributed in the hope that it will be useful, but
3499# WITHOUT ANY WARRANTY; without even the implied warranty of
3500# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3501# General Public License for more details.
3502#
3503# You should have received a copy of the GNU General Public License
3504# along with this program; if not, write to the Free Software
3505# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3506#
3507# As a special exception to the GNU General Public License, if you
3508# distribute this file as part of a program that contains a
3509# configuration script generated by Autoconf, you may include it under
3510# the same distribution terms that you use for the rest of that program.
3511
3512# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3513# ----------------------------------
3514# PKG_PROG_PKG_CONFIG
3515
3516# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3517#
3518# Check to see whether a particular set of modules exists.  Similar
3519# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3520#
3521#
3522# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3523# this or PKG_CHECK_MODULES is called, or make sure to call
3524# PKG_CHECK_EXISTS manually
3525# --------------------------------------------------------------
3526
3527
3528
3529# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3530# ---------------------------------------------
3531# _PKG_CONFIG
3532
3533# _PKG_SHORT_ERRORS_SUPPORTED
3534# -----------------------------
3535# _PKG_SHORT_ERRORS_SUPPORTED
3536
3537
3538# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3539# [ACTION-IF-NOT-FOUND])
3540#
3541#
3542# Note that if there is a possibility the first call to
3543# PKG_CHECK_MODULES might not happen, you should be sure to include an
3544# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3545#
3546#
3547# --------------------------------------------------------------
3548# PKG_CHECK_MODULES
3549
3550
3551# Include these first...
3552#
3553# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3554# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3555#
3556# This code is free software; you can redistribute it and/or modify it
3557# under the terms of the GNU General Public License version 2 only, as
3558# published by the Free Software Foundation.  Oracle designates this
3559# particular file as subject to the "Classpath" exception as provided
3560# by Oracle in the LICENSE file that accompanied this code.
3561#
3562# This code is distributed in the hope that it will be useful, but WITHOUT
3563# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3564# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3565# version 2 for more details (a copy is included in the LICENSE file that
3566# accompanied this code).
3567#
3568# You should have received a copy of the GNU General Public License version
3569# 2 along with this work; if not, write to the Free Software Foundation,
3570# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3571#
3572# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3573# or visit www.oracle.com if you need additional information or have any
3574# questions.
3575#
3576
3577# Create a function/macro that takes a series of named arguments. The call is
3578# similar to AC_DEFUN, but the setup of the function looks like this:
3579# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3580# ... do something
3581#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3582# ])
3583# A star (*) in front of a named argument means that it is required and it's
3584# presence will be verified. To pass e.g. the first value as a normal indexed
3585# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3586# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3587# "ARG_FOO".
3588#
3589# The generated function can be called like this:
3590# MYFUNC(FOO: [foo-val],
3591#     BAR: [
3592#         $ECHO hello world
3593#     ])
3594# Note that the argument value must start on the same line as the argument name.
3595#
3596# Argument 1: Name of the function to define
3597# Argument 2: List of legal named arguments, with a * prefix for required arguments
3598# Argument 3: Argument array to treat as named, typically $@
3599# Argument 4: The main function body
3600
3601
3602# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3603# If so, then append $1 to $2 \
3604# Also set JVM_ARG_OK to true/false depending on outcome.
3605
3606
3607# Appends a string to a path variable, only adding the : when needed.
3608
3609
3610# Prepends a string to a path variable, only adding the : when needed.
3611
3612
3613# This will make sure the given variable points to a full and proper
3614# path. This means:
3615# 1) There will be no spaces in the path. On unix platforms,
3616#    spaces in the path will result in an error. On Windows,
3617#    the path will be rewritten using short-style to be space-free.
3618# 2) The path will be absolute, and it will be in unix-style (on
3619#     cygwin).
3620# $1: The name of the variable to fix
3621
3622
3623# This will make sure the given variable points to a executable
3624# with a full and proper path. This means:
3625# 1) There will be no spaces in the path. On unix platforms,
3626#    spaces in the path will result in an error. On Windows,
3627#    the path will be rewritten using short-style to be space-free.
3628# 2) The path will be absolute, and it will be in unix-style (on
3629#     cygwin).
3630# Any arguments given to the executable is preserved.
3631# If the input variable does not have a directory specification, then
3632# it need to be in the PATH.
3633# $1: The name of the variable to fix
3634
3635
3636
3637
3638# Register a --with argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --with-
3640
3641
3642# Register a --enable argument but mark it as deprecated
3643# $1: The name of the with argument to deprecate, not including --enable-
3644# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3645# $3: Messages to user.
3646
3647
3648
3649
3650# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3651# $1: variable to check
3652
3653
3654# Check that there are no unprocessed overridden variables left.
3655# If so, they are an incorrect argument and we will exit with an error.
3656
3657
3658# Setup a tool for the given variable. If correctly specified by the user,
3659# use that value, otherwise search for the tool using the supplied code snippet.
3660# $1: variable to set
3661# $2: code snippet to call to look for the tool
3662# $3: code snippet to call if variable was used to find tool
3663
3664
3665# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3666# $1: variable to set
3667# $2: executable name (or list of names) to look for
3668# $3: [path]
3669
3670
3671# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3672# $1: variable to set
3673# $2: executable name (or list of names) to look for
3674
3675
3676# Like BASIC_PATH_PROGS but fails if no tool was found.
3677# $1: variable to set
3678# $2: executable name (or list of names) to look for
3679# $3: [path]
3680
3681
3682# Like BASIC_SETUP_TOOL but fails if no tool was found.
3683# $1: variable to set
3684# $2: autoconf macro to call to look for the special tool
3685
3686
3687# Setup the most fundamental tools that relies on not much else to set up,
3688# but is used by much of the early bootstrap code.
3689
3690
3691# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3692
3693
3694# Evaluates platform specific overrides for devkit variables.
3695# $1: Name of variable
3696
3697
3698
3699
3700
3701
3702#%%% Simple tools %%%
3703
3704# Check if we have found a usable version of make
3705# $1: the path to a potential make binary (or empty)
3706# $2: the description on how we found this
3707
3708
3709
3710
3711# Goes looking for a usable version of GNU make.
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722# Check if build directory is on local disk. If not possible to determine,
3723# we prefer to claim it's local.
3724# Argument 1: directory to test
3725# Argument 2: what to do if it is on local disk
3726# Argument 3: what to do otherwise (remote disk or failure)
3727
3728
3729# Check that source files have basic read permissions set. This might
3730# not be the case in cygwin in certain conditions.
3731
3732
3733
3734
3735# Check for support for specific options in bash
3736
3737
3738################################################################################
3739#
3740# Default make target
3741#
3742
3743
3744# Code to run after AC_OUTPUT
3745
3746
3747#
3748# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776# Helper function which possibly converts a path using DOS-style short mode.
3777# If so, the updated path is stored in $new_path.
3778# $1: The path to check
3779
3780
3781# Helper function which possibly converts a path using DOS-style short mode.
3782# If so, the updated path is stored in $new_path.
3783# $1: The path to check
3784
3785
3786# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3787# and could probably be heavily simplified. However, all changes in this
3788# area tend to need lot of testing in different scenarios, and in lack of
3789# proper unit testing, cleaning this up has not been deemed worth the effort
3790# at the moment.
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3801
3802
3803
3804
3805# ... then the rest
3806#
3807# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831########################################################################
3832# This file handles detection of the Boot JDK. The Boot JDK detection
3833# process has been developed as a response to solve a complex real-world
3834# problem. Initially, it was simple, but it has grown as platform after
3835# platform, idiosyncracy after idiosyncracy has been supported.
3836#
3837# The basic idea is this:
3838# 1) You need an acceptable *) JDK to use as a Boot JDK
3839# 2) There are several ways to locate a JDK, that are mostly platform
3840#    dependent **)
3841# 3) You can have multiple JDKs installed
3842# 4) If possible, configure should try to dig out an acceptable JDK
3843#    automatically, without having to resort to command-line options
3844#
3845# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3846#     javac) and not a JRE, etc.
3847#
3848# **) On Windows we typically use a well-known path.
3849#     On MacOSX we typically use the tool java_home.
3850#     On Linux we typically find javac in the $PATH, and then follow a
3851#     chain of symlinks that often ends up in a real JDK.
3852#
3853# This leads to the code where we check in different ways to locate a
3854# JDK, and if one is found, check if it is acceptable. If not, we print
3855# our reasons for rejecting it (useful when debugging non-working
3856# configure situations) and continue checking the next one.
3857########################################################################
3858
3859# Execute the check given as argument, and verify the result
3860# If the Boot JDK was previously found, do nothing
3861# $1 A command line (typically autoconf macro) to execute
3862
3863
3864# Test: Is bootjdk explicitly set by command line arguments?
3865
3866
3867# Test: Is $JAVA_HOME set?
3868
3869
3870# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3871
3872
3873# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3874# $1: Argument to the java_home binary (optional)
3875
3876
3877# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3878
3879
3880# Look for a jdk in the given path. If there are multiple, try to select the newest.
3881# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3882# $1 = Path to directory containing jdk installations.
3883# $2 = String to append to the found JDK directory to get the proper JDK home
3884
3885
3886# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3887# environmental variable as base for where to look.
3888# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3889
3890
3891# Test: Is there a JDK installed in default, well-known locations?
3892
3893
3894# Check that a command-line tool in the Boot JDK is correct
3895# $1 = name of variable to assign
3896# $2 = name of binary
3897
3898
3899###############################################################################
3900#
3901# We need a Boot JDK to bootstrap the build.
3902#
3903
3904
3905
3906
3907
3908# BUILD_JDK: the location of the latest JDK that can run
3909#   on the host system and supports the target class file version
3910#   generated in this JDK build.  This variable should only be
3911#   used after the launchers are built.
3912#
3913
3914# Execute the check given as argument, and verify the result.
3915# If the JDK was previously found, do nothing.
3916# $1 A command line (typically autoconf macro) to execute
3917
3918
3919# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3920# is different than the host system doing the build (e.g. cross-compilation),
3921# a special BUILD_JDK is built as part of the build process.  An external
3922# prebuilt BUILD_JDK can also be supplied.
3923
3924
3925#
3926# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3927# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3928#
3929# This code is free software; you can redistribute it and/or modify it
3930# under the terms of the GNU General Public License version 2 only, as
3931# published by the Free Software Foundation.  Oracle designates this
3932# particular file as subject to the "Classpath" exception as provided
3933# by Oracle in the LICENSE file that accompanied this code.
3934#
3935# This code is distributed in the hope that it will be useful, but WITHOUT
3936# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3937# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3938# version 2 for more details (a copy is included in the LICENSE file that
3939# accompanied this code).
3940#
3941# You should have received a copy of the GNU General Public License version
3942# 2 along with this work; if not, write to the Free Software Foundation,
3943# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3944#
3945# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3946# or visit www.oracle.com if you need additional information or have any
3947# questions.
3948#
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966################################################################################
3967#
3968# Runs icecc-create-env once and prints the error if it fails
3969#
3970# $1: arguments to icecc-create-env
3971# $2: log file
3972#
3973
3974
3975################################################################################
3976#
3977# Optionally enable distributed compilation of native code using icecc/icecream
3978#
3979
3980
3981
3982
3983
3984
3985
3986#
3987# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011################################################################################
4012#
4013# Setup ABI profile (for arm)
4014#
4015
4016
4017# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4018# corresponding configure arguments instead
4019
4020
4021# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4022# that configure can use them while detecting compilers.
4023# TOOLCHAIN_TYPE is available here.
4024# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4025
4026
4027
4028
4029
4030
4031# Documentation on common flags used for solstudio in HIGHEST.
4032#
4033# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4034#          done with care, there are some assumptions below that need to
4035#          be understood about the use of pointers, and IEEE behavior.
4036#
4037# -fns: Use non-standard floating point mode (not IEEE 754)
4038# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4039# -fsingle: Use single precision floating point with 'float'
4040# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4041#   (Source with excessing pointer casting and data access with mixed
4042#    pointer types are not recommended)
4043# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4044#   (If you expect perfect errno behavior, do not use this)
4045# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4046# -xrestrict: Pointer parameters to functions do not overlap
4047#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4048#    If you pass in multiple pointers to the same data, do not use this)
4049# -xlibmil: Inline some library routines
4050#   (If you expect perfect errno behavior, do not use this)
4051# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4052#   (If you expect perfect errno behavior, do not use this)
4053#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4054
4055    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4056    # Bug?
4057    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4058    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4059    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4060    #fi
4061
4062
4063
4064
4065
4066
4067################################################################################
4068# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4069#      conditionals against.
4070# $2 - Optional prefix for each variable defined.
4071
4072
4073# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074#                                  IF_FALSE: [RUN-IF-FALSE])
4075# ------------------------------------------------------------
4076# Check that the C compiler supports an argument
4077
4078
4079
4080
4081# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082#                                    IF_FALSE: [RUN-IF-FALSE])
4083# ------------------------------------------------------------
4084# Check that the C++ compiler supports an argument
4085
4086
4087
4088
4089# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4090#                                IF_FALSE: [RUN-IF-FALSE])
4091# ------------------------------------------------------------
4092# Check that the C and C++ compilers support an argument
4093
4094
4095
4096
4097# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4098#                                   IF_FALSE: [RUN-IF-FALSE])
4099# ------------------------------------------------------------
4100# Check that the linker support an argument
4101
4102
4103
4104
4105
4106
4107# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4108# Arguments:
4109# $1 - Optional prefix for each variable defined.
4110
4111
4112#
4113# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4114# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4115#
4116# This code is free software; you can redistribute it and/or modify it
4117# under the terms of the GNU General Public License version 2 only, as
4118# published by the Free Software Foundation.  Oracle designates this
4119# particular file as subject to the "Classpath" exception as provided
4120# by Oracle in the LICENSE file that accompanied this code.
4121#
4122# This code is distributed in the hope that it will be useful, but WITHOUT
4123# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4124# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4125# version 2 for more details (a copy is included in the LICENSE file that
4126# accompanied this code).
4127#
4128# You should have received a copy of the GNU General Public License version
4129# 2 along with this work; if not, write to the Free Software Foundation,
4130# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4131#
4132# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4133# or visit www.oracle.com if you need additional information or have any
4134# questions.
4135#
4136
4137
4138
4139
4140
4141cygwin_help() {
4142  case $1 in
4143    unzip)
4144      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4145      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4146      ;;
4147    zip)
4148      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4149      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4150      ;;
4151    make)
4152      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4153      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4154      ;;
4155    freetype)
4156      HELP_MSG="
4157The freetype library can now be build during the configure process.
4158Download the freetype sources and unpack them into an arbitrary directory:
4159
4160wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4161tar -xzf freetype-2.5.3.tar.gz
4162
4163Then run configure with '--with-freetype-src=<freetype_src>'. This will
4164automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4165builds or into '<freetype_src>/lib32' for 32-bit builds.
4166Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4167and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4168
4169Alternatively you can unpack the sources like this to use the default directory:
4170
4171tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4172      ;;
4173  esac
4174}
4175
4176msys_help() {
4177  PKGHANDLER_COMMAND=""
4178}
4179
4180apt_help() {
4181  case $1 in
4182    reduced)
4183      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4184    devkit)
4185      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4186    openjdk)
4187      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4188    alsa)
4189      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4190    cups)
4191      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4192    freetype)
4193      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4194    ffi)
4195      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4196    x11)
4197      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4198    ccache)
4199      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4200    dtrace)
4201      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4202    elf)
4203      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4204  esac
4205}
4206
4207yum_help() {
4208  case $1 in
4209    devkit)
4210      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4211    openjdk)
4212      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4213    alsa)
4214      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4215    cups)
4216      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4217    freetype)
4218      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4219    x11)
4220      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4221    ccache)
4222      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4223    elf)
4224      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4225  esac
4226}
4227
4228brew_help() {
4229  case $1 in
4230    openjdk)
4231      PKGHANDLER_COMMAND="brew cask install java" ;;
4232    freetype)
4233      PKGHANDLER_COMMAND="brew install freetype" ;;
4234    ccache)
4235      PKGHANDLER_COMMAND="brew install ccache" ;;
4236  esac
4237}
4238
4239port_help() {
4240  PKGHANDLER_COMMAND=""
4241}
4242
4243pkgutil_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247pkgadd_help() {
4248  PKGHANDLER_COMMAND=""
4249}
4250
4251# This function will check if we're called from the "configure" wrapper while
4252# printing --help. If so, we will print out additional information that can
4253# only be extracted within the autoconf script, and then exit. This must be
4254# called at the very beginning in configure.ac.
4255
4256
4257
4258
4259
4260
4261#
4262# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264#
4265# This code is free software; you can redistribute it and/or modify it
4266# under the terms of the GNU General Public License version 2 only, as
4267# published by the Free Software Foundation.  Oracle designates this
4268# particular file as subject to the "Classpath" exception as provided
4269# by Oracle in the LICENSE file that accompanied this code.
4270#
4271# This code is distributed in the hope that it will be useful, but WITHOUT
4272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4274# version 2 for more details (a copy is included in the LICENSE file that
4275# accompanied this code).
4276#
4277# You should have received a copy of the GNU General Public License version
4278# 2 along with this work; if not, write to the Free Software Foundation,
4279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4280#
4281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4282# or visit www.oracle.com if you need additional information or have any
4283# questions.
4284#
4285
4286# All valid JVM features, regardless of platform
4287VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4288    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4289    static-build link-time-opt aot"
4290
4291# All valid JVM variants
4292VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4293
4294###############################################################################
4295# Check if the specified JVM variant should be built. To be used in shell if
4296# constructs, like this:
4297# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4298#
4299# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4300
4301# Definition kept in one line to allow inlining in if statements.
4302# Additional [] needed to keep m4 from mangling shell constructs.
4303
4304
4305###############################################################################
4306# Check if the specified JVM features are explicitly enabled. To be used in
4307# shell if constructs, like this:
4308# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4309#
4310# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4311
4312# Definition kept in one line to allow inlining in if statements.
4313# Additional [] needed to keep m4 from mangling shell constructs.
4314
4315
4316###############################################################################
4317# Check which variants of the JVM that we want to build. Available variants are:
4318#   server: normal interpreter, and a tiered C1/C2 compiler
4319#   client: normal interpreter, and C1 (no C2 compiler)
4320#   minimal: reduced form of client with optional features stripped out
4321#   core: normal interpreter only, no compiler
4322#   zero: C++ based interpreter only, no compiler
4323#   zeroshark: C++ based interpreter, and a llvm-based compiler
4324#   custom: baseline JVM with no default features
4325#
4326
4327
4328###############################################################################
4329# Check if dtrace should be enabled and has all prerequisites present.
4330#
4331
4332
4333################################################################################
4334# Check if AOT should be enabled
4335#
4336
4337
4338###############################################################################
4339# Set up all JVM features for each JVM variant.
4340#
4341
4342
4343###############################################################################
4344# Validate JVM features once all setup is complete, including custom setup.
4345#
4346
4347
4348################################################################################
4349#
4350# Specify which sources will be used to build the 64-bit ARM port
4351#
4352# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4353# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4354#
4355
4356
4357
4358################################################################################
4359# Check if gtest should be built
4360#
4361
4362
4363#
4364# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4365# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4366#
4367# This code is free software; you can redistribute it and/or modify it
4368# under the terms of the GNU General Public License version 2 only, as
4369# published by the Free Software Foundation.  Oracle designates this
4370# particular file as subject to the "Classpath" exception as provided
4371# by Oracle in the LICENSE file that accompanied this code.
4372#
4373# This code is distributed in the hope that it will be useful, but WITHOUT
4374# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4375# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4376# version 2 for more details (a copy is included in the LICENSE file that
4377# accompanied this code).
4378#
4379# You should have received a copy of the GNU General Public License version
4380# 2 along with this work; if not, write to the Free Software Foundation,
4381# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4382#
4383# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4384# or visit www.oracle.com if you need additional information or have any
4385# questions.
4386#
4387
4388###############################################################################
4389# Check which variant of the JDK that we want to build.
4390# Currently we have:
4391#    normal:   standard edition
4392# but the custom make system may add other variants
4393#
4394# Effectively the JDK variant gives a name to a specific set of
4395# modules to compile into the JDK.
4396
4397
4398###############################################################################
4399# Set the debug level
4400#    release: no debug information, all optimizations, no asserts.
4401#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4402#    fastdebug: debug information (-g), all optimizations, all asserts
4403#    slowdebug: debug information (-g), no optimizations, all asserts
4404
4405
4406###############################################################################
4407#
4408# Should we build only OpenJDK even if closed sources are present?
4409#
4410
4411
4412
4413
4414###############################################################################
4415#
4416# Enable or disable the elliptic curve crypto implementation
4417#
4418
4419
4420
4421
4422################################################################################
4423#
4424# Gcov coverage data for hotspot
4425#
4426
4427
4428################################################################################
4429#
4430# Static build support.  When enabled will generate static
4431# libraries instead of shared libraries for all JDK libs.
4432#
4433
4434
4435################################################################################
4436#
4437# jlink options.
4438# We always keep packaged modules in JDK image.
4439#
4440
4441
4442################################################################################
4443#
4444# Check if building of the jtreg failure handler should be enabled.
4445#
4446
4447
4448################################################################################
4449#
4450# Enable or disable generation of the classlist at build time
4451#
4452
4453
4454#
4455# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4456# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4457#
4458# This code is free software; you can redistribute it and/or modify it
4459# under the terms of the GNU General Public License version 2 only, as
4460# published by the Free Software Foundation.  Oracle designates this
4461# particular file as subject to the "Classpath" exception as provided
4462# by Oracle in the LICENSE file that accompanied this code.
4463#
4464# This code is distributed in the hope that it will be useful, but WITHOUT
4465# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4466# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4467# version 2 for more details (a copy is included in the LICENSE file that
4468# accompanied this code).
4469#
4470# You should have received a copy of the GNU General Public License version
4471# 2 along with this work; if not, write to the Free Software Foundation,
4472# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4473#
4474# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4475# or visit www.oracle.com if you need additional information or have any
4476# questions.
4477#
4478
4479###############################################################################
4480#
4481# Setup version numbers
4482#
4483
4484# Verify that a given string represents a valid version number, and assign it
4485# to a variable.
4486
4487# Argument 1: the variable to assign to
4488# Argument 2: the value given by the user
4489
4490
4491
4492
4493#
4494# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4495# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4496#
4497# This code is free software; you can redistribute it and/or modify it
4498# under the terms of the GNU General Public License version 2 only, as
4499# published by the Free Software Foundation.  Oracle designates this
4500# particular file as subject to the "Classpath" exception as provided
4501# by Oracle in the LICENSE file that accompanied this code.
4502#
4503# This code is distributed in the hope that it will be useful, but WITHOUT
4504# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4505# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4506# version 2 for more details (a copy is included in the LICENSE file that
4507# accompanied this code).
4508#
4509# You should have received a copy of the GNU General Public License version
4510# 2 along with this work; if not, write to the Free Software Foundation,
4511# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4512#
4513# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4514# or visit www.oracle.com if you need additional information or have any
4515# questions.
4516#
4517
4518# Major library component reside in separate files.
4519#
4520# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4521# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4522#
4523# This code is free software; you can redistribute it and/or modify it
4524# under the terms of the GNU General Public License version 2 only, as
4525# published by the Free Software Foundation.  Oracle designates this
4526# particular file as subject to the "Classpath" exception as provided
4527# by Oracle in the LICENSE file that accompanied this code.
4528#
4529# This code is distributed in the hope that it will be useful, but WITHOUT
4530# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4531# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4532# version 2 for more details (a copy is included in the LICENSE file that
4533# accompanied this code).
4534#
4535# You should have received a copy of the GNU General Public License version
4536# 2 along with this work; if not, write to the Free Software Foundation,
4537# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4538#
4539# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4540# or visit www.oracle.com if you need additional information or have any
4541# questions.
4542#
4543
4544################################################################################
4545# Setup alsa (Advanced Linux Sound Architecture)
4546################################################################################
4547
4548
4549#
4550# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4551# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4552#
4553# This code is free software; you can redistribute it and/or modify it
4554# under the terms of the GNU General Public License version 2 only, as
4555# published by the Free Software Foundation.  Oracle designates this
4556# particular file as subject to the "Classpath" exception as provided
4557# by Oracle in the LICENSE file that accompanied this code.
4558#
4559# This code is distributed in the hope that it will be useful, but WITHOUT
4560# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4561# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4562# version 2 for more details (a copy is included in the LICENSE file that
4563# accompanied this code).
4564#
4565# You should have received a copy of the GNU General Public License version
4566# 2 along with this work; if not, write to the Free Software Foundation,
4567# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4568#
4569# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4570# or visit www.oracle.com if you need additional information or have any
4571# questions.
4572#
4573
4574################################################################################
4575# Setup bundled libraries.
4576#
4577# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4578# OpenJDK repository. Default is to use these libraries as bundled, but they
4579# might be replaced by en external version by the user.
4580################################################################################
4581
4582
4583################################################################################
4584# Setup libjpeg
4585################################################################################
4586
4587
4588################################################################################
4589# Setup giflib
4590################################################################################
4591
4592
4593################################################################################
4594# Setup libpng
4595################################################################################
4596
4597
4598################################################################################
4599# Setup zlib
4600################################################################################
4601
4602
4603################################################################################
4604# Setup lcms (Little CMS)
4605################################################################################
4606
4607
4608#
4609# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4610# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4611#
4612# This code is free software; you can redistribute it and/or modify it
4613# under the terms of the GNU General Public License version 2 only, as
4614# published by the Free Software Foundation.  Oracle designates this
4615# particular file as subject to the "Classpath" exception as provided
4616# by Oracle in the LICENSE file that accompanied this code.
4617#
4618# This code is distributed in the hope that it will be useful, but WITHOUT
4619# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4620# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4621# version 2 for more details (a copy is included in the LICENSE file that
4622# accompanied this code).
4623#
4624# You should have received a copy of the GNU General Public License version
4625# 2 along with this work; if not, write to the Free Software Foundation,
4626# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4627#
4628# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4629# or visit www.oracle.com if you need additional information or have any
4630# questions.
4631#
4632
4633################################################################################
4634# Setup cups (Common Unix Printing System)
4635################################################################################
4636
4637
4638#
4639# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4640# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4641#
4642# This code is free software; you can redistribute it and/or modify it
4643# under the terms of the GNU General Public License version 2 only, as
4644# published by the Free Software Foundation.  Oracle designates this
4645# particular file as subject to the "Classpath" exception as provided
4646# by Oracle in the LICENSE file that accompanied this code.
4647#
4648# This code is distributed in the hope that it will be useful, but WITHOUT
4649# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4650# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4651# version 2 for more details (a copy is included in the LICENSE file that
4652# accompanied this code).
4653#
4654# You should have received a copy of the GNU General Public License version
4655# 2 along with this work; if not, write to the Free Software Foundation,
4656# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4657#
4658# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4659# or visit www.oracle.com if you need additional information or have any
4660# questions.
4661#
4662
4663################################################################################
4664# Setup libffi (Foreign Function Interface)
4665################################################################################
4666
4667
4668#
4669# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4670# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4671#
4672# This code is free software; you can redistribute it and/or modify it
4673# under the terms of the GNU General Public License version 2 only, as
4674# published by the Free Software Foundation.  Oracle designates this
4675# particular file as subject to the "Classpath" exception as provided
4676# by Oracle in the LICENSE file that accompanied this code.
4677#
4678# This code is distributed in the hope that it will be useful, but WITHOUT
4679# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4680# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4681# version 2 for more details (a copy is included in the LICENSE file that
4682# accompanied this code).
4683#
4684# You should have received a copy of the GNU General Public License version
4685# 2 along with this work; if not, write to the Free Software Foundation,
4686# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4687#
4688# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4689# or visit www.oracle.com if you need additional information or have any
4690# questions.
4691#
4692
4693################################################################################
4694# Build the freetype lib from source
4695################################################################################
4696
4697
4698################################################################################
4699# Check if a potential freeype library match is correct and usable
4700################################################################################
4701
4702
4703################################################################################
4704# Setup freetype (The FreeType2 font rendering library)
4705################################################################################
4706
4707
4708#
4709# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4710# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4711#
4712# This code is free software; you can redistribute it and/or modify it
4713# under the terms of the GNU General Public License version 2 only, as
4714# published by the Free Software Foundation.  Oracle designates this
4715# particular file as subject to the "Classpath" exception as provided
4716# by Oracle in the LICENSE file that accompanied this code.
4717#
4718# This code is distributed in the hope that it will be useful, but WITHOUT
4719# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4720# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4721# version 2 for more details (a copy is included in the LICENSE file that
4722# accompanied this code).
4723#
4724# You should have received a copy of the GNU General Public License version
4725# 2 along with this work; if not, write to the Free Software Foundation,
4726# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4727#
4728# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4729# or visit www.oracle.com if you need additional information or have any
4730# questions.
4731#
4732
4733################################################################################
4734# Setup the standard C/C++ runtime libraries.
4735#
4736# Most importantly, determine if stdc++ should be linked statically or
4737# dynamically.
4738################################################################################
4739
4740
4741#
4742# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4744#
4745# This code is free software; you can redistribute it and/or modify it
4746# under the terms of the GNU General Public License version 2 only, as
4747# published by the Free Software Foundation.  Oracle designates this
4748# particular file as subject to the "Classpath" exception as provided
4749# by Oracle in the LICENSE file that accompanied this code.
4750#
4751# This code is distributed in the hope that it will be useful, but WITHOUT
4752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4754# version 2 for more details (a copy is included in the LICENSE file that
4755# accompanied this code).
4756#
4757# You should have received a copy of the GNU General Public License version
4758# 2 along with this work; if not, write to the Free Software Foundation,
4759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4760#
4761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4762# or visit www.oracle.com if you need additional information or have any
4763# questions.
4764#
4765
4766################################################################################
4767# Setup X11 Windows system
4768################################################################################
4769
4770
4771
4772################################################################################
4773# Determine which libraries are needed for this configuration
4774################################################################################
4775
4776
4777################################################################################
4778# Parse library options, and setup needed libraries
4779################################################################################
4780
4781
4782################################################################################
4783# Setup llvm (Low-Level VM)
4784################################################################################
4785
4786
4787################################################################################
4788# Setup various libraries, typically small system libraries
4789################################################################################
4790
4791
4792################################################################################
4793# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4794# redistribute it in the test image.
4795################################################################################
4796
4797
4798
4799#
4800# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4801# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4802#
4803# This code is free software; you can redistribute it and/or modify it
4804# under the terms of the GNU General Public License version 2 only, as
4805# published by the Free Software Foundation.  Oracle designates this
4806# particular file as subject to the "Classpath" exception as provided
4807# by Oracle in the LICENSE file that accompanied this code.
4808#
4809# This code is distributed in the hope that it will be useful, but WITHOUT
4810# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4811# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4812# version 2 for more details (a copy is included in the LICENSE file that
4813# accompanied this code).
4814#
4815# You should have received a copy of the GNU General Public License version
4816# 2 along with this work; if not, write to the Free Software Foundation,
4817# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4818#
4819# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4820# or visit www.oracle.com if you need additional information or have any
4821# questions.
4822#
4823
4824# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4825# Converts autoconf style CPU name to OpenJDK style, into
4826# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4827
4828
4829# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4830# Converts autoconf style OS name to OpenJDK style, into
4831# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4832
4833
4834# Expects $host_os $host_cpu $build_os and $build_cpu
4835# and $with_target_bits to have been setup!
4836#
4837# Translate the standard triplet(quadruplet) definition
4838# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4839# OPENJDK_BUILD_OS, etc.
4840
4841
4842# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4843# accordingly. Must be done after setting up build and target system, but before
4844# doing anything else with these values.
4845
4846
4847# Setup the legacy variables, for controlling the old makefiles.
4848#
4849
4850
4851# $1 - Either TARGET or BUILD to setup the variables for.
4852
4853
4854
4855
4856#%%% Build and target systems %%%
4857
4858
4859
4860
4861# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4862# Add -mX to various FLAGS variables.
4863
4864
4865
4866
4867
4868
4869#
4870# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4871# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4872#
4873# This code is free software; you can redistribute it and/or modify it
4874# under the terms of the GNU General Public License version 2 only, as
4875# published by the Free Software Foundation.  Oracle designates this
4876# particular file as subject to the "Classpath" exception as provided
4877# by Oracle in the LICENSE file that accompanied this code.
4878#
4879# This code is distributed in the hope that it will be useful, but WITHOUT
4880# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4881# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4882# version 2 for more details (a copy is included in the LICENSE file that
4883# accompanied this code).
4884#
4885# You should have received a copy of the GNU General Public License version
4886# 2 along with this work; if not, write to the Free Software Foundation,
4887# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4888#
4889# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4890# or visit www.oracle.com if you need additional information or have any
4891# questions.
4892#
4893
4894
4895
4896
4897
4898
4899
4900################################################################################
4901# Define a mechanism for importing extra prebuilt modules
4902#
4903
4904
4905
4906#
4907# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4908# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4909#
4910# This code is free software; you can redistribute it and/or modify it
4911# under the terms of the GNU General Public License version 2 only, as
4912# published by the Free Software Foundation.  Oracle designates this
4913# particular file as subject to the "Classpath" exception as provided
4914# by Oracle in the LICENSE file that accompanied this code.
4915#
4916# This code is distributed in the hope that it will be useful, but WITHOUT
4917# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4918# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4919# version 2 for more details (a copy is included in the LICENSE file that
4920# accompanied this code).
4921#
4922# You should have received a copy of the GNU General Public License version
4923# 2 along with this work; if not, write to the Free Software Foundation,
4924# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4925#
4926# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4927# or visit www.oracle.com if you need additional information or have any
4928# questions.
4929#
4930
4931########################################################################
4932# This file is responsible for detecting, verifying and setting up the
4933# toolchain, i.e. the compiler, linker and related utilities. It will setup
4934# proper paths to the binaries, but it will not setup any flags.
4935#
4936# The binaries used is determined by the toolchain type, which is the family of
4937# compilers and related tools that are used.
4938########################################################################
4939
4940
4941# All valid toolchains, regardless of platform (used by help.m4)
4942VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4943
4944# These toolchains are valid on different platforms
4945VALID_TOOLCHAINS_linux="gcc clang"
4946VALID_TOOLCHAINS_solaris="solstudio"
4947VALID_TOOLCHAINS_macosx="gcc clang"
4948VALID_TOOLCHAINS_aix="xlc"
4949VALID_TOOLCHAINS_windows="microsoft"
4950
4951# Toolchain descriptions
4952TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4953TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4954TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4955TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4956TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4957
4958# Minimum supported versions, empty means unspecified
4959TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4960TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4961TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4962TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4963TOOLCHAIN_MINIMUM_VERSION_xlc=""
4964
4965# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4966# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4967# $1 - optional variable prefix for compiler and version variables (BUILD_)
4968# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4969
4970
4971# Check if the configured compiler (C and C++) is of a specific version or
4972# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4973#
4974# Arguments:
4975#   VERSION:   The version string to check against the found version
4976#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4977#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4978#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4979
4980
4981
4982
4983# Setup a number of variables describing how native output files are
4984# named on this platform/toolchain.
4985
4986
4987# Determine which toolchain type to use, and make sure it is valid for this
4988# platform. Setup various information about the selected toolchain.
4989
4990
4991# Before we start detecting the toolchain executables, we might need some
4992# special setup, e.g. additional paths etc.
4993
4994
4995# Restore path, etc
4996
4997
4998# Check if a compiler is of the toolchain type we expect, and save the version
4999# information from it. If the compiler does not match the expected type,
5000# this function will abort using AC_MSG_ERROR. If it matches, the version will
5001# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5002# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5003#
5004# $1 = compiler to test (CC or CXX)
5005# $2 = human readable name of compiler (C or C++)
5006
5007
5008# Try to locate the given C or C++ compiler in the path, or otherwise.
5009#
5010# $1 = compiler to test (CC or CXX)
5011# $2 = human readable name of compiler (C or C++)
5012# $3 = compiler name to search for
5013
5014
5015# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5016# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5017# archiver (AR). Verify that the compilers are correct according to the
5018# toolchain type.
5019
5020
5021# Setup additional tools that is considered a part of the toolchain, but not the
5022# core part. Many of these are highly platform-specific and do not exist,
5023# and/or are not needed on all platforms.
5024
5025
5026# Setup the build tools (i.e, the compiler and linker used to build programs
5027# that should be run on the build platform, not the target platform, as a build
5028# helper). Since the non-cross-compile case uses the normal, target compilers
5029# for this, we can only do this after these have been setup.
5030
5031
5032# Do some additional checks on the detected tools.
5033
5034
5035# Setup the JTReg Regression Test Harness.
5036
5037
5038# Setup the JIB dependency resolver
5039
5040
5041#
5042# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5043# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5044#
5045# This code is free software; you can redistribute it and/or modify it
5046# under the terms of the GNU General Public License version 2 only, as
5047# published by the Free Software Foundation.  Oracle designates this
5048# particular file as subject to the "Classpath" exception as provided
5049# by Oracle in the LICENSE file that accompanied this code.
5050#
5051# This code is distributed in the hope that it will be useful, but WITHOUT
5052# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5053# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5054# version 2 for more details (a copy is included in the LICENSE file that
5055# accompanied this code).
5056#
5057# You should have received a copy of the GNU General Public License version
5058# 2 along with this work; if not, write to the Free Software Foundation,
5059# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5060#
5061# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5062# or visit www.oracle.com if you need additional information or have any
5063# questions.
5064#
5065
5066################################################################################
5067# The order of these defines the priority by which we try to find them.
5068VALID_VS_VERSIONS="2013 2012 2010"
5069
5070VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5071VS_VERSION_INTERNAL_2010=100
5072VS_MSVCR_2010=msvcr100.dll
5073# We don't use msvcp on Visual Studio 2010
5074#VS_MSVCP_2010=msvcp100.dll
5075VS_ENVVAR_2010="VS100COMNTOOLS"
5076VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5077VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5078VS_VS_PLATFORM_NAME_2010="v100"
5079VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5080
5081VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5082VS_VERSION_INTERNAL_2012=110
5083VS_MSVCR_2012=msvcr110.dll
5084VS_MSVCP_2012=msvcp110.dll
5085VS_ENVVAR_2012="VS110COMNTOOLS"
5086VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5087VS_SDK_INSTALLDIR_2012=
5088VS_VS_PLATFORM_NAME_2012="v110"
5089VS_SDK_PLATFORM_NAME_2012=
5090
5091VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5092VS_VERSION_INTERNAL_2013=120
5093VS_MSVCR_2013=msvcr120.dll
5094VS_MSVCP_2013=msvcp120.dll
5095VS_ENVVAR_2013="VS120COMNTOOLS"
5096VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5097VS_SDK_INSTALLDIR_2013=
5098VS_VS_PLATFORM_NAME_2013="v120"
5099VS_SDK_PLATFORM_NAME_2013=
5100
5101################################################################################
5102
5103
5104
5105################################################################################
5106
5107
5108
5109################################################################################
5110# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5111# build environment and assigns it to VS_ENV_CMD
5112
5113
5114################################################################################
5115
5116
5117
5118################################################################################
5119# Check if the VS env variables were setup prior to running configure.
5120# If not, then find vcvarsall.bat and run it automatically, and integrate
5121# the set env variables into the spec file.
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136# This line needs to be here, verbatim, after all includes and the dummy hook
5137# definitions. It is replaced with custom functionality when building
5138# custom sources.
5139#CUSTOM_AUTOCONF_INCLUDE
5140
5141# Do not change or remove the following line, it is needed for consistency checks:
5142DATE_WHEN_GENERATED=1491509917
5143
5144###############################################################################
5145#
5146# Initialization / Boot-strapping
5147#
5148# The bootstrapping process needs to solve the "chicken or the egg" problem,
5149# thus it jumps back and forth, each time gaining something needed later on.
5150#
5151###############################################################################
5152
5153# If we are requested to print additional help, do that and then exit.
5154# This must be the very first call.
5155
5156  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5157
5158    # Print available toolchains
5159    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5160    $PRINTF "Which are valid to use depends on the build platform.\n"
5161    for toolchain in $VALID_TOOLCHAINS_all; do
5162      # Use indirect variable referencing
5163      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5164      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5165      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5166    done
5167    $PRINTF "\n"
5168
5169    # Print available jvm features
5170    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5171    $PRINTF "Which are valid to use depends on the target platform.\n  "
5172    $PRINTF "%s " $VALID_JVM_FEATURES
5173    $PRINTF "\n"
5174
5175    # And now exit directly
5176    exit 0
5177  fi
5178
5179
5180# Basic initialization that must happen first of all in the normal process.
5181
5182  # Save the original command line. This is passed to us by the wrapper configure script.
5183
5184  # Save the path variable before it gets changed
5185  ORIGINAL_PATH="$PATH"
5186
5187  DATE_WHEN_CONFIGURED=`LANG=C date`
5188
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5190$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5191  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5192$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5193
5194
5195  # Start with tools that do not need have cross compilation support
5196  # and can be expected to be found in the default PATH. These tools are
5197  # used by configure.
5198
5199  # First are all the simple required tools.
5200
5201
5202
5203  # Publish this variable in the help.
5204
5205
5206  if [ -z "${BASENAME+x}" ]; then
5207    # The variable is not set by user, try to locate tool using the code snippet
5208    for ac_prog in basename
5209do
5210  # Extract the first word of "$ac_prog", so it can be a program name with args.
5211set dummy $ac_prog; ac_word=$2
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213$as_echo_n "checking for $ac_word... " >&6; }
5214if ${ac_cv_path_BASENAME+:} false; then :
5215  $as_echo_n "(cached) " >&6
5216else
5217  case $BASENAME in
5218  [\\/]* | ?:[\\/]*)
5219  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5220  ;;
5221  *)
5222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225  IFS=$as_save_IFS
5226  test -z "$as_dir" && as_dir=.
5227    for ac_exec_ext in '' $ac_executable_extensions; do
5228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5229    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231    break 2
5232  fi
5233done
5234  done
5235IFS=$as_save_IFS
5236
5237  ;;
5238esac
5239fi
5240BASENAME=$ac_cv_path_BASENAME
5241if test -n "$BASENAME"; then
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5243$as_echo "$BASENAME" >&6; }
5244else
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250  test -n "$BASENAME" && break
5251done
5252
5253  else
5254    # The variable is set, but is it from the command line or the environment?
5255
5256    # Try to remove the string !BASENAME! from our list.
5257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5259      # If it failed, the variable was not from the command line. Ignore it,
5260      # but warn the user (except for BASH, which is always set by the calling BASH).
5261      if test "xBASENAME" != xBASH; then
5262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5263$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5264      fi
5265      # Try to locate tool using the code snippet
5266      for ac_prog in basename
5267do
5268  # Extract the first word of "$ac_prog", so it can be a program name with args.
5269set dummy $ac_prog; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
5272if ${ac_cv_path_BASENAME+:} false; then :
5273  $as_echo_n "(cached) " >&6
5274else
5275  case $BASENAME in
5276  [\\/]* | ?:[\\/]*)
5277  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5278  ;;
5279  *)
5280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5281for as_dir in $PATH
5282do
5283  IFS=$as_save_IFS
5284  test -z "$as_dir" && as_dir=.
5285    for ac_exec_ext in '' $ac_executable_extensions; do
5286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5287    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5289    break 2
5290  fi
5291done
5292  done
5293IFS=$as_save_IFS
5294
5295  ;;
5296esac
5297fi
5298BASENAME=$ac_cv_path_BASENAME
5299if test -n "$BASENAME"; then
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5301$as_echo "$BASENAME" >&6; }
5302else
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304$as_echo "no" >&6; }
5305fi
5306
5307
5308  test -n "$BASENAME" && break
5309done
5310
5311    else
5312      # If it succeeded, then it was overridden by the user. We will use it
5313      # for the tool.
5314
5315      # First remove it from the list of overridden variables, so we can test
5316      # for unknown variables in the end.
5317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5318
5319      # Check if we try to supply an empty value
5320      if test "x$BASENAME" = x; then
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5322$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5324$as_echo_n "checking for BASENAME... " >&6; }
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5326$as_echo "disabled" >&6; }
5327      else
5328        # Check if the provided tool contains a complete path.
5329        tool_specified="$BASENAME"
5330        tool_basename="${tool_specified##*/}"
5331        if test "x$tool_basename" = "x$tool_specified"; then
5332          # A command without a complete path is provided, search $PATH.
5333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5334$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5335          # Extract the first word of "$tool_basename", so it can be a program name with args.
5336set dummy $tool_basename; ac_word=$2
5337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5338$as_echo_n "checking for $ac_word... " >&6; }
5339if ${ac_cv_path_BASENAME+:} false; then :
5340  $as_echo_n "(cached) " >&6
5341else
5342  case $BASENAME in
5343  [\\/]* | ?:[\\/]*)
5344  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5345  ;;
5346  *)
5347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5348for as_dir in $PATH
5349do
5350  IFS=$as_save_IFS
5351  test -z "$as_dir" && as_dir=.
5352    for ac_exec_ext in '' $ac_executable_extensions; do
5353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5354    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5356    break 2
5357  fi
5358done
5359  done
5360IFS=$as_save_IFS
5361
5362  ;;
5363esac
5364fi
5365BASENAME=$ac_cv_path_BASENAME
5366if test -n "$BASENAME"; then
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5368$as_echo "$BASENAME" >&6; }
5369else
5370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5371$as_echo "no" >&6; }
5372fi
5373
5374
5375          if test "x$BASENAME" = x; then
5376            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5377          fi
5378        else
5379          # Otherwise we believe it is a complete path. Use it as it is.
5380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5381$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5383$as_echo_n "checking for BASENAME... " >&6; }
5384          if test ! -x "$tool_specified"; then
5385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5386$as_echo "not found" >&6; }
5387            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5388          fi
5389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5390$as_echo "$tool_specified" >&6; }
5391        fi
5392      fi
5393    fi
5394
5395  fi
5396
5397
5398
5399  if test "x$BASENAME" = x; then
5400    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5401  fi
5402
5403
5404
5405
5406
5407  # Publish this variable in the help.
5408
5409
5410  if [ -z "${BASH+x}" ]; then
5411    # The variable is not set by user, try to locate tool using the code snippet
5412    for ac_prog in bash
5413do
5414  # Extract the first word of "$ac_prog", so it can be a program name with args.
5415set dummy $ac_prog; ac_word=$2
5416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5417$as_echo_n "checking for $ac_word... " >&6; }
5418if ${ac_cv_path_BASH+:} false; then :
5419  $as_echo_n "(cached) " >&6
5420else
5421  case $BASH in
5422  [\\/]* | ?:[\\/]*)
5423  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5424  ;;
5425  *)
5426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5427for as_dir in $PATH
5428do
5429  IFS=$as_save_IFS
5430  test -z "$as_dir" && as_dir=.
5431    for ac_exec_ext in '' $ac_executable_extensions; do
5432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5433    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5435    break 2
5436  fi
5437done
5438  done
5439IFS=$as_save_IFS
5440
5441  ;;
5442esac
5443fi
5444BASH=$ac_cv_path_BASH
5445if test -n "$BASH"; then
5446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5447$as_echo "$BASH" >&6; }
5448else
5449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5450$as_echo "no" >&6; }
5451fi
5452
5453
5454  test -n "$BASH" && break
5455done
5456
5457  else
5458    # The variable is set, but is it from the command line or the environment?
5459
5460    # Try to remove the string !BASH! from our list.
5461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5463      # If it failed, the variable was not from the command line. Ignore it,
5464      # but warn the user (except for BASH, which is always set by the calling BASH).
5465      if test "xBASH" != xBASH; then
5466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5467$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5468      fi
5469      # Try to locate tool using the code snippet
5470      for ac_prog in bash
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if ${ac_cv_path_BASH+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $BASH in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502BASH=$ac_cv_path_BASH
5503if test -n "$BASH"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5505$as_echo "$BASH" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$BASH" && break
5513done
5514
5515    else
5516      # If it succeeded, then it was overridden by the user. We will use it
5517      # for the tool.
5518
5519      # First remove it from the list of overridden variables, so we can test
5520      # for unknown variables in the end.
5521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5522
5523      # Check if we try to supply an empty value
5524      if test "x$BASH" = x; then
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5526$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5528$as_echo_n "checking for BASH... " >&6; }
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5530$as_echo "disabled" >&6; }
5531      else
5532        # Check if the provided tool contains a complete path.
5533        tool_specified="$BASH"
5534        tool_basename="${tool_specified##*/}"
5535        if test "x$tool_basename" = "x$tool_specified"; then
5536          # A command without a complete path is provided, search $PATH.
5537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5538$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5539          # Extract the first word of "$tool_basename", so it can be a program name with args.
5540set dummy $tool_basename; ac_word=$2
5541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5542$as_echo_n "checking for $ac_word... " >&6; }
5543if ${ac_cv_path_BASH+:} false; then :
5544  $as_echo_n "(cached) " >&6
5545else
5546  case $BASH in
5547  [\\/]* | ?:[\\/]*)
5548  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5549  ;;
5550  *)
5551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5552for as_dir in $PATH
5553do
5554  IFS=$as_save_IFS
5555  test -z "$as_dir" && as_dir=.
5556    for ac_exec_ext in '' $ac_executable_extensions; do
5557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5558    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5560    break 2
5561  fi
5562done
5563  done
5564IFS=$as_save_IFS
5565
5566  ;;
5567esac
5568fi
5569BASH=$ac_cv_path_BASH
5570if test -n "$BASH"; then
5571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5572$as_echo "$BASH" >&6; }
5573else
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575$as_echo "no" >&6; }
5576fi
5577
5578
5579          if test "x$BASH" = x; then
5580            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5581          fi
5582        else
5583          # Otherwise we believe it is a complete path. Use it as it is.
5584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5585$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5587$as_echo_n "checking for BASH... " >&6; }
5588          if test ! -x "$tool_specified"; then
5589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5590$as_echo "not found" >&6; }
5591            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5592          fi
5593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5594$as_echo "$tool_specified" >&6; }
5595        fi
5596      fi
5597    fi
5598
5599  fi
5600
5601
5602
5603  if test "x$BASH" = x; then
5604    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5605  fi
5606
5607
5608
5609
5610
5611  # Publish this variable in the help.
5612
5613
5614  if [ -z "${CAT+x}" ]; then
5615    # The variable is not set by user, try to locate tool using the code snippet
5616    for ac_prog in cat
5617do
5618  # Extract the first word of "$ac_prog", so it can be a program name with args.
5619set dummy $ac_prog; ac_word=$2
5620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5621$as_echo_n "checking for $ac_word... " >&6; }
5622if ${ac_cv_path_CAT+:} false; then :
5623  $as_echo_n "(cached) " >&6
5624else
5625  case $CAT in
5626  [\\/]* | ?:[\\/]*)
5627  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5628  ;;
5629  *)
5630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5631for as_dir in $PATH
5632do
5633  IFS=$as_save_IFS
5634  test -z "$as_dir" && as_dir=.
5635    for ac_exec_ext in '' $ac_executable_extensions; do
5636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5637    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5639    break 2
5640  fi
5641done
5642  done
5643IFS=$as_save_IFS
5644
5645  ;;
5646esac
5647fi
5648CAT=$ac_cv_path_CAT
5649if test -n "$CAT"; then
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5651$as_echo "$CAT" >&6; }
5652else
5653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5654$as_echo "no" >&6; }
5655fi
5656
5657
5658  test -n "$CAT" && break
5659done
5660
5661  else
5662    # The variable is set, but is it from the command line or the environment?
5663
5664    # Try to remove the string !CAT! from our list.
5665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5667      # If it failed, the variable was not from the command line. Ignore it,
5668      # but warn the user (except for BASH, which is always set by the calling BASH).
5669      if test "xCAT" != xBASH; then
5670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5671$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5672      fi
5673      # Try to locate tool using the code snippet
5674      for ac_prog in cat
5675do
5676  # Extract the first word of "$ac_prog", so it can be a program name with args.
5677set dummy $ac_prog; ac_word=$2
5678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5679$as_echo_n "checking for $ac_word... " >&6; }
5680if ${ac_cv_path_CAT+:} false; then :
5681  $as_echo_n "(cached) " >&6
5682else
5683  case $CAT in
5684  [\\/]* | ?:[\\/]*)
5685  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5686  ;;
5687  *)
5688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5689for as_dir in $PATH
5690do
5691  IFS=$as_save_IFS
5692  test -z "$as_dir" && as_dir=.
5693    for ac_exec_ext in '' $ac_executable_extensions; do
5694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5695    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5697    break 2
5698  fi
5699done
5700  done
5701IFS=$as_save_IFS
5702
5703  ;;
5704esac
5705fi
5706CAT=$ac_cv_path_CAT
5707if test -n "$CAT"; then
5708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5709$as_echo "$CAT" >&6; }
5710else
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712$as_echo "no" >&6; }
5713fi
5714
5715
5716  test -n "$CAT" && break
5717done
5718
5719    else
5720      # If it succeeded, then it was overridden by the user. We will use it
5721      # for the tool.
5722
5723      # First remove it from the list of overridden variables, so we can test
5724      # for unknown variables in the end.
5725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5726
5727      # Check if we try to supply an empty value
5728      if test "x$CAT" = x; then
5729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5730$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5732$as_echo_n "checking for CAT... " >&6; }
5733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5734$as_echo "disabled" >&6; }
5735      else
5736        # Check if the provided tool contains a complete path.
5737        tool_specified="$CAT"
5738        tool_basename="${tool_specified##*/}"
5739        if test "x$tool_basename" = "x$tool_specified"; then
5740          # A command without a complete path is provided, search $PATH.
5741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5742$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5743          # Extract the first word of "$tool_basename", so it can be a program name with args.
5744set dummy $tool_basename; ac_word=$2
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746$as_echo_n "checking for $ac_word... " >&6; }
5747if ${ac_cv_path_CAT+:} false; then :
5748  $as_echo_n "(cached) " >&6
5749else
5750  case $CAT in
5751  [\\/]* | ?:[\\/]*)
5752  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5753  ;;
5754  *)
5755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758  IFS=$as_save_IFS
5759  test -z "$as_dir" && as_dir=.
5760    for ac_exec_ext in '' $ac_executable_extensions; do
5761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764    break 2
5765  fi
5766done
5767  done
5768IFS=$as_save_IFS
5769
5770  ;;
5771esac
5772fi
5773CAT=$ac_cv_path_CAT
5774if test -n "$CAT"; then
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5776$as_echo "$CAT" >&6; }
5777else
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
5780fi
5781
5782
5783          if test "x$CAT" = x; then
5784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5785          fi
5786        else
5787          # Otherwise we believe it is a complete path. Use it as it is.
5788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5789$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5791$as_echo_n "checking for CAT... " >&6; }
5792          if test ! -x "$tool_specified"; then
5793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5794$as_echo "not found" >&6; }
5795            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5796          fi
5797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5798$as_echo "$tool_specified" >&6; }
5799        fi
5800      fi
5801    fi
5802
5803  fi
5804
5805
5806
5807  if test "x$CAT" = x; then
5808    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5809  fi
5810
5811
5812
5813
5814
5815  # Publish this variable in the help.
5816
5817
5818  if [ -z "${CHMOD+x}" ]; then
5819    # The variable is not set by user, try to locate tool using the code snippet
5820    for ac_prog in chmod
5821do
5822  # Extract the first word of "$ac_prog", so it can be a program name with args.
5823set dummy $ac_prog; ac_word=$2
5824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5825$as_echo_n "checking for $ac_word... " >&6; }
5826if ${ac_cv_path_CHMOD+:} false; then :
5827  $as_echo_n "(cached) " >&6
5828else
5829  case $CHMOD in
5830  [\\/]* | ?:[\\/]*)
5831  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5832  ;;
5833  *)
5834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835for as_dir in $PATH
5836do
5837  IFS=$as_save_IFS
5838  test -z "$as_dir" && as_dir=.
5839    for ac_exec_ext in '' $ac_executable_extensions; do
5840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5841    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5843    break 2
5844  fi
5845done
5846  done
5847IFS=$as_save_IFS
5848
5849  ;;
5850esac
5851fi
5852CHMOD=$ac_cv_path_CHMOD
5853if test -n "$CHMOD"; then
5854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5855$as_echo "$CHMOD" >&6; }
5856else
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5858$as_echo "no" >&6; }
5859fi
5860
5861
5862  test -n "$CHMOD" && break
5863done
5864
5865  else
5866    # The variable is set, but is it from the command line or the environment?
5867
5868    # Try to remove the string !CHMOD! from our list.
5869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5871      # If it failed, the variable was not from the command line. Ignore it,
5872      # but warn the user (except for BASH, which is always set by the calling BASH).
5873      if test "xCHMOD" != xBASH; then
5874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5875$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5876      fi
5877      # Try to locate tool using the code snippet
5878      for ac_prog in chmod
5879do
5880  # Extract the first word of "$ac_prog", so it can be a program name with args.
5881set dummy $ac_prog; ac_word=$2
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5883$as_echo_n "checking for $ac_word... " >&6; }
5884if ${ac_cv_path_CHMOD+:} false; then :
5885  $as_echo_n "(cached) " >&6
5886else
5887  case $CHMOD in
5888  [\\/]* | ?:[\\/]*)
5889  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5890  ;;
5891  *)
5892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5893for as_dir in $PATH
5894do
5895  IFS=$as_save_IFS
5896  test -z "$as_dir" && as_dir=.
5897    for ac_exec_ext in '' $ac_executable_extensions; do
5898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5899    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5901    break 2
5902  fi
5903done
5904  done
5905IFS=$as_save_IFS
5906
5907  ;;
5908esac
5909fi
5910CHMOD=$ac_cv_path_CHMOD
5911if test -n "$CHMOD"; then
5912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5913$as_echo "$CHMOD" >&6; }
5914else
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916$as_echo "no" >&6; }
5917fi
5918
5919
5920  test -n "$CHMOD" && break
5921done
5922
5923    else
5924      # If it succeeded, then it was overridden by the user. We will use it
5925      # for the tool.
5926
5927      # First remove it from the list of overridden variables, so we can test
5928      # for unknown variables in the end.
5929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5930
5931      # Check if we try to supply an empty value
5932      if test "x$CHMOD" = x; then
5933        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5934$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5936$as_echo_n "checking for CHMOD... " >&6; }
5937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5938$as_echo "disabled" >&6; }
5939      else
5940        # Check if the provided tool contains a complete path.
5941        tool_specified="$CHMOD"
5942        tool_basename="${tool_specified##*/}"
5943        if test "x$tool_basename" = "x$tool_specified"; then
5944          # A command without a complete path is provided, search $PATH.
5945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5946$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5947          # Extract the first word of "$tool_basename", so it can be a program name with args.
5948set dummy $tool_basename; ac_word=$2
5949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5950$as_echo_n "checking for $ac_word... " >&6; }
5951if ${ac_cv_path_CHMOD+:} false; then :
5952  $as_echo_n "(cached) " >&6
5953else
5954  case $CHMOD in
5955  [\\/]* | ?:[\\/]*)
5956  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5957  ;;
5958  *)
5959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5960for as_dir in $PATH
5961do
5962  IFS=$as_save_IFS
5963  test -z "$as_dir" && as_dir=.
5964    for ac_exec_ext in '' $ac_executable_extensions; do
5965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5966    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5968    break 2
5969  fi
5970done
5971  done
5972IFS=$as_save_IFS
5973
5974  ;;
5975esac
5976fi
5977CHMOD=$ac_cv_path_CHMOD
5978if test -n "$CHMOD"; then
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5980$as_echo "$CHMOD" >&6; }
5981else
5982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5983$as_echo "no" >&6; }
5984fi
5985
5986
5987          if test "x$CHMOD" = x; then
5988            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5989          fi
5990        else
5991          # Otherwise we believe it is a complete path. Use it as it is.
5992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5993$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5994          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5995$as_echo_n "checking for CHMOD... " >&6; }
5996          if test ! -x "$tool_specified"; then
5997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5998$as_echo "not found" >&6; }
5999            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6000          fi
6001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6002$as_echo "$tool_specified" >&6; }
6003        fi
6004      fi
6005    fi
6006
6007  fi
6008
6009
6010
6011  if test "x$CHMOD" = x; then
6012    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6013  fi
6014
6015
6016
6017
6018
6019  # Publish this variable in the help.
6020
6021
6022  if [ -z "${CMP+x}" ]; then
6023    # The variable is not set by user, try to locate tool using the code snippet
6024    for ac_prog in cmp
6025do
6026  # Extract the first word of "$ac_prog", so it can be a program name with args.
6027set dummy $ac_prog; ac_word=$2
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6029$as_echo_n "checking for $ac_word... " >&6; }
6030if ${ac_cv_path_CMP+:} false; then :
6031  $as_echo_n "(cached) " >&6
6032else
6033  case $CMP in
6034  [\\/]* | ?:[\\/]*)
6035  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6036  ;;
6037  *)
6038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041  IFS=$as_save_IFS
6042  test -z "$as_dir" && as_dir=.
6043    for ac_exec_ext in '' $ac_executable_extensions; do
6044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6045    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6047    break 2
6048  fi
6049done
6050  done
6051IFS=$as_save_IFS
6052
6053  ;;
6054esac
6055fi
6056CMP=$ac_cv_path_CMP
6057if test -n "$CMP"; then
6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6059$as_echo "$CMP" >&6; }
6060else
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6062$as_echo "no" >&6; }
6063fi
6064
6065
6066  test -n "$CMP" && break
6067done
6068
6069  else
6070    # The variable is set, but is it from the command line or the environment?
6071
6072    # Try to remove the string !CMP! from our list.
6073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6075      # If it failed, the variable was not from the command line. Ignore it,
6076      # but warn the user (except for BASH, which is always set by the calling BASH).
6077      if test "xCMP" != xBASH; then
6078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6079$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6080      fi
6081      # Try to locate tool using the code snippet
6082      for ac_prog in cmp
6083do
6084  # Extract the first word of "$ac_prog", so it can be a program name with args.
6085set dummy $ac_prog; ac_word=$2
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6087$as_echo_n "checking for $ac_word... " >&6; }
6088if ${ac_cv_path_CMP+:} false; then :
6089  $as_echo_n "(cached) " >&6
6090else
6091  case $CMP in
6092  [\\/]* | ?:[\\/]*)
6093  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6094  ;;
6095  *)
6096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6097for as_dir in $PATH
6098do
6099  IFS=$as_save_IFS
6100  test -z "$as_dir" && as_dir=.
6101    for ac_exec_ext in '' $ac_executable_extensions; do
6102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6103    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6105    break 2
6106  fi
6107done
6108  done
6109IFS=$as_save_IFS
6110
6111  ;;
6112esac
6113fi
6114CMP=$ac_cv_path_CMP
6115if test -n "$CMP"; then
6116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6117$as_echo "$CMP" >&6; }
6118else
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
6121fi
6122
6123
6124  test -n "$CMP" && break
6125done
6126
6127    else
6128      # If it succeeded, then it was overridden by the user. We will use it
6129      # for the tool.
6130
6131      # First remove it from the list of overridden variables, so we can test
6132      # for unknown variables in the end.
6133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6134
6135      # Check if we try to supply an empty value
6136      if test "x$CMP" = x; then
6137        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6138$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6140$as_echo_n "checking for CMP... " >&6; }
6141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6142$as_echo "disabled" >&6; }
6143      else
6144        # Check if the provided tool contains a complete path.
6145        tool_specified="$CMP"
6146        tool_basename="${tool_specified##*/}"
6147        if test "x$tool_basename" = "x$tool_specified"; then
6148          # A command without a complete path is provided, search $PATH.
6149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6150$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6151          # Extract the first word of "$tool_basename", so it can be a program name with args.
6152set dummy $tool_basename; ac_word=$2
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6154$as_echo_n "checking for $ac_word... " >&6; }
6155if ${ac_cv_path_CMP+:} false; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  case $CMP in
6159  [\\/]* | ?:[\\/]*)
6160  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6161  ;;
6162  *)
6163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6164for as_dir in $PATH
6165do
6166  IFS=$as_save_IFS
6167  test -z "$as_dir" && as_dir=.
6168    for ac_exec_ext in '' $ac_executable_extensions; do
6169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6170    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6172    break 2
6173  fi
6174done
6175  done
6176IFS=$as_save_IFS
6177
6178  ;;
6179esac
6180fi
6181CMP=$ac_cv_path_CMP
6182if test -n "$CMP"; then
6183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6184$as_echo "$CMP" >&6; }
6185else
6186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
6188fi
6189
6190
6191          if test "x$CMP" = x; then
6192            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6193          fi
6194        else
6195          # Otherwise we believe it is a complete path. Use it as it is.
6196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6197$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6198          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6199$as_echo_n "checking for CMP... " >&6; }
6200          if test ! -x "$tool_specified"; then
6201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6202$as_echo "not found" >&6; }
6203            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6204          fi
6205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6206$as_echo "$tool_specified" >&6; }
6207        fi
6208      fi
6209    fi
6210
6211  fi
6212
6213
6214
6215  if test "x$CMP" = x; then
6216    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6217  fi
6218
6219
6220
6221
6222
6223  # Publish this variable in the help.
6224
6225
6226  if [ -z "${COMM+x}" ]; then
6227    # The variable is not set by user, try to locate tool using the code snippet
6228    for ac_prog in comm
6229do
6230  # Extract the first word of "$ac_prog", so it can be a program name with args.
6231set dummy $ac_prog; ac_word=$2
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6233$as_echo_n "checking for $ac_word... " >&6; }
6234if ${ac_cv_path_COMM+:} false; then :
6235  $as_echo_n "(cached) " >&6
6236else
6237  case $COMM in
6238  [\\/]* | ?:[\\/]*)
6239  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6240  ;;
6241  *)
6242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6243for as_dir in $PATH
6244do
6245  IFS=$as_save_IFS
6246  test -z "$as_dir" && as_dir=.
6247    for ac_exec_ext in '' $ac_executable_extensions; do
6248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6249    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6251    break 2
6252  fi
6253done
6254  done
6255IFS=$as_save_IFS
6256
6257  ;;
6258esac
6259fi
6260COMM=$ac_cv_path_COMM
6261if test -n "$COMM"; then
6262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6263$as_echo "$COMM" >&6; }
6264else
6265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6266$as_echo "no" >&6; }
6267fi
6268
6269
6270  test -n "$COMM" && break
6271done
6272
6273  else
6274    # The variable is set, but is it from the command line or the environment?
6275
6276    # Try to remove the string !COMM! from our list.
6277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6279      # If it failed, the variable was not from the command line. Ignore it,
6280      # but warn the user (except for BASH, which is always set by the calling BASH).
6281      if test "xCOMM" != xBASH; then
6282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6283$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6284      fi
6285      # Try to locate tool using the code snippet
6286      for ac_prog in comm
6287do
6288  # Extract the first word of "$ac_prog", so it can be a program name with args.
6289set dummy $ac_prog; ac_word=$2
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291$as_echo_n "checking for $ac_word... " >&6; }
6292if ${ac_cv_path_COMM+:} false; then :
6293  $as_echo_n "(cached) " >&6
6294else
6295  case $COMM in
6296  [\\/]* | ?:[\\/]*)
6297  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6298  ;;
6299  *)
6300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303  IFS=$as_save_IFS
6304  test -z "$as_dir" && as_dir=.
6305    for ac_exec_ext in '' $ac_executable_extensions; do
6306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6307    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6309    break 2
6310  fi
6311done
6312  done
6313IFS=$as_save_IFS
6314
6315  ;;
6316esac
6317fi
6318COMM=$ac_cv_path_COMM
6319if test -n "$COMM"; then
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6321$as_echo "$COMM" >&6; }
6322else
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6324$as_echo "no" >&6; }
6325fi
6326
6327
6328  test -n "$COMM" && break
6329done
6330
6331    else
6332      # If it succeeded, then it was overridden by the user. We will use it
6333      # for the tool.
6334
6335      # First remove it from the list of overridden variables, so we can test
6336      # for unknown variables in the end.
6337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6338
6339      # Check if we try to supply an empty value
6340      if test "x$COMM" = x; then
6341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6342$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6344$as_echo_n "checking for COMM... " >&6; }
6345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6346$as_echo "disabled" >&6; }
6347      else
6348        # Check if the provided tool contains a complete path.
6349        tool_specified="$COMM"
6350        tool_basename="${tool_specified##*/}"
6351        if test "x$tool_basename" = "x$tool_specified"; then
6352          # A command without a complete path is provided, search $PATH.
6353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6354$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6355          # Extract the first word of "$tool_basename", so it can be a program name with args.
6356set dummy $tool_basename; ac_word=$2
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6358$as_echo_n "checking for $ac_word... " >&6; }
6359if ${ac_cv_path_COMM+:} false; then :
6360  $as_echo_n "(cached) " >&6
6361else
6362  case $COMM in
6363  [\\/]* | ?:[\\/]*)
6364  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6365  ;;
6366  *)
6367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368for as_dir in $PATH
6369do
6370  IFS=$as_save_IFS
6371  test -z "$as_dir" && as_dir=.
6372    for ac_exec_ext in '' $ac_executable_extensions; do
6373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6374    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376    break 2
6377  fi
6378done
6379  done
6380IFS=$as_save_IFS
6381
6382  ;;
6383esac
6384fi
6385COMM=$ac_cv_path_COMM
6386if test -n "$COMM"; then
6387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6388$as_echo "$COMM" >&6; }
6389else
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394
6395          if test "x$COMM" = x; then
6396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6397          fi
6398        else
6399          # Otherwise we believe it is a complete path. Use it as it is.
6400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6401$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6403$as_echo_n "checking for COMM... " >&6; }
6404          if test ! -x "$tool_specified"; then
6405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6406$as_echo "not found" >&6; }
6407            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6408          fi
6409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6410$as_echo "$tool_specified" >&6; }
6411        fi
6412      fi
6413    fi
6414
6415  fi
6416
6417
6418
6419  if test "x$COMM" = x; then
6420    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6421  fi
6422
6423
6424
6425
6426
6427  # Publish this variable in the help.
6428
6429
6430  if [ -z "${CP+x}" ]; then
6431    # The variable is not set by user, try to locate tool using the code snippet
6432    for ac_prog in cp
6433do
6434  # Extract the first word of "$ac_prog", so it can be a program name with args.
6435set dummy $ac_prog; ac_word=$2
6436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6437$as_echo_n "checking for $ac_word... " >&6; }
6438if ${ac_cv_path_CP+:} false; then :
6439  $as_echo_n "(cached) " >&6
6440else
6441  case $CP in
6442  [\\/]* | ?:[\\/]*)
6443  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6444  ;;
6445  *)
6446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447for as_dir in $PATH
6448do
6449  IFS=$as_save_IFS
6450  test -z "$as_dir" && as_dir=.
6451    for ac_exec_ext in '' $ac_executable_extensions; do
6452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6453    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6455    break 2
6456  fi
6457done
6458  done
6459IFS=$as_save_IFS
6460
6461  ;;
6462esac
6463fi
6464CP=$ac_cv_path_CP
6465if test -n "$CP"; then
6466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6467$as_echo "$CP" >&6; }
6468else
6469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471fi
6472
6473
6474  test -n "$CP" && break
6475done
6476
6477  else
6478    # The variable is set, but is it from the command line or the environment?
6479
6480    # Try to remove the string !CP! from our list.
6481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6483      # If it failed, the variable was not from the command line. Ignore it,
6484      # but warn the user (except for BASH, which is always set by the calling BASH).
6485      if test "xCP" != xBASH; then
6486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6487$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6488      fi
6489      # Try to locate tool using the code snippet
6490      for ac_prog in cp
6491do
6492  # Extract the first word of "$ac_prog", so it can be a program name with args.
6493set dummy $ac_prog; ac_word=$2
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495$as_echo_n "checking for $ac_word... " >&6; }
6496if ${ac_cv_path_CP+:} false; then :
6497  $as_echo_n "(cached) " >&6
6498else
6499  case $CP in
6500  [\\/]* | ?:[\\/]*)
6501  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6502  ;;
6503  *)
6504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505for as_dir in $PATH
6506do
6507  IFS=$as_save_IFS
6508  test -z "$as_dir" && as_dir=.
6509    for ac_exec_ext in '' $ac_executable_extensions; do
6510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6511    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6513    break 2
6514  fi
6515done
6516  done
6517IFS=$as_save_IFS
6518
6519  ;;
6520esac
6521fi
6522CP=$ac_cv_path_CP
6523if test -n "$CP"; then
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6525$as_echo "$CP" >&6; }
6526else
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6528$as_echo "no" >&6; }
6529fi
6530
6531
6532  test -n "$CP" && break
6533done
6534
6535    else
6536      # If it succeeded, then it was overridden by the user. We will use it
6537      # for the tool.
6538
6539      # First remove it from the list of overridden variables, so we can test
6540      # for unknown variables in the end.
6541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6542
6543      # Check if we try to supply an empty value
6544      if test "x$CP" = x; then
6545        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6546$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6548$as_echo_n "checking for CP... " >&6; }
6549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6550$as_echo "disabled" >&6; }
6551      else
6552        # Check if the provided tool contains a complete path.
6553        tool_specified="$CP"
6554        tool_basename="${tool_specified##*/}"
6555        if test "x$tool_basename" = "x$tool_specified"; then
6556          # A command without a complete path is provided, search $PATH.
6557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6558$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6559          # Extract the first word of "$tool_basename", so it can be a program name with args.
6560set dummy $tool_basename; ac_word=$2
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6562$as_echo_n "checking for $ac_word... " >&6; }
6563if ${ac_cv_path_CP+:} false; then :
6564  $as_echo_n "(cached) " >&6
6565else
6566  case $CP in
6567  [\\/]* | ?:[\\/]*)
6568  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6569  ;;
6570  *)
6571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6572for as_dir in $PATH
6573do
6574  IFS=$as_save_IFS
6575  test -z "$as_dir" && as_dir=.
6576    for ac_exec_ext in '' $ac_executable_extensions; do
6577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6578    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6580    break 2
6581  fi
6582done
6583  done
6584IFS=$as_save_IFS
6585
6586  ;;
6587esac
6588fi
6589CP=$ac_cv_path_CP
6590if test -n "$CP"; then
6591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6592$as_echo "$CP" >&6; }
6593else
6594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6595$as_echo "no" >&6; }
6596fi
6597
6598
6599          if test "x$CP" = x; then
6600            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6601          fi
6602        else
6603          # Otherwise we believe it is a complete path. Use it as it is.
6604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6605$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6606          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6607$as_echo_n "checking for CP... " >&6; }
6608          if test ! -x "$tool_specified"; then
6609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6610$as_echo "not found" >&6; }
6611            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6612          fi
6613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6614$as_echo "$tool_specified" >&6; }
6615        fi
6616      fi
6617    fi
6618
6619  fi
6620
6621
6622
6623  if test "x$CP" = x; then
6624    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6625  fi
6626
6627
6628
6629
6630
6631  # Publish this variable in the help.
6632
6633
6634  if [ -z "${CUT+x}" ]; then
6635    # The variable is not set by user, try to locate tool using the code snippet
6636    for ac_prog in cut
6637do
6638  # Extract the first word of "$ac_prog", so it can be a program name with args.
6639set dummy $ac_prog; ac_word=$2
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641$as_echo_n "checking for $ac_word... " >&6; }
6642if ${ac_cv_path_CUT+:} false; then :
6643  $as_echo_n "(cached) " >&6
6644else
6645  case $CUT in
6646  [\\/]* | ?:[\\/]*)
6647  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6648  ;;
6649  *)
6650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651for as_dir in $PATH
6652do
6653  IFS=$as_save_IFS
6654  test -z "$as_dir" && as_dir=.
6655    for ac_exec_ext in '' $ac_executable_extensions; do
6656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659    break 2
6660  fi
6661done
6662  done
6663IFS=$as_save_IFS
6664
6665  ;;
6666esac
6667fi
6668CUT=$ac_cv_path_CUT
6669if test -n "$CUT"; then
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6671$as_echo "$CUT" >&6; }
6672else
6673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674$as_echo "no" >&6; }
6675fi
6676
6677
6678  test -n "$CUT" && break
6679done
6680
6681  else
6682    # The variable is set, but is it from the command line or the environment?
6683
6684    # Try to remove the string !CUT! from our list.
6685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6687      # If it failed, the variable was not from the command line. Ignore it,
6688      # but warn the user (except for BASH, which is always set by the calling BASH).
6689      if test "xCUT" != xBASH; then
6690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6691$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6692      fi
6693      # Try to locate tool using the code snippet
6694      for ac_prog in cut
6695do
6696  # Extract the first word of "$ac_prog", so it can be a program name with args.
6697set dummy $ac_prog; ac_word=$2
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699$as_echo_n "checking for $ac_word... " >&6; }
6700if ${ac_cv_path_CUT+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  case $CUT in
6704  [\\/]* | ?:[\\/]*)
6705  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6706  ;;
6707  *)
6708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6709for as_dir in $PATH
6710do
6711  IFS=$as_save_IFS
6712  test -z "$as_dir" && as_dir=.
6713    for ac_exec_ext in '' $ac_executable_extensions; do
6714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6715    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6717    break 2
6718  fi
6719done
6720  done
6721IFS=$as_save_IFS
6722
6723  ;;
6724esac
6725fi
6726CUT=$ac_cv_path_CUT
6727if test -n "$CUT"; then
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6729$as_echo "$CUT" >&6; }
6730else
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732$as_echo "no" >&6; }
6733fi
6734
6735
6736  test -n "$CUT" && break
6737done
6738
6739    else
6740      # If it succeeded, then it was overridden by the user. We will use it
6741      # for the tool.
6742
6743      # First remove it from the list of overridden variables, so we can test
6744      # for unknown variables in the end.
6745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6746
6747      # Check if we try to supply an empty value
6748      if test "x$CUT" = x; then
6749        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6750$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6752$as_echo_n "checking for CUT... " >&6; }
6753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6754$as_echo "disabled" >&6; }
6755      else
6756        # Check if the provided tool contains a complete path.
6757        tool_specified="$CUT"
6758        tool_basename="${tool_specified##*/}"
6759        if test "x$tool_basename" = "x$tool_specified"; then
6760          # A command without a complete path is provided, search $PATH.
6761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6762$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6763          # Extract the first word of "$tool_basename", so it can be a program name with args.
6764set dummy $tool_basename; ac_word=$2
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6766$as_echo_n "checking for $ac_word... " >&6; }
6767if ${ac_cv_path_CUT+:} false; then :
6768  $as_echo_n "(cached) " >&6
6769else
6770  case $CUT in
6771  [\\/]* | ?:[\\/]*)
6772  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6773  ;;
6774  *)
6775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6776for as_dir in $PATH
6777do
6778  IFS=$as_save_IFS
6779  test -z "$as_dir" && as_dir=.
6780    for ac_exec_ext in '' $ac_executable_extensions; do
6781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6782    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6784    break 2
6785  fi
6786done
6787  done
6788IFS=$as_save_IFS
6789
6790  ;;
6791esac
6792fi
6793CUT=$ac_cv_path_CUT
6794if test -n "$CUT"; then
6795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6796$as_echo "$CUT" >&6; }
6797else
6798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6799$as_echo "no" >&6; }
6800fi
6801
6802
6803          if test "x$CUT" = x; then
6804            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6805          fi
6806        else
6807          # Otherwise we believe it is a complete path. Use it as it is.
6808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6809$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6810          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6811$as_echo_n "checking for CUT... " >&6; }
6812          if test ! -x "$tool_specified"; then
6813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6814$as_echo "not found" >&6; }
6815            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6816          fi
6817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6818$as_echo "$tool_specified" >&6; }
6819        fi
6820      fi
6821    fi
6822
6823  fi
6824
6825
6826
6827  if test "x$CUT" = x; then
6828    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6829  fi
6830
6831
6832
6833
6834
6835  # Publish this variable in the help.
6836
6837
6838  if [ -z "${DATE+x}" ]; then
6839    # The variable is not set by user, try to locate tool using the code snippet
6840    for ac_prog in date
6841do
6842  # Extract the first word of "$ac_prog", so it can be a program name with args.
6843set dummy $ac_prog; ac_word=$2
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6845$as_echo_n "checking for $ac_word... " >&6; }
6846if ${ac_cv_path_DATE+:} false; then :
6847  $as_echo_n "(cached) " >&6
6848else
6849  case $DATE in
6850  [\\/]* | ?:[\\/]*)
6851  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6852  ;;
6853  *)
6854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6855for as_dir in $PATH
6856do
6857  IFS=$as_save_IFS
6858  test -z "$as_dir" && as_dir=.
6859    for ac_exec_ext in '' $ac_executable_extensions; do
6860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6861    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6863    break 2
6864  fi
6865done
6866  done
6867IFS=$as_save_IFS
6868
6869  ;;
6870esac
6871fi
6872DATE=$ac_cv_path_DATE
6873if test -n "$DATE"; then
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6875$as_echo "$DATE" >&6; }
6876else
6877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6878$as_echo "no" >&6; }
6879fi
6880
6881
6882  test -n "$DATE" && break
6883done
6884
6885  else
6886    # The variable is set, but is it from the command line or the environment?
6887
6888    # Try to remove the string !DATE! from our list.
6889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6891      # If it failed, the variable was not from the command line. Ignore it,
6892      # but warn the user (except for BASH, which is always set by the calling BASH).
6893      if test "xDATE" != xBASH; then
6894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6895$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6896      fi
6897      # Try to locate tool using the code snippet
6898      for ac_prog in date
6899do
6900  # Extract the first word of "$ac_prog", so it can be a program name with args.
6901set dummy $ac_prog; ac_word=$2
6902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6903$as_echo_n "checking for $ac_word... " >&6; }
6904if ${ac_cv_path_DATE+:} false; then :
6905  $as_echo_n "(cached) " >&6
6906else
6907  case $DATE in
6908  [\\/]* | ?:[\\/]*)
6909  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6910  ;;
6911  *)
6912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6913for as_dir in $PATH
6914do
6915  IFS=$as_save_IFS
6916  test -z "$as_dir" && as_dir=.
6917    for ac_exec_ext in '' $ac_executable_extensions; do
6918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6919    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6921    break 2
6922  fi
6923done
6924  done
6925IFS=$as_save_IFS
6926
6927  ;;
6928esac
6929fi
6930DATE=$ac_cv_path_DATE
6931if test -n "$DATE"; then
6932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6933$as_echo "$DATE" >&6; }
6934else
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6936$as_echo "no" >&6; }
6937fi
6938
6939
6940  test -n "$DATE" && break
6941done
6942
6943    else
6944      # If it succeeded, then it was overridden by the user. We will use it
6945      # for the tool.
6946
6947      # First remove it from the list of overridden variables, so we can test
6948      # for unknown variables in the end.
6949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6950
6951      # Check if we try to supply an empty value
6952      if test "x$DATE" = x; then
6953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6954$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6956$as_echo_n "checking for DATE... " >&6; }
6957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6958$as_echo "disabled" >&6; }
6959      else
6960        # Check if the provided tool contains a complete path.
6961        tool_specified="$DATE"
6962        tool_basename="${tool_specified##*/}"
6963        if test "x$tool_basename" = "x$tool_specified"; then
6964          # A command without a complete path is provided, search $PATH.
6965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6966$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6967          # Extract the first word of "$tool_basename", so it can be a program name with args.
6968set dummy $tool_basename; ac_word=$2
6969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6970$as_echo_n "checking for $ac_word... " >&6; }
6971if ${ac_cv_path_DATE+:} false; then :
6972  $as_echo_n "(cached) " >&6
6973else
6974  case $DATE in
6975  [\\/]* | ?:[\\/]*)
6976  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6977  ;;
6978  *)
6979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6980for as_dir in $PATH
6981do
6982  IFS=$as_save_IFS
6983  test -z "$as_dir" && as_dir=.
6984    for ac_exec_ext in '' $ac_executable_extensions; do
6985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6986    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6988    break 2
6989  fi
6990done
6991  done
6992IFS=$as_save_IFS
6993
6994  ;;
6995esac
6996fi
6997DATE=$ac_cv_path_DATE
6998if test -n "$DATE"; then
6999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7000$as_echo "$DATE" >&6; }
7001else
7002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7003$as_echo "no" >&6; }
7004fi
7005
7006
7007          if test "x$DATE" = x; then
7008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7009          fi
7010        else
7011          # Otherwise we believe it is a complete path. Use it as it is.
7012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7013$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7015$as_echo_n "checking for DATE... " >&6; }
7016          if test ! -x "$tool_specified"; then
7017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7018$as_echo "not found" >&6; }
7019            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7020          fi
7021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7022$as_echo "$tool_specified" >&6; }
7023        fi
7024      fi
7025    fi
7026
7027  fi
7028
7029
7030
7031  if test "x$DATE" = x; then
7032    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7033  fi
7034
7035
7036
7037
7038
7039  # Publish this variable in the help.
7040
7041
7042  if [ -z "${DIFF+x}" ]; then
7043    # The variable is not set by user, try to locate tool using the code snippet
7044    for ac_prog in gdiff diff
7045do
7046  # Extract the first word of "$ac_prog", so it can be a program name with args.
7047set dummy $ac_prog; ac_word=$2
7048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7049$as_echo_n "checking for $ac_word... " >&6; }
7050if ${ac_cv_path_DIFF+:} false; then :
7051  $as_echo_n "(cached) " >&6
7052else
7053  case $DIFF in
7054  [\\/]* | ?:[\\/]*)
7055  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7056  ;;
7057  *)
7058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7059for as_dir in $PATH
7060do
7061  IFS=$as_save_IFS
7062  test -z "$as_dir" && as_dir=.
7063    for ac_exec_ext in '' $ac_executable_extensions; do
7064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7065    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7067    break 2
7068  fi
7069done
7070  done
7071IFS=$as_save_IFS
7072
7073  ;;
7074esac
7075fi
7076DIFF=$ac_cv_path_DIFF
7077if test -n "$DIFF"; then
7078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7079$as_echo "$DIFF" >&6; }
7080else
7081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7082$as_echo "no" >&6; }
7083fi
7084
7085
7086  test -n "$DIFF" && break
7087done
7088
7089  else
7090    # The variable is set, but is it from the command line or the environment?
7091
7092    # Try to remove the string !DIFF! from our list.
7093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7095      # If it failed, the variable was not from the command line. Ignore it,
7096      # but warn the user (except for BASH, which is always set by the calling BASH).
7097      if test "xDIFF" != xBASH; then
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7099$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7100      fi
7101      # Try to locate tool using the code snippet
7102      for ac_prog in gdiff diff
7103do
7104  # Extract the first word of "$ac_prog", so it can be a program name with args.
7105set dummy $ac_prog; ac_word=$2
7106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7107$as_echo_n "checking for $ac_word... " >&6; }
7108if ${ac_cv_path_DIFF+:} false; then :
7109  $as_echo_n "(cached) " >&6
7110else
7111  case $DIFF in
7112  [\\/]* | ?:[\\/]*)
7113  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7114  ;;
7115  *)
7116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7117for as_dir in $PATH
7118do
7119  IFS=$as_save_IFS
7120  test -z "$as_dir" && as_dir=.
7121    for ac_exec_ext in '' $ac_executable_extensions; do
7122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7123    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7125    break 2
7126  fi
7127done
7128  done
7129IFS=$as_save_IFS
7130
7131  ;;
7132esac
7133fi
7134DIFF=$ac_cv_path_DIFF
7135if test -n "$DIFF"; then
7136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7137$as_echo "$DIFF" >&6; }
7138else
7139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7140$as_echo "no" >&6; }
7141fi
7142
7143
7144  test -n "$DIFF" && break
7145done
7146
7147    else
7148      # If it succeeded, then it was overridden by the user. We will use it
7149      # for the tool.
7150
7151      # First remove it from the list of overridden variables, so we can test
7152      # for unknown variables in the end.
7153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7154
7155      # Check if we try to supply an empty value
7156      if test "x$DIFF" = x; then
7157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7158$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7160$as_echo_n "checking for DIFF... " >&6; }
7161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7162$as_echo "disabled" >&6; }
7163      else
7164        # Check if the provided tool contains a complete path.
7165        tool_specified="$DIFF"
7166        tool_basename="${tool_specified##*/}"
7167        if test "x$tool_basename" = "x$tool_specified"; then
7168          # A command without a complete path is provided, search $PATH.
7169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7170$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7171          # Extract the first word of "$tool_basename", so it can be a program name with args.
7172set dummy $tool_basename; ac_word=$2
7173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7174$as_echo_n "checking for $ac_word... " >&6; }
7175if ${ac_cv_path_DIFF+:} false; then :
7176  $as_echo_n "(cached) " >&6
7177else
7178  case $DIFF in
7179  [\\/]* | ?:[\\/]*)
7180  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7181  ;;
7182  *)
7183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7184for as_dir in $PATH
7185do
7186  IFS=$as_save_IFS
7187  test -z "$as_dir" && as_dir=.
7188    for ac_exec_ext in '' $ac_executable_extensions; do
7189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7190    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7192    break 2
7193  fi
7194done
7195  done
7196IFS=$as_save_IFS
7197
7198  ;;
7199esac
7200fi
7201DIFF=$ac_cv_path_DIFF
7202if test -n "$DIFF"; then
7203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7204$as_echo "$DIFF" >&6; }
7205else
7206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7207$as_echo "no" >&6; }
7208fi
7209
7210
7211          if test "x$DIFF" = x; then
7212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7213          fi
7214        else
7215          # Otherwise we believe it is a complete path. Use it as it is.
7216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7217$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7219$as_echo_n "checking for DIFF... " >&6; }
7220          if test ! -x "$tool_specified"; then
7221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7222$as_echo "not found" >&6; }
7223            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7224          fi
7225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7226$as_echo "$tool_specified" >&6; }
7227        fi
7228      fi
7229    fi
7230
7231  fi
7232
7233
7234
7235  if test "x$DIFF" = x; then
7236    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7237  fi
7238
7239
7240
7241
7242
7243  # Publish this variable in the help.
7244
7245
7246  if [ -z "${DIRNAME+x}" ]; then
7247    # The variable is not set by user, try to locate tool using the code snippet
7248    for ac_prog in dirname
7249do
7250  # Extract the first word of "$ac_prog", so it can be a program name with args.
7251set dummy $ac_prog; ac_word=$2
7252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7253$as_echo_n "checking for $ac_word... " >&6; }
7254if ${ac_cv_path_DIRNAME+:} false; then :
7255  $as_echo_n "(cached) " >&6
7256else
7257  case $DIRNAME in
7258  [\\/]* | ?:[\\/]*)
7259  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7260  ;;
7261  *)
7262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7263for as_dir in $PATH
7264do
7265  IFS=$as_save_IFS
7266  test -z "$as_dir" && as_dir=.
7267    for ac_exec_ext in '' $ac_executable_extensions; do
7268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7269    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7271    break 2
7272  fi
7273done
7274  done
7275IFS=$as_save_IFS
7276
7277  ;;
7278esac
7279fi
7280DIRNAME=$ac_cv_path_DIRNAME
7281if test -n "$DIRNAME"; then
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7283$as_echo "$DIRNAME" >&6; }
7284else
7285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7286$as_echo "no" >&6; }
7287fi
7288
7289
7290  test -n "$DIRNAME" && break
7291done
7292
7293  else
7294    # The variable is set, but is it from the command line or the environment?
7295
7296    # Try to remove the string !DIRNAME! from our list.
7297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7299      # If it failed, the variable was not from the command line. Ignore it,
7300      # but warn the user (except for BASH, which is always set by the calling BASH).
7301      if test "xDIRNAME" != xBASH; then
7302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7303$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7304      fi
7305      # Try to locate tool using the code snippet
7306      for ac_prog in dirname
7307do
7308  # Extract the first word of "$ac_prog", so it can be a program name with args.
7309set dummy $ac_prog; ac_word=$2
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7311$as_echo_n "checking for $ac_word... " >&6; }
7312if ${ac_cv_path_DIRNAME+:} false; then :
7313  $as_echo_n "(cached) " >&6
7314else
7315  case $DIRNAME in
7316  [\\/]* | ?:[\\/]*)
7317  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7318  ;;
7319  *)
7320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7321for as_dir in $PATH
7322do
7323  IFS=$as_save_IFS
7324  test -z "$as_dir" && as_dir=.
7325    for ac_exec_ext in '' $ac_executable_extensions; do
7326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7327    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7329    break 2
7330  fi
7331done
7332  done
7333IFS=$as_save_IFS
7334
7335  ;;
7336esac
7337fi
7338DIRNAME=$ac_cv_path_DIRNAME
7339if test -n "$DIRNAME"; then
7340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7341$as_echo "$DIRNAME" >&6; }
7342else
7343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7344$as_echo "no" >&6; }
7345fi
7346
7347
7348  test -n "$DIRNAME" && break
7349done
7350
7351    else
7352      # If it succeeded, then it was overridden by the user. We will use it
7353      # for the tool.
7354
7355      # First remove it from the list of overridden variables, so we can test
7356      # for unknown variables in the end.
7357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7358
7359      # Check if we try to supply an empty value
7360      if test "x$DIRNAME" = x; then
7361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7362$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7364$as_echo_n "checking for DIRNAME... " >&6; }
7365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7366$as_echo "disabled" >&6; }
7367      else
7368        # Check if the provided tool contains a complete path.
7369        tool_specified="$DIRNAME"
7370        tool_basename="${tool_specified##*/}"
7371        if test "x$tool_basename" = "x$tool_specified"; then
7372          # A command without a complete path is provided, search $PATH.
7373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7374$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7375          # Extract the first word of "$tool_basename", so it can be a program name with args.
7376set dummy $tool_basename; ac_word=$2
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7378$as_echo_n "checking for $ac_word... " >&6; }
7379if ${ac_cv_path_DIRNAME+:} false; then :
7380  $as_echo_n "(cached) " >&6
7381else
7382  case $DIRNAME in
7383  [\\/]* | ?:[\\/]*)
7384  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7385  ;;
7386  *)
7387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7388for as_dir in $PATH
7389do
7390  IFS=$as_save_IFS
7391  test -z "$as_dir" && as_dir=.
7392    for ac_exec_ext in '' $ac_executable_extensions; do
7393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7394    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7396    break 2
7397  fi
7398done
7399  done
7400IFS=$as_save_IFS
7401
7402  ;;
7403esac
7404fi
7405DIRNAME=$ac_cv_path_DIRNAME
7406if test -n "$DIRNAME"; then
7407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7408$as_echo "$DIRNAME" >&6; }
7409else
7410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7411$as_echo "no" >&6; }
7412fi
7413
7414
7415          if test "x$DIRNAME" = x; then
7416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7417          fi
7418        else
7419          # Otherwise we believe it is a complete path. Use it as it is.
7420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7421$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7423$as_echo_n "checking for DIRNAME... " >&6; }
7424          if test ! -x "$tool_specified"; then
7425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7426$as_echo "not found" >&6; }
7427            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7428          fi
7429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7430$as_echo "$tool_specified" >&6; }
7431        fi
7432      fi
7433    fi
7434
7435  fi
7436
7437
7438
7439  if test "x$DIRNAME" = x; then
7440    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7441  fi
7442
7443
7444
7445
7446
7447  # Publish this variable in the help.
7448
7449
7450  if [ -z "${ECHO+x}" ]; then
7451    # The variable is not set by user, try to locate tool using the code snippet
7452    for ac_prog in echo
7453do
7454  # Extract the first word of "$ac_prog", so it can be a program name with args.
7455set dummy $ac_prog; ac_word=$2
7456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7457$as_echo_n "checking for $ac_word... " >&6; }
7458if ${ac_cv_path_ECHO+:} false; then :
7459  $as_echo_n "(cached) " >&6
7460else
7461  case $ECHO in
7462  [\\/]* | ?:[\\/]*)
7463  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7464  ;;
7465  *)
7466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7467for as_dir in $PATH
7468do
7469  IFS=$as_save_IFS
7470  test -z "$as_dir" && as_dir=.
7471    for ac_exec_ext in '' $ac_executable_extensions; do
7472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7473    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7475    break 2
7476  fi
7477done
7478  done
7479IFS=$as_save_IFS
7480
7481  ;;
7482esac
7483fi
7484ECHO=$ac_cv_path_ECHO
7485if test -n "$ECHO"; then
7486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7487$as_echo "$ECHO" >&6; }
7488else
7489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7490$as_echo "no" >&6; }
7491fi
7492
7493
7494  test -n "$ECHO" && break
7495done
7496
7497  else
7498    # The variable is set, but is it from the command line or the environment?
7499
7500    # Try to remove the string !ECHO! from our list.
7501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7503      # If it failed, the variable was not from the command line. Ignore it,
7504      # but warn the user (except for BASH, which is always set by the calling BASH).
7505      if test "xECHO" != xBASH; then
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7507$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7508      fi
7509      # Try to locate tool using the code snippet
7510      for ac_prog in echo
7511do
7512  # Extract the first word of "$ac_prog", so it can be a program name with args.
7513set dummy $ac_prog; ac_word=$2
7514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7515$as_echo_n "checking for $ac_word... " >&6; }
7516if ${ac_cv_path_ECHO+:} false; then :
7517  $as_echo_n "(cached) " >&6
7518else
7519  case $ECHO in
7520  [\\/]* | ?:[\\/]*)
7521  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7522  ;;
7523  *)
7524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525for as_dir in $PATH
7526do
7527  IFS=$as_save_IFS
7528  test -z "$as_dir" && as_dir=.
7529    for ac_exec_ext in '' $ac_executable_extensions; do
7530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7531    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7533    break 2
7534  fi
7535done
7536  done
7537IFS=$as_save_IFS
7538
7539  ;;
7540esac
7541fi
7542ECHO=$ac_cv_path_ECHO
7543if test -n "$ECHO"; then
7544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7545$as_echo "$ECHO" >&6; }
7546else
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548$as_echo "no" >&6; }
7549fi
7550
7551
7552  test -n "$ECHO" && break
7553done
7554
7555    else
7556      # If it succeeded, then it was overridden by the user. We will use it
7557      # for the tool.
7558
7559      # First remove it from the list of overridden variables, so we can test
7560      # for unknown variables in the end.
7561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7562
7563      # Check if we try to supply an empty value
7564      if test "x$ECHO" = x; then
7565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7566$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7568$as_echo_n "checking for ECHO... " >&6; }
7569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7570$as_echo "disabled" >&6; }
7571      else
7572        # Check if the provided tool contains a complete path.
7573        tool_specified="$ECHO"
7574        tool_basename="${tool_specified##*/}"
7575        if test "x$tool_basename" = "x$tool_specified"; then
7576          # A command without a complete path is provided, search $PATH.
7577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7578$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7579          # Extract the first word of "$tool_basename", so it can be a program name with args.
7580set dummy $tool_basename; ac_word=$2
7581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7582$as_echo_n "checking for $ac_word... " >&6; }
7583if ${ac_cv_path_ECHO+:} false; then :
7584  $as_echo_n "(cached) " >&6
7585else
7586  case $ECHO in
7587  [\\/]* | ?:[\\/]*)
7588  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7589  ;;
7590  *)
7591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7592for as_dir in $PATH
7593do
7594  IFS=$as_save_IFS
7595  test -z "$as_dir" && as_dir=.
7596    for ac_exec_ext in '' $ac_executable_extensions; do
7597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7598    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7600    break 2
7601  fi
7602done
7603  done
7604IFS=$as_save_IFS
7605
7606  ;;
7607esac
7608fi
7609ECHO=$ac_cv_path_ECHO
7610if test -n "$ECHO"; then
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7612$as_echo "$ECHO" >&6; }
7613else
7614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7615$as_echo "no" >&6; }
7616fi
7617
7618
7619          if test "x$ECHO" = x; then
7620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7621          fi
7622        else
7623          # Otherwise we believe it is a complete path. Use it as it is.
7624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7625$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7627$as_echo_n "checking for ECHO... " >&6; }
7628          if test ! -x "$tool_specified"; then
7629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7630$as_echo "not found" >&6; }
7631            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7632          fi
7633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7634$as_echo "$tool_specified" >&6; }
7635        fi
7636      fi
7637    fi
7638
7639  fi
7640
7641
7642
7643  if test "x$ECHO" = x; then
7644    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7645  fi
7646
7647
7648
7649
7650
7651  # Publish this variable in the help.
7652
7653
7654  if [ -z "${EXPR+x}" ]; then
7655    # The variable is not set by user, try to locate tool using the code snippet
7656    for ac_prog in expr
7657do
7658  # Extract the first word of "$ac_prog", so it can be a program name with args.
7659set dummy $ac_prog; ac_word=$2
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7661$as_echo_n "checking for $ac_word... " >&6; }
7662if ${ac_cv_path_EXPR+:} false; then :
7663  $as_echo_n "(cached) " >&6
7664else
7665  case $EXPR in
7666  [\\/]* | ?:[\\/]*)
7667  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7668  ;;
7669  *)
7670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7671for as_dir in $PATH
7672do
7673  IFS=$as_save_IFS
7674  test -z "$as_dir" && as_dir=.
7675    for ac_exec_ext in '' $ac_executable_extensions; do
7676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7677    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7679    break 2
7680  fi
7681done
7682  done
7683IFS=$as_save_IFS
7684
7685  ;;
7686esac
7687fi
7688EXPR=$ac_cv_path_EXPR
7689if test -n "$EXPR"; then
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7691$as_echo "$EXPR" >&6; }
7692else
7693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7694$as_echo "no" >&6; }
7695fi
7696
7697
7698  test -n "$EXPR" && break
7699done
7700
7701  else
7702    # The variable is set, but is it from the command line or the environment?
7703
7704    # Try to remove the string !EXPR! from our list.
7705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7707      # If it failed, the variable was not from the command line. Ignore it,
7708      # but warn the user (except for BASH, which is always set by the calling BASH).
7709      if test "xEXPR" != xBASH; then
7710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7711$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7712      fi
7713      # Try to locate tool using the code snippet
7714      for ac_prog in expr
7715do
7716  # Extract the first word of "$ac_prog", so it can be a program name with args.
7717set dummy $ac_prog; ac_word=$2
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719$as_echo_n "checking for $ac_word... " >&6; }
7720if ${ac_cv_path_EXPR+:} false; then :
7721  $as_echo_n "(cached) " >&6
7722else
7723  case $EXPR in
7724  [\\/]* | ?:[\\/]*)
7725  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7726  ;;
7727  *)
7728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7729for as_dir in $PATH
7730do
7731  IFS=$as_save_IFS
7732  test -z "$as_dir" && as_dir=.
7733    for ac_exec_ext in '' $ac_executable_extensions; do
7734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7735    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7737    break 2
7738  fi
7739done
7740  done
7741IFS=$as_save_IFS
7742
7743  ;;
7744esac
7745fi
7746EXPR=$ac_cv_path_EXPR
7747if test -n "$EXPR"; then
7748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7749$as_echo "$EXPR" >&6; }
7750else
7751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7752$as_echo "no" >&6; }
7753fi
7754
7755
7756  test -n "$EXPR" && break
7757done
7758
7759    else
7760      # If it succeeded, then it was overridden by the user. We will use it
7761      # for the tool.
7762
7763      # First remove it from the list of overridden variables, so we can test
7764      # for unknown variables in the end.
7765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7766
7767      # Check if we try to supply an empty value
7768      if test "x$EXPR" = x; then
7769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7770$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7772$as_echo_n "checking for EXPR... " >&6; }
7773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7774$as_echo "disabled" >&6; }
7775      else
7776        # Check if the provided tool contains a complete path.
7777        tool_specified="$EXPR"
7778        tool_basename="${tool_specified##*/}"
7779        if test "x$tool_basename" = "x$tool_specified"; then
7780          # A command without a complete path is provided, search $PATH.
7781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7782$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7783          # Extract the first word of "$tool_basename", so it can be a program name with args.
7784set dummy $tool_basename; ac_word=$2
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7786$as_echo_n "checking for $ac_word... " >&6; }
7787if ${ac_cv_path_EXPR+:} false; then :
7788  $as_echo_n "(cached) " >&6
7789else
7790  case $EXPR in
7791  [\\/]* | ?:[\\/]*)
7792  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7793  ;;
7794  *)
7795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796for as_dir in $PATH
7797do
7798  IFS=$as_save_IFS
7799  test -z "$as_dir" && as_dir=.
7800    for ac_exec_ext in '' $ac_executable_extensions; do
7801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7802    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7804    break 2
7805  fi
7806done
7807  done
7808IFS=$as_save_IFS
7809
7810  ;;
7811esac
7812fi
7813EXPR=$ac_cv_path_EXPR
7814if test -n "$EXPR"; then
7815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7816$as_echo "$EXPR" >&6; }
7817else
7818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819$as_echo "no" >&6; }
7820fi
7821
7822
7823          if test "x$EXPR" = x; then
7824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7825          fi
7826        else
7827          # Otherwise we believe it is a complete path. Use it as it is.
7828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7829$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7831$as_echo_n "checking for EXPR... " >&6; }
7832          if test ! -x "$tool_specified"; then
7833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7834$as_echo "not found" >&6; }
7835            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7836          fi
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7838$as_echo "$tool_specified" >&6; }
7839        fi
7840      fi
7841    fi
7842
7843  fi
7844
7845
7846
7847  if test "x$EXPR" = x; then
7848    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7849  fi
7850
7851
7852
7853
7854
7855  # Publish this variable in the help.
7856
7857
7858  if [ -z "${FILE+x}" ]; then
7859    # The variable is not set by user, try to locate tool using the code snippet
7860    for ac_prog in file
7861do
7862  # Extract the first word of "$ac_prog", so it can be a program name with args.
7863set dummy $ac_prog; ac_word=$2
7864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7865$as_echo_n "checking for $ac_word... " >&6; }
7866if ${ac_cv_path_FILE+:} false; then :
7867  $as_echo_n "(cached) " >&6
7868else
7869  case $FILE in
7870  [\\/]* | ?:[\\/]*)
7871  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7872  ;;
7873  *)
7874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7875for as_dir in $PATH
7876do
7877  IFS=$as_save_IFS
7878  test -z "$as_dir" && as_dir=.
7879    for ac_exec_ext in '' $ac_executable_extensions; do
7880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7881    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7883    break 2
7884  fi
7885done
7886  done
7887IFS=$as_save_IFS
7888
7889  ;;
7890esac
7891fi
7892FILE=$ac_cv_path_FILE
7893if test -n "$FILE"; then
7894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7895$as_echo "$FILE" >&6; }
7896else
7897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7898$as_echo "no" >&6; }
7899fi
7900
7901
7902  test -n "$FILE" && break
7903done
7904
7905  else
7906    # The variable is set, but is it from the command line or the environment?
7907
7908    # Try to remove the string !FILE! from our list.
7909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7911      # If it failed, the variable was not from the command line. Ignore it,
7912      # but warn the user (except for BASH, which is always set by the calling BASH).
7913      if test "xFILE" != xBASH; then
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7915$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7916      fi
7917      # Try to locate tool using the code snippet
7918      for ac_prog in file
7919do
7920  # Extract the first word of "$ac_prog", so it can be a program name with args.
7921set dummy $ac_prog; ac_word=$2
7922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7923$as_echo_n "checking for $ac_word... " >&6; }
7924if ${ac_cv_path_FILE+:} false; then :
7925  $as_echo_n "(cached) " >&6
7926else
7927  case $FILE in
7928  [\\/]* | ?:[\\/]*)
7929  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7930  ;;
7931  *)
7932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7933for as_dir in $PATH
7934do
7935  IFS=$as_save_IFS
7936  test -z "$as_dir" && as_dir=.
7937    for ac_exec_ext in '' $ac_executable_extensions; do
7938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7939    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7941    break 2
7942  fi
7943done
7944  done
7945IFS=$as_save_IFS
7946
7947  ;;
7948esac
7949fi
7950FILE=$ac_cv_path_FILE
7951if test -n "$FILE"; then
7952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7953$as_echo "$FILE" >&6; }
7954else
7955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7956$as_echo "no" >&6; }
7957fi
7958
7959
7960  test -n "$FILE" && break
7961done
7962
7963    else
7964      # If it succeeded, then it was overridden by the user. We will use it
7965      # for the tool.
7966
7967      # First remove it from the list of overridden variables, so we can test
7968      # for unknown variables in the end.
7969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7970
7971      # Check if we try to supply an empty value
7972      if test "x$FILE" = x; then
7973        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7974$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7976$as_echo_n "checking for FILE... " >&6; }
7977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7978$as_echo "disabled" >&6; }
7979      else
7980        # Check if the provided tool contains a complete path.
7981        tool_specified="$FILE"
7982        tool_basename="${tool_specified##*/}"
7983        if test "x$tool_basename" = "x$tool_specified"; then
7984          # A command without a complete path is provided, search $PATH.
7985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7986$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7987          # Extract the first word of "$tool_basename", so it can be a program name with args.
7988set dummy $tool_basename; ac_word=$2
7989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7990$as_echo_n "checking for $ac_word... " >&6; }
7991if ${ac_cv_path_FILE+:} false; then :
7992  $as_echo_n "(cached) " >&6
7993else
7994  case $FILE in
7995  [\\/]* | ?:[\\/]*)
7996  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7997  ;;
7998  *)
7999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8000for as_dir in $PATH
8001do
8002  IFS=$as_save_IFS
8003  test -z "$as_dir" && as_dir=.
8004    for ac_exec_ext in '' $ac_executable_extensions; do
8005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8006    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8008    break 2
8009  fi
8010done
8011  done
8012IFS=$as_save_IFS
8013
8014  ;;
8015esac
8016fi
8017FILE=$ac_cv_path_FILE
8018if test -n "$FILE"; then
8019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8020$as_echo "$FILE" >&6; }
8021else
8022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8023$as_echo "no" >&6; }
8024fi
8025
8026
8027          if test "x$FILE" = x; then
8028            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8029          fi
8030        else
8031          # Otherwise we believe it is a complete path. Use it as it is.
8032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8033$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8034          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8035$as_echo_n "checking for FILE... " >&6; }
8036          if test ! -x "$tool_specified"; then
8037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8038$as_echo "not found" >&6; }
8039            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8040          fi
8041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8042$as_echo "$tool_specified" >&6; }
8043        fi
8044      fi
8045    fi
8046
8047  fi
8048
8049
8050
8051  if test "x$FILE" = x; then
8052    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8053  fi
8054
8055
8056
8057
8058
8059  # Publish this variable in the help.
8060
8061
8062  if [ -z "${FIND+x}" ]; then
8063    # The variable is not set by user, try to locate tool using the code snippet
8064    for ac_prog in find
8065do
8066  # Extract the first word of "$ac_prog", so it can be a program name with args.
8067set dummy $ac_prog; ac_word=$2
8068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8069$as_echo_n "checking for $ac_word... " >&6; }
8070if ${ac_cv_path_FIND+:} false; then :
8071  $as_echo_n "(cached) " >&6
8072else
8073  case $FIND in
8074  [\\/]* | ?:[\\/]*)
8075  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8076  ;;
8077  *)
8078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8079for as_dir in $PATH
8080do
8081  IFS=$as_save_IFS
8082  test -z "$as_dir" && as_dir=.
8083    for ac_exec_ext in '' $ac_executable_extensions; do
8084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8085    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8087    break 2
8088  fi
8089done
8090  done
8091IFS=$as_save_IFS
8092
8093  ;;
8094esac
8095fi
8096FIND=$ac_cv_path_FIND
8097if test -n "$FIND"; then
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8099$as_echo "$FIND" >&6; }
8100else
8101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8102$as_echo "no" >&6; }
8103fi
8104
8105
8106  test -n "$FIND" && break
8107done
8108
8109  else
8110    # The variable is set, but is it from the command line or the environment?
8111
8112    # Try to remove the string !FIND! from our list.
8113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8115      # If it failed, the variable was not from the command line. Ignore it,
8116      # but warn the user (except for BASH, which is always set by the calling BASH).
8117      if test "xFIND" != xBASH; then
8118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8119$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8120      fi
8121      # Try to locate tool using the code snippet
8122      for ac_prog in find
8123do
8124  # Extract the first word of "$ac_prog", so it can be a program name with args.
8125set dummy $ac_prog; ac_word=$2
8126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127$as_echo_n "checking for $ac_word... " >&6; }
8128if ${ac_cv_path_FIND+:} false; then :
8129  $as_echo_n "(cached) " >&6
8130else
8131  case $FIND in
8132  [\\/]* | ?:[\\/]*)
8133  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8134  ;;
8135  *)
8136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137for as_dir in $PATH
8138do
8139  IFS=$as_save_IFS
8140  test -z "$as_dir" && as_dir=.
8141    for ac_exec_ext in '' $ac_executable_extensions; do
8142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8143    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8145    break 2
8146  fi
8147done
8148  done
8149IFS=$as_save_IFS
8150
8151  ;;
8152esac
8153fi
8154FIND=$ac_cv_path_FIND
8155if test -n "$FIND"; then
8156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8157$as_echo "$FIND" >&6; }
8158else
8159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160$as_echo "no" >&6; }
8161fi
8162
8163
8164  test -n "$FIND" && break
8165done
8166
8167    else
8168      # If it succeeded, then it was overridden by the user. We will use it
8169      # for the tool.
8170
8171      # First remove it from the list of overridden variables, so we can test
8172      # for unknown variables in the end.
8173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8174
8175      # Check if we try to supply an empty value
8176      if test "x$FIND" = x; then
8177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8178$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8180$as_echo_n "checking for FIND... " >&6; }
8181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8182$as_echo "disabled" >&6; }
8183      else
8184        # Check if the provided tool contains a complete path.
8185        tool_specified="$FIND"
8186        tool_basename="${tool_specified##*/}"
8187        if test "x$tool_basename" = "x$tool_specified"; then
8188          # A command without a complete path is provided, search $PATH.
8189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8190$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8191          # Extract the first word of "$tool_basename", so it can be a program name with args.
8192set dummy $tool_basename; ac_word=$2
8193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8194$as_echo_n "checking for $ac_word... " >&6; }
8195if ${ac_cv_path_FIND+:} false; then :
8196  $as_echo_n "(cached) " >&6
8197else
8198  case $FIND in
8199  [\\/]* | ?:[\\/]*)
8200  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8201  ;;
8202  *)
8203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8204for as_dir in $PATH
8205do
8206  IFS=$as_save_IFS
8207  test -z "$as_dir" && as_dir=.
8208    for ac_exec_ext in '' $ac_executable_extensions; do
8209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8210    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8212    break 2
8213  fi
8214done
8215  done
8216IFS=$as_save_IFS
8217
8218  ;;
8219esac
8220fi
8221FIND=$ac_cv_path_FIND
8222if test -n "$FIND"; then
8223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8224$as_echo "$FIND" >&6; }
8225else
8226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8227$as_echo "no" >&6; }
8228fi
8229
8230
8231          if test "x$FIND" = x; then
8232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8233          fi
8234        else
8235          # Otherwise we believe it is a complete path. Use it as it is.
8236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8237$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8239$as_echo_n "checking for FIND... " >&6; }
8240          if test ! -x "$tool_specified"; then
8241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8242$as_echo "not found" >&6; }
8243            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8244          fi
8245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8246$as_echo "$tool_specified" >&6; }
8247        fi
8248      fi
8249    fi
8250
8251  fi
8252
8253
8254
8255  if test "x$FIND" = x; then
8256    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8257  fi
8258
8259
8260
8261
8262
8263  # Publish this variable in the help.
8264
8265
8266  if [ -z "${HEAD+x}" ]; then
8267    # The variable is not set by user, try to locate tool using the code snippet
8268    for ac_prog in head
8269do
8270  # Extract the first word of "$ac_prog", so it can be a program name with args.
8271set dummy $ac_prog; ac_word=$2
8272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8273$as_echo_n "checking for $ac_word... " >&6; }
8274if ${ac_cv_path_HEAD+:} false; then :
8275  $as_echo_n "(cached) " >&6
8276else
8277  case $HEAD in
8278  [\\/]* | ?:[\\/]*)
8279  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8280  ;;
8281  *)
8282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8283for as_dir in $PATH
8284do
8285  IFS=$as_save_IFS
8286  test -z "$as_dir" && as_dir=.
8287    for ac_exec_ext in '' $ac_executable_extensions; do
8288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8289    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8291    break 2
8292  fi
8293done
8294  done
8295IFS=$as_save_IFS
8296
8297  ;;
8298esac
8299fi
8300HEAD=$ac_cv_path_HEAD
8301if test -n "$HEAD"; then
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8303$as_echo "$HEAD" >&6; }
8304else
8305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8306$as_echo "no" >&6; }
8307fi
8308
8309
8310  test -n "$HEAD" && break
8311done
8312
8313  else
8314    # The variable is set, but is it from the command line or the environment?
8315
8316    # Try to remove the string !HEAD! from our list.
8317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8319      # If it failed, the variable was not from the command line. Ignore it,
8320      # but warn the user (except for BASH, which is always set by the calling BASH).
8321      if test "xHEAD" != xBASH; then
8322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8323$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8324      fi
8325      # Try to locate tool using the code snippet
8326      for ac_prog in head
8327do
8328  # Extract the first word of "$ac_prog", so it can be a program name with args.
8329set dummy $ac_prog; ac_word=$2
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8331$as_echo_n "checking for $ac_word... " >&6; }
8332if ${ac_cv_path_HEAD+:} false; then :
8333  $as_echo_n "(cached) " >&6
8334else
8335  case $HEAD in
8336  [\\/]* | ?:[\\/]*)
8337  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8338  ;;
8339  *)
8340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8341for as_dir in $PATH
8342do
8343  IFS=$as_save_IFS
8344  test -z "$as_dir" && as_dir=.
8345    for ac_exec_ext in '' $ac_executable_extensions; do
8346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8347    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8349    break 2
8350  fi
8351done
8352  done
8353IFS=$as_save_IFS
8354
8355  ;;
8356esac
8357fi
8358HEAD=$ac_cv_path_HEAD
8359if test -n "$HEAD"; then
8360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8361$as_echo "$HEAD" >&6; }
8362else
8363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8364$as_echo "no" >&6; }
8365fi
8366
8367
8368  test -n "$HEAD" && break
8369done
8370
8371    else
8372      # If it succeeded, then it was overridden by the user. We will use it
8373      # for the tool.
8374
8375      # First remove it from the list of overridden variables, so we can test
8376      # for unknown variables in the end.
8377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8378
8379      # Check if we try to supply an empty value
8380      if test "x$HEAD" = x; then
8381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8382$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8384$as_echo_n "checking for HEAD... " >&6; }
8385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8386$as_echo "disabled" >&6; }
8387      else
8388        # Check if the provided tool contains a complete path.
8389        tool_specified="$HEAD"
8390        tool_basename="${tool_specified##*/}"
8391        if test "x$tool_basename" = "x$tool_specified"; then
8392          # A command without a complete path is provided, search $PATH.
8393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8394$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8395          # Extract the first word of "$tool_basename", so it can be a program name with args.
8396set dummy $tool_basename; ac_word=$2
8397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8398$as_echo_n "checking for $ac_word... " >&6; }
8399if ${ac_cv_path_HEAD+:} false; then :
8400  $as_echo_n "(cached) " >&6
8401else
8402  case $HEAD in
8403  [\\/]* | ?:[\\/]*)
8404  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8405  ;;
8406  *)
8407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8408for as_dir in $PATH
8409do
8410  IFS=$as_save_IFS
8411  test -z "$as_dir" && as_dir=.
8412    for ac_exec_ext in '' $ac_executable_extensions; do
8413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8414    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8416    break 2
8417  fi
8418done
8419  done
8420IFS=$as_save_IFS
8421
8422  ;;
8423esac
8424fi
8425HEAD=$ac_cv_path_HEAD
8426if test -n "$HEAD"; then
8427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8428$as_echo "$HEAD" >&6; }
8429else
8430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8431$as_echo "no" >&6; }
8432fi
8433
8434
8435          if test "x$HEAD" = x; then
8436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8437          fi
8438        else
8439          # Otherwise we believe it is a complete path. Use it as it is.
8440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8441$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8443$as_echo_n "checking for HEAD... " >&6; }
8444          if test ! -x "$tool_specified"; then
8445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8446$as_echo "not found" >&6; }
8447            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8448          fi
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8450$as_echo "$tool_specified" >&6; }
8451        fi
8452      fi
8453    fi
8454
8455  fi
8456
8457
8458
8459  if test "x$HEAD" = x; then
8460    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8461  fi
8462
8463
8464
8465
8466
8467  # Publish this variable in the help.
8468
8469
8470  if [ -z "${GUNZIP+x}" ]; then
8471    # The variable is not set by user, try to locate tool using the code snippet
8472    for ac_prog in gunzip
8473do
8474  # Extract the first word of "$ac_prog", so it can be a program name with args.
8475set dummy $ac_prog; ac_word=$2
8476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8477$as_echo_n "checking for $ac_word... " >&6; }
8478if ${ac_cv_path_GUNZIP+:} false; then :
8479  $as_echo_n "(cached) " >&6
8480else
8481  case $GUNZIP in
8482  [\\/]* | ?:[\\/]*)
8483  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8484  ;;
8485  *)
8486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8487for as_dir in $PATH
8488do
8489  IFS=$as_save_IFS
8490  test -z "$as_dir" && as_dir=.
8491    for ac_exec_ext in '' $ac_executable_extensions; do
8492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8493    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8495    break 2
8496  fi
8497done
8498  done
8499IFS=$as_save_IFS
8500
8501  ;;
8502esac
8503fi
8504GUNZIP=$ac_cv_path_GUNZIP
8505if test -n "$GUNZIP"; then
8506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8507$as_echo "$GUNZIP" >&6; }
8508else
8509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8510$as_echo "no" >&6; }
8511fi
8512
8513
8514  test -n "$GUNZIP" && break
8515done
8516
8517  else
8518    # The variable is set, but is it from the command line or the environment?
8519
8520    # Try to remove the string !GUNZIP! from our list.
8521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8523      # If it failed, the variable was not from the command line. Ignore it,
8524      # but warn the user (except for BASH, which is always set by the calling BASH).
8525      if test "xGUNZIP" != xBASH; then
8526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8527$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8528      fi
8529      # Try to locate tool using the code snippet
8530      for ac_prog in gunzip
8531do
8532  # Extract the first word of "$ac_prog", so it can be a program name with args.
8533set dummy $ac_prog; ac_word=$2
8534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8535$as_echo_n "checking for $ac_word... " >&6; }
8536if ${ac_cv_path_GUNZIP+:} false; then :
8537  $as_echo_n "(cached) " >&6
8538else
8539  case $GUNZIP in
8540  [\\/]* | ?:[\\/]*)
8541  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8542  ;;
8543  *)
8544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8545for as_dir in $PATH
8546do
8547  IFS=$as_save_IFS
8548  test -z "$as_dir" && as_dir=.
8549    for ac_exec_ext in '' $ac_executable_extensions; do
8550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8551    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8553    break 2
8554  fi
8555done
8556  done
8557IFS=$as_save_IFS
8558
8559  ;;
8560esac
8561fi
8562GUNZIP=$ac_cv_path_GUNZIP
8563if test -n "$GUNZIP"; then
8564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8565$as_echo "$GUNZIP" >&6; }
8566else
8567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8568$as_echo "no" >&6; }
8569fi
8570
8571
8572  test -n "$GUNZIP" && break
8573done
8574
8575    else
8576      # If it succeeded, then it was overridden by the user. We will use it
8577      # for the tool.
8578
8579      # First remove it from the list of overridden variables, so we can test
8580      # for unknown variables in the end.
8581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8582
8583      # Check if we try to supply an empty value
8584      if test "x$GUNZIP" = x; then
8585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8586$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8588$as_echo_n "checking for GUNZIP... " >&6; }
8589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8590$as_echo "disabled" >&6; }
8591      else
8592        # Check if the provided tool contains a complete path.
8593        tool_specified="$GUNZIP"
8594        tool_basename="${tool_specified##*/}"
8595        if test "x$tool_basename" = "x$tool_specified"; then
8596          # A command without a complete path is provided, search $PATH.
8597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8598$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8599          # Extract the first word of "$tool_basename", so it can be a program name with args.
8600set dummy $tool_basename; ac_word=$2
8601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8602$as_echo_n "checking for $ac_word... " >&6; }
8603if ${ac_cv_path_GUNZIP+:} false; then :
8604  $as_echo_n "(cached) " >&6
8605else
8606  case $GUNZIP in
8607  [\\/]* | ?:[\\/]*)
8608  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8609  ;;
8610  *)
8611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612for as_dir in $PATH
8613do
8614  IFS=$as_save_IFS
8615  test -z "$as_dir" && as_dir=.
8616    for ac_exec_ext in '' $ac_executable_extensions; do
8617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8618    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8620    break 2
8621  fi
8622done
8623  done
8624IFS=$as_save_IFS
8625
8626  ;;
8627esac
8628fi
8629GUNZIP=$ac_cv_path_GUNZIP
8630if test -n "$GUNZIP"; then
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8632$as_echo "$GUNZIP" >&6; }
8633else
8634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635$as_echo "no" >&6; }
8636fi
8637
8638
8639          if test "x$GUNZIP" = x; then
8640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8641          fi
8642        else
8643          # Otherwise we believe it is a complete path. Use it as it is.
8644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8645$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8647$as_echo_n "checking for GUNZIP... " >&6; }
8648          if test ! -x "$tool_specified"; then
8649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8650$as_echo "not found" >&6; }
8651            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8652          fi
8653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8654$as_echo "$tool_specified" >&6; }
8655        fi
8656      fi
8657    fi
8658
8659  fi
8660
8661
8662
8663  if test "x$GUNZIP" = x; then
8664    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8665  fi
8666
8667
8668
8669
8670
8671  # Publish this variable in the help.
8672
8673
8674  if [ -z "${GZIP+x}" ]; then
8675    # The variable is not set by user, try to locate tool using the code snippet
8676    for ac_prog in pigz gzip
8677do
8678  # Extract the first word of "$ac_prog", so it can be a program name with args.
8679set dummy $ac_prog; ac_word=$2
8680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8681$as_echo_n "checking for $ac_word... " >&6; }
8682if ${ac_cv_path_GZIP+:} false; then :
8683  $as_echo_n "(cached) " >&6
8684else
8685  case $GZIP in
8686  [\\/]* | ?:[\\/]*)
8687  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8688  ;;
8689  *)
8690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8691for as_dir in $PATH
8692do
8693  IFS=$as_save_IFS
8694  test -z "$as_dir" && as_dir=.
8695    for ac_exec_ext in '' $ac_executable_extensions; do
8696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8697    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8699    break 2
8700  fi
8701done
8702  done
8703IFS=$as_save_IFS
8704
8705  ;;
8706esac
8707fi
8708GZIP=$ac_cv_path_GZIP
8709if test -n "$GZIP"; then
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8711$as_echo "$GZIP" >&6; }
8712else
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714$as_echo "no" >&6; }
8715fi
8716
8717
8718  test -n "$GZIP" && break
8719done
8720
8721  else
8722    # The variable is set, but is it from the command line or the environment?
8723
8724    # Try to remove the string !GZIP! from our list.
8725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8727      # If it failed, the variable was not from the command line. Ignore it,
8728      # but warn the user (except for BASH, which is always set by the calling BASH).
8729      if test "xGZIP" != xBASH; then
8730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8731$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8732      fi
8733      # Try to locate tool using the code snippet
8734      for ac_prog in pigz gzip
8735do
8736  # Extract the first word of "$ac_prog", so it can be a program name with args.
8737set dummy $ac_prog; ac_word=$2
8738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8739$as_echo_n "checking for $ac_word... " >&6; }
8740if ${ac_cv_path_GZIP+:} false; then :
8741  $as_echo_n "(cached) " >&6
8742else
8743  case $GZIP in
8744  [\\/]* | ?:[\\/]*)
8745  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8746  ;;
8747  *)
8748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8749for as_dir in $PATH
8750do
8751  IFS=$as_save_IFS
8752  test -z "$as_dir" && as_dir=.
8753    for ac_exec_ext in '' $ac_executable_extensions; do
8754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8755    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8757    break 2
8758  fi
8759done
8760  done
8761IFS=$as_save_IFS
8762
8763  ;;
8764esac
8765fi
8766GZIP=$ac_cv_path_GZIP
8767if test -n "$GZIP"; then
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8769$as_echo "$GZIP" >&6; }
8770else
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8772$as_echo "no" >&6; }
8773fi
8774
8775
8776  test -n "$GZIP" && break
8777done
8778
8779    else
8780      # If it succeeded, then it was overridden by the user. We will use it
8781      # for the tool.
8782
8783      # First remove it from the list of overridden variables, so we can test
8784      # for unknown variables in the end.
8785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8786
8787      # Check if we try to supply an empty value
8788      if test "x$GZIP" = x; then
8789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8790$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8792$as_echo_n "checking for GZIP... " >&6; }
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8794$as_echo "disabled" >&6; }
8795      else
8796        # Check if the provided tool contains a complete path.
8797        tool_specified="$GZIP"
8798        tool_basename="${tool_specified##*/}"
8799        if test "x$tool_basename" = "x$tool_specified"; then
8800          # A command without a complete path is provided, search $PATH.
8801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8802$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8803          # Extract the first word of "$tool_basename", so it can be a program name with args.
8804set dummy $tool_basename; ac_word=$2
8805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8806$as_echo_n "checking for $ac_word... " >&6; }
8807if ${ac_cv_path_GZIP+:} false; then :
8808  $as_echo_n "(cached) " >&6
8809else
8810  case $GZIP in
8811  [\\/]* | ?:[\\/]*)
8812  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8813  ;;
8814  *)
8815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8816for as_dir in $PATH
8817do
8818  IFS=$as_save_IFS
8819  test -z "$as_dir" && as_dir=.
8820    for ac_exec_ext in '' $ac_executable_extensions; do
8821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8822    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8824    break 2
8825  fi
8826done
8827  done
8828IFS=$as_save_IFS
8829
8830  ;;
8831esac
8832fi
8833GZIP=$ac_cv_path_GZIP
8834if test -n "$GZIP"; then
8835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8836$as_echo "$GZIP" >&6; }
8837else
8838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8839$as_echo "no" >&6; }
8840fi
8841
8842
8843          if test "x$GZIP" = x; then
8844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8845          fi
8846        else
8847          # Otherwise we believe it is a complete path. Use it as it is.
8848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8849$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8851$as_echo_n "checking for GZIP... " >&6; }
8852          if test ! -x "$tool_specified"; then
8853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8854$as_echo "not found" >&6; }
8855            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8856          fi
8857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8858$as_echo "$tool_specified" >&6; }
8859        fi
8860      fi
8861    fi
8862
8863  fi
8864
8865
8866
8867  if test "x$GZIP" = x; then
8868    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8869  fi
8870
8871
8872
8873
8874
8875  # Publish this variable in the help.
8876
8877
8878  if [ -z "${LN+x}" ]; then
8879    # The variable is not set by user, try to locate tool using the code snippet
8880    for ac_prog in ln
8881do
8882  # Extract the first word of "$ac_prog", so it can be a program name with args.
8883set dummy $ac_prog; ac_word=$2
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8885$as_echo_n "checking for $ac_word... " >&6; }
8886if ${ac_cv_path_LN+:} false; then :
8887  $as_echo_n "(cached) " >&6
8888else
8889  case $LN in
8890  [\\/]* | ?:[\\/]*)
8891  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8892  ;;
8893  *)
8894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8895for as_dir in $PATH
8896do
8897  IFS=$as_save_IFS
8898  test -z "$as_dir" && as_dir=.
8899    for ac_exec_ext in '' $ac_executable_extensions; do
8900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8901    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8903    break 2
8904  fi
8905done
8906  done
8907IFS=$as_save_IFS
8908
8909  ;;
8910esac
8911fi
8912LN=$ac_cv_path_LN
8913if test -n "$LN"; then
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8915$as_echo "$LN" >&6; }
8916else
8917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8918$as_echo "no" >&6; }
8919fi
8920
8921
8922  test -n "$LN" && break
8923done
8924
8925  else
8926    # The variable is set, but is it from the command line or the environment?
8927
8928    # Try to remove the string !LN! from our list.
8929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8931      # If it failed, the variable was not from the command line. Ignore it,
8932      # but warn the user (except for BASH, which is always set by the calling BASH).
8933      if test "xLN" != xBASH; then
8934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8935$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8936      fi
8937      # Try to locate tool using the code snippet
8938      for ac_prog in ln
8939do
8940  # Extract the first word of "$ac_prog", so it can be a program name with args.
8941set dummy $ac_prog; ac_word=$2
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8943$as_echo_n "checking for $ac_word... " >&6; }
8944if ${ac_cv_path_LN+:} false; then :
8945  $as_echo_n "(cached) " >&6
8946else
8947  case $LN in
8948  [\\/]* | ?:[\\/]*)
8949  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8950  ;;
8951  *)
8952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8953for as_dir in $PATH
8954do
8955  IFS=$as_save_IFS
8956  test -z "$as_dir" && as_dir=.
8957    for ac_exec_ext in '' $ac_executable_extensions; do
8958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8959    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8961    break 2
8962  fi
8963done
8964  done
8965IFS=$as_save_IFS
8966
8967  ;;
8968esac
8969fi
8970LN=$ac_cv_path_LN
8971if test -n "$LN"; then
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8973$as_echo "$LN" >&6; }
8974else
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8976$as_echo "no" >&6; }
8977fi
8978
8979
8980  test -n "$LN" && break
8981done
8982
8983    else
8984      # If it succeeded, then it was overridden by the user. We will use it
8985      # for the tool.
8986
8987      # First remove it from the list of overridden variables, so we can test
8988      # for unknown variables in the end.
8989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8990
8991      # Check if we try to supply an empty value
8992      if test "x$LN" = x; then
8993        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8994$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8996$as_echo_n "checking for LN... " >&6; }
8997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8998$as_echo "disabled" >&6; }
8999      else
9000        # Check if the provided tool contains a complete path.
9001        tool_specified="$LN"
9002        tool_basename="${tool_specified##*/}"
9003        if test "x$tool_basename" = "x$tool_specified"; then
9004          # A command without a complete path is provided, search $PATH.
9005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9006$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9007          # Extract the first word of "$tool_basename", so it can be a program name with args.
9008set dummy $tool_basename; ac_word=$2
9009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9010$as_echo_n "checking for $ac_word... " >&6; }
9011if ${ac_cv_path_LN+:} false; then :
9012  $as_echo_n "(cached) " >&6
9013else
9014  case $LN in
9015  [\\/]* | ?:[\\/]*)
9016  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9017  ;;
9018  *)
9019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9020for as_dir in $PATH
9021do
9022  IFS=$as_save_IFS
9023  test -z "$as_dir" && as_dir=.
9024    for ac_exec_ext in '' $ac_executable_extensions; do
9025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9026    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9028    break 2
9029  fi
9030done
9031  done
9032IFS=$as_save_IFS
9033
9034  ;;
9035esac
9036fi
9037LN=$ac_cv_path_LN
9038if test -n "$LN"; then
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9040$as_echo "$LN" >&6; }
9041else
9042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9043$as_echo "no" >&6; }
9044fi
9045
9046
9047          if test "x$LN" = x; then
9048            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9049          fi
9050        else
9051          # Otherwise we believe it is a complete path. Use it as it is.
9052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9053$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9054          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9055$as_echo_n "checking for LN... " >&6; }
9056          if test ! -x "$tool_specified"; then
9057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9058$as_echo "not found" >&6; }
9059            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9060          fi
9061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9062$as_echo "$tool_specified" >&6; }
9063        fi
9064      fi
9065    fi
9066
9067  fi
9068
9069
9070
9071  if test "x$LN" = x; then
9072    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9073  fi
9074
9075
9076
9077
9078
9079  # Publish this variable in the help.
9080
9081
9082  if [ -z "${LS+x}" ]; then
9083    # The variable is not set by user, try to locate tool using the code snippet
9084    for ac_prog in ls
9085do
9086  # Extract the first word of "$ac_prog", so it can be a program name with args.
9087set dummy $ac_prog; ac_word=$2
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9089$as_echo_n "checking for $ac_word... " >&6; }
9090if ${ac_cv_path_LS+:} false; then :
9091  $as_echo_n "(cached) " >&6
9092else
9093  case $LS in
9094  [\\/]* | ?:[\\/]*)
9095  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9096  ;;
9097  *)
9098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9099for as_dir in $PATH
9100do
9101  IFS=$as_save_IFS
9102  test -z "$as_dir" && as_dir=.
9103    for ac_exec_ext in '' $ac_executable_extensions; do
9104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9105    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9107    break 2
9108  fi
9109done
9110  done
9111IFS=$as_save_IFS
9112
9113  ;;
9114esac
9115fi
9116LS=$ac_cv_path_LS
9117if test -n "$LS"; then
9118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9119$as_echo "$LS" >&6; }
9120else
9121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
9123fi
9124
9125
9126  test -n "$LS" && break
9127done
9128
9129  else
9130    # The variable is set, but is it from the command line or the environment?
9131
9132    # Try to remove the string !LS! from our list.
9133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9135      # If it failed, the variable was not from the command line. Ignore it,
9136      # but warn the user (except for BASH, which is always set by the calling BASH).
9137      if test "xLS" != xBASH; then
9138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9139$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9140      fi
9141      # Try to locate tool using the code snippet
9142      for ac_prog in ls
9143do
9144  # Extract the first word of "$ac_prog", so it can be a program name with args.
9145set dummy $ac_prog; ac_word=$2
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9147$as_echo_n "checking for $ac_word... " >&6; }
9148if ${ac_cv_path_LS+:} false; then :
9149  $as_echo_n "(cached) " >&6
9150else
9151  case $LS in
9152  [\\/]* | ?:[\\/]*)
9153  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9154  ;;
9155  *)
9156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9157for as_dir in $PATH
9158do
9159  IFS=$as_save_IFS
9160  test -z "$as_dir" && as_dir=.
9161    for ac_exec_ext in '' $ac_executable_extensions; do
9162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9163    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9165    break 2
9166  fi
9167done
9168  done
9169IFS=$as_save_IFS
9170
9171  ;;
9172esac
9173fi
9174LS=$ac_cv_path_LS
9175if test -n "$LS"; then
9176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9177$as_echo "$LS" >&6; }
9178else
9179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9180$as_echo "no" >&6; }
9181fi
9182
9183
9184  test -n "$LS" && break
9185done
9186
9187    else
9188      # If it succeeded, then it was overridden by the user. We will use it
9189      # for the tool.
9190
9191      # First remove it from the list of overridden variables, so we can test
9192      # for unknown variables in the end.
9193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9194
9195      # Check if we try to supply an empty value
9196      if test "x$LS" = x; then
9197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9198$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9200$as_echo_n "checking for LS... " >&6; }
9201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9202$as_echo "disabled" >&6; }
9203      else
9204        # Check if the provided tool contains a complete path.
9205        tool_specified="$LS"
9206        tool_basename="${tool_specified##*/}"
9207        if test "x$tool_basename" = "x$tool_specified"; then
9208          # A command without a complete path is provided, search $PATH.
9209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9210$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9211          # Extract the first word of "$tool_basename", so it can be a program name with args.
9212set dummy $tool_basename; ac_word=$2
9213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9214$as_echo_n "checking for $ac_word... " >&6; }
9215if ${ac_cv_path_LS+:} false; then :
9216  $as_echo_n "(cached) " >&6
9217else
9218  case $LS in
9219  [\\/]* | ?:[\\/]*)
9220  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9221  ;;
9222  *)
9223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9224for as_dir in $PATH
9225do
9226  IFS=$as_save_IFS
9227  test -z "$as_dir" && as_dir=.
9228    for ac_exec_ext in '' $ac_executable_extensions; do
9229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9230    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9232    break 2
9233  fi
9234done
9235  done
9236IFS=$as_save_IFS
9237
9238  ;;
9239esac
9240fi
9241LS=$ac_cv_path_LS
9242if test -n "$LS"; then
9243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9244$as_echo "$LS" >&6; }
9245else
9246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9247$as_echo "no" >&6; }
9248fi
9249
9250
9251          if test "x$LS" = x; then
9252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9253          fi
9254        else
9255          # Otherwise we believe it is a complete path. Use it as it is.
9256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9257$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9259$as_echo_n "checking for LS... " >&6; }
9260          if test ! -x "$tool_specified"; then
9261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9262$as_echo "not found" >&6; }
9263            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9264          fi
9265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9266$as_echo "$tool_specified" >&6; }
9267        fi
9268      fi
9269    fi
9270
9271  fi
9272
9273
9274
9275  if test "x$LS" = x; then
9276    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9277  fi
9278
9279
9280
9281
9282
9283  # Publish this variable in the help.
9284
9285
9286  if [ -z "${MKDIR+x}" ]; then
9287    # The variable is not set by user, try to locate tool using the code snippet
9288    for ac_prog in mkdir
9289do
9290  # Extract the first word of "$ac_prog", so it can be a program name with args.
9291set dummy $ac_prog; ac_word=$2
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9293$as_echo_n "checking for $ac_word... " >&6; }
9294if ${ac_cv_path_MKDIR+:} false; then :
9295  $as_echo_n "(cached) " >&6
9296else
9297  case $MKDIR in
9298  [\\/]* | ?:[\\/]*)
9299  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9300  ;;
9301  *)
9302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9303for as_dir in $PATH
9304do
9305  IFS=$as_save_IFS
9306  test -z "$as_dir" && as_dir=.
9307    for ac_exec_ext in '' $ac_executable_extensions; do
9308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9309    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9311    break 2
9312  fi
9313done
9314  done
9315IFS=$as_save_IFS
9316
9317  ;;
9318esac
9319fi
9320MKDIR=$ac_cv_path_MKDIR
9321if test -n "$MKDIR"; then
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9323$as_echo "$MKDIR" >&6; }
9324else
9325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
9327fi
9328
9329
9330  test -n "$MKDIR" && break
9331done
9332
9333  else
9334    # The variable is set, but is it from the command line or the environment?
9335
9336    # Try to remove the string !MKDIR! from our list.
9337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9339      # If it failed, the variable was not from the command line. Ignore it,
9340      # but warn the user (except for BASH, which is always set by the calling BASH).
9341      if test "xMKDIR" != xBASH; then
9342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9343$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9344      fi
9345      # Try to locate tool using the code snippet
9346      for ac_prog in mkdir
9347do
9348  # Extract the first word of "$ac_prog", so it can be a program name with args.
9349set dummy $ac_prog; ac_word=$2
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9351$as_echo_n "checking for $ac_word... " >&6; }
9352if ${ac_cv_path_MKDIR+:} false; then :
9353  $as_echo_n "(cached) " >&6
9354else
9355  case $MKDIR in
9356  [\\/]* | ?:[\\/]*)
9357  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9358  ;;
9359  *)
9360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9361for as_dir in $PATH
9362do
9363  IFS=$as_save_IFS
9364  test -z "$as_dir" && as_dir=.
9365    for ac_exec_ext in '' $ac_executable_extensions; do
9366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9367    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9369    break 2
9370  fi
9371done
9372  done
9373IFS=$as_save_IFS
9374
9375  ;;
9376esac
9377fi
9378MKDIR=$ac_cv_path_MKDIR
9379if test -n "$MKDIR"; then
9380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9381$as_echo "$MKDIR" >&6; }
9382else
9383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
9385fi
9386
9387
9388  test -n "$MKDIR" && break
9389done
9390
9391    else
9392      # If it succeeded, then it was overridden by the user. We will use it
9393      # for the tool.
9394
9395      # First remove it from the list of overridden variables, so we can test
9396      # for unknown variables in the end.
9397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9398
9399      # Check if we try to supply an empty value
9400      if test "x$MKDIR" = x; then
9401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9402$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9404$as_echo_n "checking for MKDIR... " >&6; }
9405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9406$as_echo "disabled" >&6; }
9407      else
9408        # Check if the provided tool contains a complete path.
9409        tool_specified="$MKDIR"
9410        tool_basename="${tool_specified##*/}"
9411        if test "x$tool_basename" = "x$tool_specified"; then
9412          # A command without a complete path is provided, search $PATH.
9413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9414$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9415          # Extract the first word of "$tool_basename", so it can be a program name with args.
9416set dummy $tool_basename; ac_word=$2
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9418$as_echo_n "checking for $ac_word... " >&6; }
9419if ${ac_cv_path_MKDIR+:} false; then :
9420  $as_echo_n "(cached) " >&6
9421else
9422  case $MKDIR in
9423  [\\/]* | ?:[\\/]*)
9424  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9425  ;;
9426  *)
9427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9428for as_dir in $PATH
9429do
9430  IFS=$as_save_IFS
9431  test -z "$as_dir" && as_dir=.
9432    for ac_exec_ext in '' $ac_executable_extensions; do
9433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9434    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9436    break 2
9437  fi
9438done
9439  done
9440IFS=$as_save_IFS
9441
9442  ;;
9443esac
9444fi
9445MKDIR=$ac_cv_path_MKDIR
9446if test -n "$MKDIR"; then
9447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9448$as_echo "$MKDIR" >&6; }
9449else
9450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9451$as_echo "no" >&6; }
9452fi
9453
9454
9455          if test "x$MKDIR" = x; then
9456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9457          fi
9458        else
9459          # Otherwise we believe it is a complete path. Use it as it is.
9460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9461$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9463$as_echo_n "checking for MKDIR... " >&6; }
9464          if test ! -x "$tool_specified"; then
9465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9466$as_echo "not found" >&6; }
9467            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9468          fi
9469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9470$as_echo "$tool_specified" >&6; }
9471        fi
9472      fi
9473    fi
9474
9475  fi
9476
9477
9478
9479  if test "x$MKDIR" = x; then
9480    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9481  fi
9482
9483
9484
9485
9486
9487  # Publish this variable in the help.
9488
9489
9490  if [ -z "${MKTEMP+x}" ]; then
9491    # The variable is not set by user, try to locate tool using the code snippet
9492    for ac_prog in mktemp
9493do
9494  # Extract the first word of "$ac_prog", so it can be a program name with args.
9495set dummy $ac_prog; ac_word=$2
9496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9497$as_echo_n "checking for $ac_word... " >&6; }
9498if ${ac_cv_path_MKTEMP+:} false; then :
9499  $as_echo_n "(cached) " >&6
9500else
9501  case $MKTEMP in
9502  [\\/]* | ?:[\\/]*)
9503  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9504  ;;
9505  *)
9506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9507for as_dir in $PATH
9508do
9509  IFS=$as_save_IFS
9510  test -z "$as_dir" && as_dir=.
9511    for ac_exec_ext in '' $ac_executable_extensions; do
9512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9513    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9515    break 2
9516  fi
9517done
9518  done
9519IFS=$as_save_IFS
9520
9521  ;;
9522esac
9523fi
9524MKTEMP=$ac_cv_path_MKTEMP
9525if test -n "$MKTEMP"; then
9526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9527$as_echo "$MKTEMP" >&6; }
9528else
9529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9530$as_echo "no" >&6; }
9531fi
9532
9533
9534  test -n "$MKTEMP" && break
9535done
9536
9537  else
9538    # The variable is set, but is it from the command line or the environment?
9539
9540    # Try to remove the string !MKTEMP! from our list.
9541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9543      # If it failed, the variable was not from the command line. Ignore it,
9544      # but warn the user (except for BASH, which is always set by the calling BASH).
9545      if test "xMKTEMP" != xBASH; then
9546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9547$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9548      fi
9549      # Try to locate tool using the code snippet
9550      for ac_prog in mktemp
9551do
9552  # Extract the first word of "$ac_prog", so it can be a program name with args.
9553set dummy $ac_prog; ac_word=$2
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9555$as_echo_n "checking for $ac_word... " >&6; }
9556if ${ac_cv_path_MKTEMP+:} false; then :
9557  $as_echo_n "(cached) " >&6
9558else
9559  case $MKTEMP in
9560  [\\/]* | ?:[\\/]*)
9561  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9562  ;;
9563  *)
9564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9565for as_dir in $PATH
9566do
9567  IFS=$as_save_IFS
9568  test -z "$as_dir" && as_dir=.
9569    for ac_exec_ext in '' $ac_executable_extensions; do
9570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9571    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9573    break 2
9574  fi
9575done
9576  done
9577IFS=$as_save_IFS
9578
9579  ;;
9580esac
9581fi
9582MKTEMP=$ac_cv_path_MKTEMP
9583if test -n "$MKTEMP"; then
9584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9585$as_echo "$MKTEMP" >&6; }
9586else
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
9589fi
9590
9591
9592  test -n "$MKTEMP" && break
9593done
9594
9595    else
9596      # If it succeeded, then it was overridden by the user. We will use it
9597      # for the tool.
9598
9599      # First remove it from the list of overridden variables, so we can test
9600      # for unknown variables in the end.
9601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9602
9603      # Check if we try to supply an empty value
9604      if test "x$MKTEMP" = x; then
9605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9606$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9608$as_echo_n "checking for MKTEMP... " >&6; }
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9610$as_echo "disabled" >&6; }
9611      else
9612        # Check if the provided tool contains a complete path.
9613        tool_specified="$MKTEMP"
9614        tool_basename="${tool_specified##*/}"
9615        if test "x$tool_basename" = "x$tool_specified"; then
9616          # A command without a complete path is provided, search $PATH.
9617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9618$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9619          # Extract the first word of "$tool_basename", so it can be a program name with args.
9620set dummy $tool_basename; ac_word=$2
9621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9622$as_echo_n "checking for $ac_word... " >&6; }
9623if ${ac_cv_path_MKTEMP+:} false; then :
9624  $as_echo_n "(cached) " >&6
9625else
9626  case $MKTEMP in
9627  [\\/]* | ?:[\\/]*)
9628  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9629  ;;
9630  *)
9631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9632for as_dir in $PATH
9633do
9634  IFS=$as_save_IFS
9635  test -z "$as_dir" && as_dir=.
9636    for ac_exec_ext in '' $ac_executable_extensions; do
9637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9638    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9640    break 2
9641  fi
9642done
9643  done
9644IFS=$as_save_IFS
9645
9646  ;;
9647esac
9648fi
9649MKTEMP=$ac_cv_path_MKTEMP
9650if test -n "$MKTEMP"; then
9651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9652$as_echo "$MKTEMP" >&6; }
9653else
9654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655$as_echo "no" >&6; }
9656fi
9657
9658
9659          if test "x$MKTEMP" = x; then
9660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9661          fi
9662        else
9663          # Otherwise we believe it is a complete path. Use it as it is.
9664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9665$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9667$as_echo_n "checking for MKTEMP... " >&6; }
9668          if test ! -x "$tool_specified"; then
9669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9670$as_echo "not found" >&6; }
9671            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9672          fi
9673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9674$as_echo "$tool_specified" >&6; }
9675        fi
9676      fi
9677    fi
9678
9679  fi
9680
9681
9682
9683  if test "x$MKTEMP" = x; then
9684    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9685  fi
9686
9687
9688
9689
9690
9691  # Publish this variable in the help.
9692
9693
9694  if [ -z "${MV+x}" ]; then
9695    # The variable is not set by user, try to locate tool using the code snippet
9696    for ac_prog in mv
9697do
9698  # Extract the first word of "$ac_prog", so it can be a program name with args.
9699set dummy $ac_prog; ac_word=$2
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9701$as_echo_n "checking for $ac_word... " >&6; }
9702if ${ac_cv_path_MV+:} false; then :
9703  $as_echo_n "(cached) " >&6
9704else
9705  case $MV in
9706  [\\/]* | ?:[\\/]*)
9707  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9708  ;;
9709  *)
9710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713  IFS=$as_save_IFS
9714  test -z "$as_dir" && as_dir=.
9715    for ac_exec_ext in '' $ac_executable_extensions; do
9716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719    break 2
9720  fi
9721done
9722  done
9723IFS=$as_save_IFS
9724
9725  ;;
9726esac
9727fi
9728MV=$ac_cv_path_MV
9729if test -n "$MV"; then
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9731$as_echo "$MV" >&6; }
9732else
9733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
9735fi
9736
9737
9738  test -n "$MV" && break
9739done
9740
9741  else
9742    # The variable is set, but is it from the command line or the environment?
9743
9744    # Try to remove the string !MV! from our list.
9745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9747      # If it failed, the variable was not from the command line. Ignore it,
9748      # but warn the user (except for BASH, which is always set by the calling BASH).
9749      if test "xMV" != xBASH; then
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9751$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9752      fi
9753      # Try to locate tool using the code snippet
9754      for ac_prog in mv
9755do
9756  # Extract the first word of "$ac_prog", so it can be a program name with args.
9757set dummy $ac_prog; ac_word=$2
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759$as_echo_n "checking for $ac_word... " >&6; }
9760if ${ac_cv_path_MV+:} false; then :
9761  $as_echo_n "(cached) " >&6
9762else
9763  case $MV in
9764  [\\/]* | ?:[\\/]*)
9765  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9766  ;;
9767  *)
9768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771  IFS=$as_save_IFS
9772  test -z "$as_dir" && as_dir=.
9773    for ac_exec_ext in '' $ac_executable_extensions; do
9774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777    break 2
9778  fi
9779done
9780  done
9781IFS=$as_save_IFS
9782
9783  ;;
9784esac
9785fi
9786MV=$ac_cv_path_MV
9787if test -n "$MV"; then
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9789$as_echo "$MV" >&6; }
9790else
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793fi
9794
9795
9796  test -n "$MV" && break
9797done
9798
9799    else
9800      # If it succeeded, then it was overridden by the user. We will use it
9801      # for the tool.
9802
9803      # First remove it from the list of overridden variables, so we can test
9804      # for unknown variables in the end.
9805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9806
9807      # Check if we try to supply an empty value
9808      if test "x$MV" = x; then
9809        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9810$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9812$as_echo_n "checking for MV... " >&6; }
9813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9814$as_echo "disabled" >&6; }
9815      else
9816        # Check if the provided tool contains a complete path.
9817        tool_specified="$MV"
9818        tool_basename="${tool_specified##*/}"
9819        if test "x$tool_basename" = "x$tool_specified"; then
9820          # A command without a complete path is provided, search $PATH.
9821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9822$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9823          # Extract the first word of "$tool_basename", so it can be a program name with args.
9824set dummy $tool_basename; ac_word=$2
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9826$as_echo_n "checking for $ac_word... " >&6; }
9827if ${ac_cv_path_MV+:} false; then :
9828  $as_echo_n "(cached) " >&6
9829else
9830  case $MV in
9831  [\\/]* | ?:[\\/]*)
9832  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9833  ;;
9834  *)
9835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9836for as_dir in $PATH
9837do
9838  IFS=$as_save_IFS
9839  test -z "$as_dir" && as_dir=.
9840    for ac_exec_ext in '' $ac_executable_extensions; do
9841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9842    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9844    break 2
9845  fi
9846done
9847  done
9848IFS=$as_save_IFS
9849
9850  ;;
9851esac
9852fi
9853MV=$ac_cv_path_MV
9854if test -n "$MV"; then
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9856$as_echo "$MV" >&6; }
9857else
9858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
9860fi
9861
9862
9863          if test "x$MV" = x; then
9864            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9865          fi
9866        else
9867          # Otherwise we believe it is a complete path. Use it as it is.
9868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9869$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9871$as_echo_n "checking for MV... " >&6; }
9872          if test ! -x "$tool_specified"; then
9873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9874$as_echo "not found" >&6; }
9875            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9876          fi
9877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9878$as_echo "$tool_specified" >&6; }
9879        fi
9880      fi
9881    fi
9882
9883  fi
9884
9885
9886
9887  if test "x$MV" = x; then
9888    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9889  fi
9890
9891
9892
9893
9894
9895  # Publish this variable in the help.
9896
9897
9898  if [ -z "${NAWK+x}" ]; then
9899    # The variable is not set by user, try to locate tool using the code snippet
9900    for ac_prog in nawk gawk awk
9901do
9902  # Extract the first word of "$ac_prog", so it can be a program name with args.
9903set dummy $ac_prog; ac_word=$2
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905$as_echo_n "checking for $ac_word... " >&6; }
9906if ${ac_cv_path_NAWK+:} false; then :
9907  $as_echo_n "(cached) " >&6
9908else
9909  case $NAWK in
9910  [\\/]* | ?:[\\/]*)
9911  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9912  ;;
9913  *)
9914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915for as_dir in $PATH
9916do
9917  IFS=$as_save_IFS
9918  test -z "$as_dir" && as_dir=.
9919    for ac_exec_ext in '' $ac_executable_extensions; do
9920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9921    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923    break 2
9924  fi
9925done
9926  done
9927IFS=$as_save_IFS
9928
9929  ;;
9930esac
9931fi
9932NAWK=$ac_cv_path_NAWK
9933if test -n "$NAWK"; then
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9935$as_echo "$NAWK" >&6; }
9936else
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938$as_echo "no" >&6; }
9939fi
9940
9941
9942  test -n "$NAWK" && break
9943done
9944
9945  else
9946    # The variable is set, but is it from the command line or the environment?
9947
9948    # Try to remove the string !NAWK! from our list.
9949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9951      # If it failed, the variable was not from the command line. Ignore it,
9952      # but warn the user (except for BASH, which is always set by the calling BASH).
9953      if test "xNAWK" != xBASH; then
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9955$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9956      fi
9957      # Try to locate tool using the code snippet
9958      for ac_prog in nawk gawk awk
9959do
9960  # Extract the first word of "$ac_prog", so it can be a program name with args.
9961set dummy $ac_prog; ac_word=$2
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9963$as_echo_n "checking for $ac_word... " >&6; }
9964if ${ac_cv_path_NAWK+:} false; then :
9965  $as_echo_n "(cached) " >&6
9966else
9967  case $NAWK in
9968  [\\/]* | ?:[\\/]*)
9969  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9970  ;;
9971  *)
9972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9973for as_dir in $PATH
9974do
9975  IFS=$as_save_IFS
9976  test -z "$as_dir" && as_dir=.
9977    for ac_exec_ext in '' $ac_executable_extensions; do
9978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9979    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9981    break 2
9982  fi
9983done
9984  done
9985IFS=$as_save_IFS
9986
9987  ;;
9988esac
9989fi
9990NAWK=$ac_cv_path_NAWK
9991if test -n "$NAWK"; then
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9993$as_echo "$NAWK" >&6; }
9994else
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997fi
9998
9999
10000  test -n "$NAWK" && break
10001done
10002
10003    else
10004      # If it succeeded, then it was overridden by the user. We will use it
10005      # for the tool.
10006
10007      # First remove it from the list of overridden variables, so we can test
10008      # for unknown variables in the end.
10009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10010
10011      # Check if we try to supply an empty value
10012      if test "x$NAWK" = x; then
10013        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10014$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10016$as_echo_n "checking for NAWK... " >&6; }
10017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10018$as_echo "disabled" >&6; }
10019      else
10020        # Check if the provided tool contains a complete path.
10021        tool_specified="$NAWK"
10022        tool_basename="${tool_specified##*/}"
10023        if test "x$tool_basename" = "x$tool_specified"; then
10024          # A command without a complete path is provided, search $PATH.
10025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10026$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10027          # Extract the first word of "$tool_basename", so it can be a program name with args.
10028set dummy $tool_basename; ac_word=$2
10029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10030$as_echo_n "checking for $ac_word... " >&6; }
10031if ${ac_cv_path_NAWK+:} false; then :
10032  $as_echo_n "(cached) " >&6
10033else
10034  case $NAWK in
10035  [\\/]* | ?:[\\/]*)
10036  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10037  ;;
10038  *)
10039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10040for as_dir in $PATH
10041do
10042  IFS=$as_save_IFS
10043  test -z "$as_dir" && as_dir=.
10044    for ac_exec_ext in '' $ac_executable_extensions; do
10045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10046    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10048    break 2
10049  fi
10050done
10051  done
10052IFS=$as_save_IFS
10053
10054  ;;
10055esac
10056fi
10057NAWK=$ac_cv_path_NAWK
10058if test -n "$NAWK"; then
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10060$as_echo "$NAWK" >&6; }
10061else
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
10064fi
10065
10066
10067          if test "x$NAWK" = x; then
10068            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10069          fi
10070        else
10071          # Otherwise we believe it is a complete path. Use it as it is.
10072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10073$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10074          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10075$as_echo_n "checking for NAWK... " >&6; }
10076          if test ! -x "$tool_specified"; then
10077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10078$as_echo "not found" >&6; }
10079            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10080          fi
10081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10082$as_echo "$tool_specified" >&6; }
10083        fi
10084      fi
10085    fi
10086
10087  fi
10088
10089
10090
10091  if test "x$NAWK" = x; then
10092    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10093  fi
10094
10095
10096
10097
10098
10099  # Publish this variable in the help.
10100
10101
10102  if [ -z "${PRINTF+x}" ]; then
10103    # The variable is not set by user, try to locate tool using the code snippet
10104    for ac_prog in printf
10105do
10106  # Extract the first word of "$ac_prog", so it can be a program name with args.
10107set dummy $ac_prog; ac_word=$2
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10109$as_echo_n "checking for $ac_word... " >&6; }
10110if ${ac_cv_path_PRINTF+:} false; then :
10111  $as_echo_n "(cached) " >&6
10112else
10113  case $PRINTF in
10114  [\\/]* | ?:[\\/]*)
10115  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10116  ;;
10117  *)
10118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10119for as_dir in $PATH
10120do
10121  IFS=$as_save_IFS
10122  test -z "$as_dir" && as_dir=.
10123    for ac_exec_ext in '' $ac_executable_extensions; do
10124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10125    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10127    break 2
10128  fi
10129done
10130  done
10131IFS=$as_save_IFS
10132
10133  ;;
10134esac
10135fi
10136PRINTF=$ac_cv_path_PRINTF
10137if test -n "$PRINTF"; then
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10139$as_echo "$PRINTF" >&6; }
10140else
10141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10142$as_echo "no" >&6; }
10143fi
10144
10145
10146  test -n "$PRINTF" && break
10147done
10148
10149  else
10150    # The variable is set, but is it from the command line or the environment?
10151
10152    # Try to remove the string !PRINTF! from our list.
10153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10155      # If it failed, the variable was not from the command line. Ignore it,
10156      # but warn the user (except for BASH, which is always set by the calling BASH).
10157      if test "xPRINTF" != xBASH; then
10158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10159$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10160      fi
10161      # Try to locate tool using the code snippet
10162      for ac_prog in printf
10163do
10164  # Extract the first word of "$ac_prog", so it can be a program name with args.
10165set dummy $ac_prog; ac_word=$2
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10167$as_echo_n "checking for $ac_word... " >&6; }
10168if ${ac_cv_path_PRINTF+:} false; then :
10169  $as_echo_n "(cached) " >&6
10170else
10171  case $PRINTF in
10172  [\\/]* | ?:[\\/]*)
10173  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10174  ;;
10175  *)
10176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10177for as_dir in $PATH
10178do
10179  IFS=$as_save_IFS
10180  test -z "$as_dir" && as_dir=.
10181    for ac_exec_ext in '' $ac_executable_extensions; do
10182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10183    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10185    break 2
10186  fi
10187done
10188  done
10189IFS=$as_save_IFS
10190
10191  ;;
10192esac
10193fi
10194PRINTF=$ac_cv_path_PRINTF
10195if test -n "$PRINTF"; then
10196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10197$as_echo "$PRINTF" >&6; }
10198else
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
10201fi
10202
10203
10204  test -n "$PRINTF" && break
10205done
10206
10207    else
10208      # If it succeeded, then it was overridden by the user. We will use it
10209      # for the tool.
10210
10211      # First remove it from the list of overridden variables, so we can test
10212      # for unknown variables in the end.
10213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10214
10215      # Check if we try to supply an empty value
10216      if test "x$PRINTF" = x; then
10217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10218$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10220$as_echo_n "checking for PRINTF... " >&6; }
10221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10222$as_echo "disabled" >&6; }
10223      else
10224        # Check if the provided tool contains a complete path.
10225        tool_specified="$PRINTF"
10226        tool_basename="${tool_specified##*/}"
10227        if test "x$tool_basename" = "x$tool_specified"; then
10228          # A command without a complete path is provided, search $PATH.
10229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10230$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10231          # Extract the first word of "$tool_basename", so it can be a program name with args.
10232set dummy $tool_basename; ac_word=$2
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10234$as_echo_n "checking for $ac_word... " >&6; }
10235if ${ac_cv_path_PRINTF+:} false; then :
10236  $as_echo_n "(cached) " >&6
10237else
10238  case $PRINTF in
10239  [\\/]* | ?:[\\/]*)
10240  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10241  ;;
10242  *)
10243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10244for as_dir in $PATH
10245do
10246  IFS=$as_save_IFS
10247  test -z "$as_dir" && as_dir=.
10248    for ac_exec_ext in '' $ac_executable_extensions; do
10249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10250    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10252    break 2
10253  fi
10254done
10255  done
10256IFS=$as_save_IFS
10257
10258  ;;
10259esac
10260fi
10261PRINTF=$ac_cv_path_PRINTF
10262if test -n "$PRINTF"; then
10263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10264$as_echo "$PRINTF" >&6; }
10265else
10266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10267$as_echo "no" >&6; }
10268fi
10269
10270
10271          if test "x$PRINTF" = x; then
10272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10273          fi
10274        else
10275          # Otherwise we believe it is a complete path. Use it as it is.
10276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10277$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10279$as_echo_n "checking for PRINTF... " >&6; }
10280          if test ! -x "$tool_specified"; then
10281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10282$as_echo "not found" >&6; }
10283            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10284          fi
10285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10286$as_echo "$tool_specified" >&6; }
10287        fi
10288      fi
10289    fi
10290
10291  fi
10292
10293
10294
10295  if test "x$PRINTF" = x; then
10296    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10297  fi
10298
10299
10300
10301
10302
10303  # Publish this variable in the help.
10304
10305
10306  if [ -z "${RM+x}" ]; then
10307    # The variable is not set by user, try to locate tool using the code snippet
10308    for ac_prog in rm
10309do
10310  # Extract the first word of "$ac_prog", so it can be a program name with args.
10311set dummy $ac_prog; ac_word=$2
10312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10313$as_echo_n "checking for $ac_word... " >&6; }
10314if ${ac_cv_path_RM+:} false; then :
10315  $as_echo_n "(cached) " >&6
10316else
10317  case $RM in
10318  [\\/]* | ?:[\\/]*)
10319  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10320  ;;
10321  *)
10322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10323for as_dir in $PATH
10324do
10325  IFS=$as_save_IFS
10326  test -z "$as_dir" && as_dir=.
10327    for ac_exec_ext in '' $ac_executable_extensions; do
10328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10329    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10331    break 2
10332  fi
10333done
10334  done
10335IFS=$as_save_IFS
10336
10337  ;;
10338esac
10339fi
10340RM=$ac_cv_path_RM
10341if test -n "$RM"; then
10342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10343$as_echo "$RM" >&6; }
10344else
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346$as_echo "no" >&6; }
10347fi
10348
10349
10350  test -n "$RM" && break
10351done
10352
10353  else
10354    # The variable is set, but is it from the command line or the environment?
10355
10356    # Try to remove the string !RM! from our list.
10357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10359      # If it failed, the variable was not from the command line. Ignore it,
10360      # but warn the user (except for BASH, which is always set by the calling BASH).
10361      if test "xRM" != xBASH; then
10362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10363$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10364      fi
10365      # Try to locate tool using the code snippet
10366      for ac_prog in rm
10367do
10368  # Extract the first word of "$ac_prog", so it can be a program name with args.
10369set dummy $ac_prog; ac_word=$2
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10371$as_echo_n "checking for $ac_word... " >&6; }
10372if ${ac_cv_path_RM+:} false; then :
10373  $as_echo_n "(cached) " >&6
10374else
10375  case $RM in
10376  [\\/]* | ?:[\\/]*)
10377  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10378  ;;
10379  *)
10380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10381for as_dir in $PATH
10382do
10383  IFS=$as_save_IFS
10384  test -z "$as_dir" && as_dir=.
10385    for ac_exec_ext in '' $ac_executable_extensions; do
10386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10387    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10389    break 2
10390  fi
10391done
10392  done
10393IFS=$as_save_IFS
10394
10395  ;;
10396esac
10397fi
10398RM=$ac_cv_path_RM
10399if test -n "$RM"; then
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10401$as_echo "$RM" >&6; }
10402else
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
10405fi
10406
10407
10408  test -n "$RM" && break
10409done
10410
10411    else
10412      # If it succeeded, then it was overridden by the user. We will use it
10413      # for the tool.
10414
10415      # First remove it from the list of overridden variables, so we can test
10416      # for unknown variables in the end.
10417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10418
10419      # Check if we try to supply an empty value
10420      if test "x$RM" = x; then
10421        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10422$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10424$as_echo_n "checking for RM... " >&6; }
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10426$as_echo "disabled" >&6; }
10427      else
10428        # Check if the provided tool contains a complete path.
10429        tool_specified="$RM"
10430        tool_basename="${tool_specified##*/}"
10431        if test "x$tool_basename" = "x$tool_specified"; then
10432          # A command without a complete path is provided, search $PATH.
10433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10434$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10435          # Extract the first word of "$tool_basename", so it can be a program name with args.
10436set dummy $tool_basename; ac_word=$2
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10438$as_echo_n "checking for $ac_word... " >&6; }
10439if ${ac_cv_path_RM+:} false; then :
10440  $as_echo_n "(cached) " >&6
10441else
10442  case $RM in
10443  [\\/]* | ?:[\\/]*)
10444  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10445  ;;
10446  *)
10447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10448for as_dir in $PATH
10449do
10450  IFS=$as_save_IFS
10451  test -z "$as_dir" && as_dir=.
10452    for ac_exec_ext in '' $ac_executable_extensions; do
10453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10454    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10456    break 2
10457  fi
10458done
10459  done
10460IFS=$as_save_IFS
10461
10462  ;;
10463esac
10464fi
10465RM=$ac_cv_path_RM
10466if test -n "$RM"; then
10467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10468$as_echo "$RM" >&6; }
10469else
10470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
10472fi
10473
10474
10475          if test "x$RM" = x; then
10476            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10477          fi
10478        else
10479          # Otherwise we believe it is a complete path. Use it as it is.
10480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10481$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10482          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10483$as_echo_n "checking for RM... " >&6; }
10484          if test ! -x "$tool_specified"; then
10485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10486$as_echo "not found" >&6; }
10487            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10488          fi
10489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10490$as_echo "$tool_specified" >&6; }
10491        fi
10492      fi
10493    fi
10494
10495  fi
10496
10497
10498
10499  if test "x$RM" = x; then
10500    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10501  fi
10502
10503
10504
10505
10506
10507  # Publish this variable in the help.
10508
10509
10510  if [ -z "${RMDIR+x}" ]; then
10511    # The variable is not set by user, try to locate tool using the code snippet
10512    for ac_prog in rmdir
10513do
10514  # Extract the first word of "$ac_prog", so it can be a program name with args.
10515set dummy $ac_prog; ac_word=$2
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10517$as_echo_n "checking for $ac_word... " >&6; }
10518if ${ac_cv_path_RMDIR+:} false; then :
10519  $as_echo_n "(cached) " >&6
10520else
10521  case $RMDIR in
10522  [\\/]* | ?:[\\/]*)
10523  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10524  ;;
10525  *)
10526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10527for as_dir in $PATH
10528do
10529  IFS=$as_save_IFS
10530  test -z "$as_dir" && as_dir=.
10531    for ac_exec_ext in '' $ac_executable_extensions; do
10532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10533    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10535    break 2
10536  fi
10537done
10538  done
10539IFS=$as_save_IFS
10540
10541  ;;
10542esac
10543fi
10544RMDIR=$ac_cv_path_RMDIR
10545if test -n "$RMDIR"; then
10546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10547$as_echo "$RMDIR" >&6; }
10548else
10549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
10551fi
10552
10553
10554  test -n "$RMDIR" && break
10555done
10556
10557  else
10558    # The variable is set, but is it from the command line or the environment?
10559
10560    # Try to remove the string !RMDIR! from our list.
10561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10563      # If it failed, the variable was not from the command line. Ignore it,
10564      # but warn the user (except for BASH, which is always set by the calling BASH).
10565      if test "xRMDIR" != xBASH; then
10566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10567$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10568      fi
10569      # Try to locate tool using the code snippet
10570      for ac_prog in rmdir
10571do
10572  # Extract the first word of "$ac_prog", so it can be a program name with args.
10573set dummy $ac_prog; ac_word=$2
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10575$as_echo_n "checking for $ac_word... " >&6; }
10576if ${ac_cv_path_RMDIR+:} false; then :
10577  $as_echo_n "(cached) " >&6
10578else
10579  case $RMDIR in
10580  [\\/]* | ?:[\\/]*)
10581  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10582  ;;
10583  *)
10584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10585for as_dir in $PATH
10586do
10587  IFS=$as_save_IFS
10588  test -z "$as_dir" && as_dir=.
10589    for ac_exec_ext in '' $ac_executable_extensions; do
10590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10591    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10593    break 2
10594  fi
10595done
10596  done
10597IFS=$as_save_IFS
10598
10599  ;;
10600esac
10601fi
10602RMDIR=$ac_cv_path_RMDIR
10603if test -n "$RMDIR"; then
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10605$as_echo "$RMDIR" >&6; }
10606else
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
10609fi
10610
10611
10612  test -n "$RMDIR" && break
10613done
10614
10615    else
10616      # If it succeeded, then it was overridden by the user. We will use it
10617      # for the tool.
10618
10619      # First remove it from the list of overridden variables, so we can test
10620      # for unknown variables in the end.
10621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10622
10623      # Check if we try to supply an empty value
10624      if test "x$RMDIR" = x; then
10625        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10626$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10627        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10628$as_echo_n "checking for RMDIR... " >&6; }
10629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10630$as_echo "disabled" >&6; }
10631      else
10632        # Check if the provided tool contains a complete path.
10633        tool_specified="$RMDIR"
10634        tool_basename="${tool_specified##*/}"
10635        if test "x$tool_basename" = "x$tool_specified"; then
10636          # A command without a complete path is provided, search $PATH.
10637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10638$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10639          # Extract the first word of "$tool_basename", so it can be a program name with args.
10640set dummy $tool_basename; ac_word=$2
10641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10642$as_echo_n "checking for $ac_word... " >&6; }
10643if ${ac_cv_path_RMDIR+:} false; then :
10644  $as_echo_n "(cached) " >&6
10645else
10646  case $RMDIR in
10647  [\\/]* | ?:[\\/]*)
10648  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10649  ;;
10650  *)
10651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10652for as_dir in $PATH
10653do
10654  IFS=$as_save_IFS
10655  test -z "$as_dir" && as_dir=.
10656    for ac_exec_ext in '' $ac_executable_extensions; do
10657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10658    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10660    break 2
10661  fi
10662done
10663  done
10664IFS=$as_save_IFS
10665
10666  ;;
10667esac
10668fi
10669RMDIR=$ac_cv_path_RMDIR
10670if test -n "$RMDIR"; then
10671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10672$as_echo "$RMDIR" >&6; }
10673else
10674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
10676fi
10677
10678
10679          if test "x$RMDIR" = x; then
10680            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10681          fi
10682        else
10683          # Otherwise we believe it is a complete path. Use it as it is.
10684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10685$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10686          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10687$as_echo_n "checking for RMDIR... " >&6; }
10688          if test ! -x "$tool_specified"; then
10689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10690$as_echo "not found" >&6; }
10691            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10692          fi
10693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10694$as_echo "$tool_specified" >&6; }
10695        fi
10696      fi
10697    fi
10698
10699  fi
10700
10701
10702
10703  if test "x$RMDIR" = x; then
10704    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10705  fi
10706
10707
10708
10709
10710
10711  # Publish this variable in the help.
10712
10713
10714  if [ -z "${SH+x}" ]; then
10715    # The variable is not set by user, try to locate tool using the code snippet
10716    for ac_prog in sh
10717do
10718  # Extract the first word of "$ac_prog", so it can be a program name with args.
10719set dummy $ac_prog; ac_word=$2
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10721$as_echo_n "checking for $ac_word... " >&6; }
10722if ${ac_cv_path_SH+:} false; then :
10723  $as_echo_n "(cached) " >&6
10724else
10725  case $SH in
10726  [\\/]* | ?:[\\/]*)
10727  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10728  ;;
10729  *)
10730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10731for as_dir in $PATH
10732do
10733  IFS=$as_save_IFS
10734  test -z "$as_dir" && as_dir=.
10735    for ac_exec_ext in '' $ac_executable_extensions; do
10736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10737    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10739    break 2
10740  fi
10741done
10742  done
10743IFS=$as_save_IFS
10744
10745  ;;
10746esac
10747fi
10748SH=$ac_cv_path_SH
10749if test -n "$SH"; then
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10751$as_echo "$SH" >&6; }
10752else
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
10755fi
10756
10757
10758  test -n "$SH" && break
10759done
10760
10761  else
10762    # The variable is set, but is it from the command line or the environment?
10763
10764    # Try to remove the string !SH! from our list.
10765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10767      # If it failed, the variable was not from the command line. Ignore it,
10768      # but warn the user (except for BASH, which is always set by the calling BASH).
10769      if test "xSH" != xBASH; then
10770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10771$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10772      fi
10773      # Try to locate tool using the code snippet
10774      for ac_prog in sh
10775do
10776  # Extract the first word of "$ac_prog", so it can be a program name with args.
10777set dummy $ac_prog; ac_word=$2
10778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10779$as_echo_n "checking for $ac_word... " >&6; }
10780if ${ac_cv_path_SH+:} false; then :
10781  $as_echo_n "(cached) " >&6
10782else
10783  case $SH in
10784  [\\/]* | ?:[\\/]*)
10785  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10786  ;;
10787  *)
10788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10789for as_dir in $PATH
10790do
10791  IFS=$as_save_IFS
10792  test -z "$as_dir" && as_dir=.
10793    for ac_exec_ext in '' $ac_executable_extensions; do
10794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10795    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10797    break 2
10798  fi
10799done
10800  done
10801IFS=$as_save_IFS
10802
10803  ;;
10804esac
10805fi
10806SH=$ac_cv_path_SH
10807if test -n "$SH"; then
10808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10809$as_echo "$SH" >&6; }
10810else
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10812$as_echo "no" >&6; }
10813fi
10814
10815
10816  test -n "$SH" && break
10817done
10818
10819    else
10820      # If it succeeded, then it was overridden by the user. We will use it
10821      # for the tool.
10822
10823      # First remove it from the list of overridden variables, so we can test
10824      # for unknown variables in the end.
10825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10826
10827      # Check if we try to supply an empty value
10828      if test "x$SH" = x; then
10829        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10830$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10832$as_echo_n "checking for SH... " >&6; }
10833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10834$as_echo "disabled" >&6; }
10835      else
10836        # Check if the provided tool contains a complete path.
10837        tool_specified="$SH"
10838        tool_basename="${tool_specified##*/}"
10839        if test "x$tool_basename" = "x$tool_specified"; then
10840          # A command without a complete path is provided, search $PATH.
10841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10842$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10843          # Extract the first word of "$tool_basename", so it can be a program name with args.
10844set dummy $tool_basename; ac_word=$2
10845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10846$as_echo_n "checking for $ac_word... " >&6; }
10847if ${ac_cv_path_SH+:} false; then :
10848  $as_echo_n "(cached) " >&6
10849else
10850  case $SH in
10851  [\\/]* | ?:[\\/]*)
10852  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10853  ;;
10854  *)
10855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10856for as_dir in $PATH
10857do
10858  IFS=$as_save_IFS
10859  test -z "$as_dir" && as_dir=.
10860    for ac_exec_ext in '' $ac_executable_extensions; do
10861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10862    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10864    break 2
10865  fi
10866done
10867  done
10868IFS=$as_save_IFS
10869
10870  ;;
10871esac
10872fi
10873SH=$ac_cv_path_SH
10874if test -n "$SH"; then
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10876$as_echo "$SH" >&6; }
10877else
10878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879$as_echo "no" >&6; }
10880fi
10881
10882
10883          if test "x$SH" = x; then
10884            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10885          fi
10886        else
10887          # Otherwise we believe it is a complete path. Use it as it is.
10888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10889$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10890          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10891$as_echo_n "checking for SH... " >&6; }
10892          if test ! -x "$tool_specified"; then
10893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10894$as_echo "not found" >&6; }
10895            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10896          fi
10897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10898$as_echo "$tool_specified" >&6; }
10899        fi
10900      fi
10901    fi
10902
10903  fi
10904
10905
10906
10907  if test "x$SH" = x; then
10908    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10909  fi
10910
10911
10912
10913
10914
10915  # Publish this variable in the help.
10916
10917
10918  if [ -z "${SORT+x}" ]; then
10919    # The variable is not set by user, try to locate tool using the code snippet
10920    for ac_prog in sort
10921do
10922  # Extract the first word of "$ac_prog", so it can be a program name with args.
10923set dummy $ac_prog; ac_word=$2
10924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10925$as_echo_n "checking for $ac_word... " >&6; }
10926if ${ac_cv_path_SORT+:} false; then :
10927  $as_echo_n "(cached) " >&6
10928else
10929  case $SORT in
10930  [\\/]* | ?:[\\/]*)
10931  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10932  ;;
10933  *)
10934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10935for as_dir in $PATH
10936do
10937  IFS=$as_save_IFS
10938  test -z "$as_dir" && as_dir=.
10939    for ac_exec_ext in '' $ac_executable_extensions; do
10940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10941    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10943    break 2
10944  fi
10945done
10946  done
10947IFS=$as_save_IFS
10948
10949  ;;
10950esac
10951fi
10952SORT=$ac_cv_path_SORT
10953if test -n "$SORT"; then
10954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10955$as_echo "$SORT" >&6; }
10956else
10957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
10959fi
10960
10961
10962  test -n "$SORT" && break
10963done
10964
10965  else
10966    # The variable is set, but is it from the command line or the environment?
10967
10968    # Try to remove the string !SORT! from our list.
10969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10971      # If it failed, the variable was not from the command line. Ignore it,
10972      # but warn the user (except for BASH, which is always set by the calling BASH).
10973      if test "xSORT" != xBASH; then
10974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10975$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10976      fi
10977      # Try to locate tool using the code snippet
10978      for ac_prog in sort
10979do
10980  # Extract the first word of "$ac_prog", so it can be a program name with args.
10981set dummy $ac_prog; ac_word=$2
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10983$as_echo_n "checking for $ac_word... " >&6; }
10984if ${ac_cv_path_SORT+:} false; then :
10985  $as_echo_n "(cached) " >&6
10986else
10987  case $SORT in
10988  [\\/]* | ?:[\\/]*)
10989  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10990  ;;
10991  *)
10992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10993for as_dir in $PATH
10994do
10995  IFS=$as_save_IFS
10996  test -z "$as_dir" && as_dir=.
10997    for ac_exec_ext in '' $ac_executable_extensions; do
10998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10999    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11001    break 2
11002  fi
11003done
11004  done
11005IFS=$as_save_IFS
11006
11007  ;;
11008esac
11009fi
11010SORT=$ac_cv_path_SORT
11011if test -n "$SORT"; then
11012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11013$as_echo "$SORT" >&6; }
11014else
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
11017fi
11018
11019
11020  test -n "$SORT" && break
11021done
11022
11023    else
11024      # If it succeeded, then it was overridden by the user. We will use it
11025      # for the tool.
11026
11027      # First remove it from the list of overridden variables, so we can test
11028      # for unknown variables in the end.
11029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11030
11031      # Check if we try to supply an empty value
11032      if test "x$SORT" = x; then
11033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11034$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11036$as_echo_n "checking for SORT... " >&6; }
11037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11038$as_echo "disabled" >&6; }
11039      else
11040        # Check if the provided tool contains a complete path.
11041        tool_specified="$SORT"
11042        tool_basename="${tool_specified##*/}"
11043        if test "x$tool_basename" = "x$tool_specified"; then
11044          # A command without a complete path is provided, search $PATH.
11045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11046$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11047          # Extract the first word of "$tool_basename", so it can be a program name with args.
11048set dummy $tool_basename; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_SORT+:} false; then :
11052  $as_echo_n "(cached) " >&6
11053else
11054  case $SORT in
11055  [\\/]* | ?:[\\/]*)
11056  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11057  ;;
11058  *)
11059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062  IFS=$as_save_IFS
11063  test -z "$as_dir" && as_dir=.
11064    for ac_exec_ext in '' $ac_executable_extensions; do
11065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068    break 2
11069  fi
11070done
11071  done
11072IFS=$as_save_IFS
11073
11074  ;;
11075esac
11076fi
11077SORT=$ac_cv_path_SORT
11078if test -n "$SORT"; then
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11080$as_echo "$SORT" >&6; }
11081else
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
11084fi
11085
11086
11087          if test "x$SORT" = x; then
11088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11089          fi
11090        else
11091          # Otherwise we believe it is a complete path. Use it as it is.
11092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11093$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11095$as_echo_n "checking for SORT... " >&6; }
11096          if test ! -x "$tool_specified"; then
11097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11098$as_echo "not found" >&6; }
11099            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11100          fi
11101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11102$as_echo "$tool_specified" >&6; }
11103        fi
11104      fi
11105    fi
11106
11107  fi
11108
11109
11110
11111  if test "x$SORT" = x; then
11112    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11113  fi
11114
11115
11116
11117
11118
11119  # Publish this variable in the help.
11120
11121
11122  if [ -z "${TAIL+x}" ]; then
11123    # The variable is not set by user, try to locate tool using the code snippet
11124    for ac_prog in tail
11125do
11126  # Extract the first word of "$ac_prog", so it can be a program name with args.
11127set dummy $ac_prog; ac_word=$2
11128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11129$as_echo_n "checking for $ac_word... " >&6; }
11130if ${ac_cv_path_TAIL+:} false; then :
11131  $as_echo_n "(cached) " >&6
11132else
11133  case $TAIL in
11134  [\\/]* | ?:[\\/]*)
11135  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11136  ;;
11137  *)
11138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11139for as_dir in $PATH
11140do
11141  IFS=$as_save_IFS
11142  test -z "$as_dir" && as_dir=.
11143    for ac_exec_ext in '' $ac_executable_extensions; do
11144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11145    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11147    break 2
11148  fi
11149done
11150  done
11151IFS=$as_save_IFS
11152
11153  ;;
11154esac
11155fi
11156TAIL=$ac_cv_path_TAIL
11157if test -n "$TAIL"; then
11158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11159$as_echo "$TAIL" >&6; }
11160else
11161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11162$as_echo "no" >&6; }
11163fi
11164
11165
11166  test -n "$TAIL" && break
11167done
11168
11169  else
11170    # The variable is set, but is it from the command line or the environment?
11171
11172    # Try to remove the string !TAIL! from our list.
11173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11175      # If it failed, the variable was not from the command line. Ignore it,
11176      # but warn the user (except for BASH, which is always set by the calling BASH).
11177      if test "xTAIL" != xBASH; then
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11179$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11180      fi
11181      # Try to locate tool using the code snippet
11182      for ac_prog in tail
11183do
11184  # Extract the first word of "$ac_prog", so it can be a program name with args.
11185set dummy $ac_prog; ac_word=$2
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11187$as_echo_n "checking for $ac_word... " >&6; }
11188if ${ac_cv_path_TAIL+:} false; then :
11189  $as_echo_n "(cached) " >&6
11190else
11191  case $TAIL in
11192  [\\/]* | ?:[\\/]*)
11193  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11194  ;;
11195  *)
11196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11197for as_dir in $PATH
11198do
11199  IFS=$as_save_IFS
11200  test -z "$as_dir" && as_dir=.
11201    for ac_exec_ext in '' $ac_executable_extensions; do
11202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11203    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11205    break 2
11206  fi
11207done
11208  done
11209IFS=$as_save_IFS
11210
11211  ;;
11212esac
11213fi
11214TAIL=$ac_cv_path_TAIL
11215if test -n "$TAIL"; then
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11217$as_echo "$TAIL" >&6; }
11218else
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220$as_echo "no" >&6; }
11221fi
11222
11223
11224  test -n "$TAIL" && break
11225done
11226
11227    else
11228      # If it succeeded, then it was overridden by the user. We will use it
11229      # for the tool.
11230
11231      # First remove it from the list of overridden variables, so we can test
11232      # for unknown variables in the end.
11233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11234
11235      # Check if we try to supply an empty value
11236      if test "x$TAIL" = x; then
11237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11238$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11240$as_echo_n "checking for TAIL... " >&6; }
11241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11242$as_echo "disabled" >&6; }
11243      else
11244        # Check if the provided tool contains a complete path.
11245        tool_specified="$TAIL"
11246        tool_basename="${tool_specified##*/}"
11247        if test "x$tool_basename" = "x$tool_specified"; then
11248          # A command without a complete path is provided, search $PATH.
11249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11250$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11251          # Extract the first word of "$tool_basename", so it can be a program name with args.
11252set dummy $tool_basename; ac_word=$2
11253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11254$as_echo_n "checking for $ac_word... " >&6; }
11255if ${ac_cv_path_TAIL+:} false; then :
11256  $as_echo_n "(cached) " >&6
11257else
11258  case $TAIL in
11259  [\\/]* | ?:[\\/]*)
11260  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11261  ;;
11262  *)
11263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11264for as_dir in $PATH
11265do
11266  IFS=$as_save_IFS
11267  test -z "$as_dir" && as_dir=.
11268    for ac_exec_ext in '' $ac_executable_extensions; do
11269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11270    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11272    break 2
11273  fi
11274done
11275  done
11276IFS=$as_save_IFS
11277
11278  ;;
11279esac
11280fi
11281TAIL=$ac_cv_path_TAIL
11282if test -n "$TAIL"; then
11283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11284$as_echo "$TAIL" >&6; }
11285else
11286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11287$as_echo "no" >&6; }
11288fi
11289
11290
11291          if test "x$TAIL" = x; then
11292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11293          fi
11294        else
11295          # Otherwise we believe it is a complete path. Use it as it is.
11296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11297$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11299$as_echo_n "checking for TAIL... " >&6; }
11300          if test ! -x "$tool_specified"; then
11301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11302$as_echo "not found" >&6; }
11303            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11304          fi
11305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11306$as_echo "$tool_specified" >&6; }
11307        fi
11308      fi
11309    fi
11310
11311  fi
11312
11313
11314
11315  if test "x$TAIL" = x; then
11316    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11317  fi
11318
11319
11320
11321
11322
11323  # Publish this variable in the help.
11324
11325
11326  if [ -z "${TAR+x}" ]; then
11327    # The variable is not set by user, try to locate tool using the code snippet
11328    for ac_prog in gtar tar
11329do
11330  # Extract the first word of "$ac_prog", so it can be a program name with args.
11331set dummy $ac_prog; ac_word=$2
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11333$as_echo_n "checking for $ac_word... " >&6; }
11334if ${ac_cv_path_TAR+:} false; then :
11335  $as_echo_n "(cached) " >&6
11336else
11337  case $TAR in
11338  [\\/]* | ?:[\\/]*)
11339  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11340  ;;
11341  *)
11342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11343for as_dir in $PATH
11344do
11345  IFS=$as_save_IFS
11346  test -z "$as_dir" && as_dir=.
11347    for ac_exec_ext in '' $ac_executable_extensions; do
11348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11349    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11351    break 2
11352  fi
11353done
11354  done
11355IFS=$as_save_IFS
11356
11357  ;;
11358esac
11359fi
11360TAR=$ac_cv_path_TAR
11361if test -n "$TAR"; then
11362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11363$as_echo "$TAR" >&6; }
11364else
11365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11366$as_echo "no" >&6; }
11367fi
11368
11369
11370  test -n "$TAR" && break
11371done
11372
11373  else
11374    # The variable is set, but is it from the command line or the environment?
11375
11376    # Try to remove the string !TAR! from our list.
11377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11379      # If it failed, the variable was not from the command line. Ignore it,
11380      # but warn the user (except for BASH, which is always set by the calling BASH).
11381      if test "xTAR" != xBASH; then
11382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11383$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11384      fi
11385      # Try to locate tool using the code snippet
11386      for ac_prog in gtar tar
11387do
11388  # Extract the first word of "$ac_prog", so it can be a program name with args.
11389set dummy $ac_prog; ac_word=$2
11390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11391$as_echo_n "checking for $ac_word... " >&6; }
11392if ${ac_cv_path_TAR+:} false; then :
11393  $as_echo_n "(cached) " >&6
11394else
11395  case $TAR in
11396  [\\/]* | ?:[\\/]*)
11397  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11398  ;;
11399  *)
11400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11401for as_dir in $PATH
11402do
11403  IFS=$as_save_IFS
11404  test -z "$as_dir" && as_dir=.
11405    for ac_exec_ext in '' $ac_executable_extensions; do
11406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11407    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11409    break 2
11410  fi
11411done
11412  done
11413IFS=$as_save_IFS
11414
11415  ;;
11416esac
11417fi
11418TAR=$ac_cv_path_TAR
11419if test -n "$TAR"; then
11420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11421$as_echo "$TAR" >&6; }
11422else
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11424$as_echo "no" >&6; }
11425fi
11426
11427
11428  test -n "$TAR" && break
11429done
11430
11431    else
11432      # If it succeeded, then it was overridden by the user. We will use it
11433      # for the tool.
11434
11435      # First remove it from the list of overridden variables, so we can test
11436      # for unknown variables in the end.
11437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11438
11439      # Check if we try to supply an empty value
11440      if test "x$TAR" = x; then
11441        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11442$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11444$as_echo_n "checking for TAR... " >&6; }
11445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11446$as_echo "disabled" >&6; }
11447      else
11448        # Check if the provided tool contains a complete path.
11449        tool_specified="$TAR"
11450        tool_basename="${tool_specified##*/}"
11451        if test "x$tool_basename" = "x$tool_specified"; then
11452          # A command without a complete path is provided, search $PATH.
11453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11454$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11455          # Extract the first word of "$tool_basename", so it can be a program name with args.
11456set dummy $tool_basename; ac_word=$2
11457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11458$as_echo_n "checking for $ac_word... " >&6; }
11459if ${ac_cv_path_TAR+:} false; then :
11460  $as_echo_n "(cached) " >&6
11461else
11462  case $TAR in
11463  [\\/]* | ?:[\\/]*)
11464  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11465  ;;
11466  *)
11467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11468for as_dir in $PATH
11469do
11470  IFS=$as_save_IFS
11471  test -z "$as_dir" && as_dir=.
11472    for ac_exec_ext in '' $ac_executable_extensions; do
11473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11474    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11476    break 2
11477  fi
11478done
11479  done
11480IFS=$as_save_IFS
11481
11482  ;;
11483esac
11484fi
11485TAR=$ac_cv_path_TAR
11486if test -n "$TAR"; then
11487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11488$as_echo "$TAR" >&6; }
11489else
11490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11491$as_echo "no" >&6; }
11492fi
11493
11494
11495          if test "x$TAR" = x; then
11496            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11497          fi
11498        else
11499          # Otherwise we believe it is a complete path. Use it as it is.
11500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11501$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11502          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11503$as_echo_n "checking for TAR... " >&6; }
11504          if test ! -x "$tool_specified"; then
11505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11506$as_echo "not found" >&6; }
11507            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11508          fi
11509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11510$as_echo "$tool_specified" >&6; }
11511        fi
11512      fi
11513    fi
11514
11515  fi
11516
11517
11518
11519  if test "x$TAR" = x; then
11520    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11521  fi
11522
11523
11524
11525
11526
11527  # Publish this variable in the help.
11528
11529
11530  if [ -z "${TEE+x}" ]; then
11531    # The variable is not set by user, try to locate tool using the code snippet
11532    for ac_prog in tee
11533do
11534  # Extract the first word of "$ac_prog", so it can be a program name with args.
11535set dummy $ac_prog; ac_word=$2
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11537$as_echo_n "checking for $ac_word... " >&6; }
11538if ${ac_cv_path_TEE+:} false; then :
11539  $as_echo_n "(cached) " >&6
11540else
11541  case $TEE in
11542  [\\/]* | ?:[\\/]*)
11543  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11544  ;;
11545  *)
11546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11547for as_dir in $PATH
11548do
11549  IFS=$as_save_IFS
11550  test -z "$as_dir" && as_dir=.
11551    for ac_exec_ext in '' $ac_executable_extensions; do
11552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11553    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11555    break 2
11556  fi
11557done
11558  done
11559IFS=$as_save_IFS
11560
11561  ;;
11562esac
11563fi
11564TEE=$ac_cv_path_TEE
11565if test -n "$TEE"; then
11566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11567$as_echo "$TEE" >&6; }
11568else
11569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
11571fi
11572
11573
11574  test -n "$TEE" && break
11575done
11576
11577  else
11578    # The variable is set, but is it from the command line or the environment?
11579
11580    # Try to remove the string !TEE! from our list.
11581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11583      # If it failed, the variable was not from the command line. Ignore it,
11584      # but warn the user (except for BASH, which is always set by the calling BASH).
11585      if test "xTEE" != xBASH; then
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11587$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11588      fi
11589      # Try to locate tool using the code snippet
11590      for ac_prog in tee
11591do
11592  # Extract the first word of "$ac_prog", so it can be a program name with args.
11593set dummy $ac_prog; ac_word=$2
11594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11595$as_echo_n "checking for $ac_word... " >&6; }
11596if ${ac_cv_path_TEE+:} false; then :
11597  $as_echo_n "(cached) " >&6
11598else
11599  case $TEE in
11600  [\\/]* | ?:[\\/]*)
11601  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11602  ;;
11603  *)
11604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11605for as_dir in $PATH
11606do
11607  IFS=$as_save_IFS
11608  test -z "$as_dir" && as_dir=.
11609    for ac_exec_ext in '' $ac_executable_extensions; do
11610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11611    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11613    break 2
11614  fi
11615done
11616  done
11617IFS=$as_save_IFS
11618
11619  ;;
11620esac
11621fi
11622TEE=$ac_cv_path_TEE
11623if test -n "$TEE"; then
11624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11625$as_echo "$TEE" >&6; }
11626else
11627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
11629fi
11630
11631
11632  test -n "$TEE" && break
11633done
11634
11635    else
11636      # If it succeeded, then it was overridden by the user. We will use it
11637      # for the tool.
11638
11639      # First remove it from the list of overridden variables, so we can test
11640      # for unknown variables in the end.
11641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11642
11643      # Check if we try to supply an empty value
11644      if test "x$TEE" = x; then
11645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11646$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11648$as_echo_n "checking for TEE... " >&6; }
11649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11650$as_echo "disabled" >&6; }
11651      else
11652        # Check if the provided tool contains a complete path.
11653        tool_specified="$TEE"
11654        tool_basename="${tool_specified##*/}"
11655        if test "x$tool_basename" = "x$tool_specified"; then
11656          # A command without a complete path is provided, search $PATH.
11657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11658$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11659          # Extract the first word of "$tool_basename", so it can be a program name with args.
11660set dummy $tool_basename; ac_word=$2
11661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11662$as_echo_n "checking for $ac_word... " >&6; }
11663if ${ac_cv_path_TEE+:} false; then :
11664  $as_echo_n "(cached) " >&6
11665else
11666  case $TEE in
11667  [\\/]* | ?:[\\/]*)
11668  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11669  ;;
11670  *)
11671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11672for as_dir in $PATH
11673do
11674  IFS=$as_save_IFS
11675  test -z "$as_dir" && as_dir=.
11676    for ac_exec_ext in '' $ac_executable_extensions; do
11677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11678    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11680    break 2
11681  fi
11682done
11683  done
11684IFS=$as_save_IFS
11685
11686  ;;
11687esac
11688fi
11689TEE=$ac_cv_path_TEE
11690if test -n "$TEE"; then
11691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11692$as_echo "$TEE" >&6; }
11693else
11694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11695$as_echo "no" >&6; }
11696fi
11697
11698
11699          if test "x$TEE" = x; then
11700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11701          fi
11702        else
11703          # Otherwise we believe it is a complete path. Use it as it is.
11704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11705$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11707$as_echo_n "checking for TEE... " >&6; }
11708          if test ! -x "$tool_specified"; then
11709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11710$as_echo "not found" >&6; }
11711            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11712          fi
11713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11714$as_echo "$tool_specified" >&6; }
11715        fi
11716      fi
11717    fi
11718
11719  fi
11720
11721
11722
11723  if test "x$TEE" = x; then
11724    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11725  fi
11726
11727
11728
11729
11730
11731  # Publish this variable in the help.
11732
11733
11734  if [ -z "${TOUCH+x}" ]; then
11735    # The variable is not set by user, try to locate tool using the code snippet
11736    for ac_prog in touch
11737do
11738  # Extract the first word of "$ac_prog", so it can be a program name with args.
11739set dummy $ac_prog; ac_word=$2
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11741$as_echo_n "checking for $ac_word... " >&6; }
11742if ${ac_cv_path_TOUCH+:} false; then :
11743  $as_echo_n "(cached) " >&6
11744else
11745  case $TOUCH in
11746  [\\/]* | ?:[\\/]*)
11747  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11748  ;;
11749  *)
11750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11751for as_dir in $PATH
11752do
11753  IFS=$as_save_IFS
11754  test -z "$as_dir" && as_dir=.
11755    for ac_exec_ext in '' $ac_executable_extensions; do
11756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11757    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11759    break 2
11760  fi
11761done
11762  done
11763IFS=$as_save_IFS
11764
11765  ;;
11766esac
11767fi
11768TOUCH=$ac_cv_path_TOUCH
11769if test -n "$TOUCH"; then
11770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11771$as_echo "$TOUCH" >&6; }
11772else
11773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11774$as_echo "no" >&6; }
11775fi
11776
11777
11778  test -n "$TOUCH" && break
11779done
11780
11781  else
11782    # The variable is set, but is it from the command line or the environment?
11783
11784    # Try to remove the string !TOUCH! from our list.
11785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11787      # If it failed, the variable was not from the command line. Ignore it,
11788      # but warn the user (except for BASH, which is always set by the calling BASH).
11789      if test "xTOUCH" != xBASH; then
11790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11791$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11792      fi
11793      # Try to locate tool using the code snippet
11794      for ac_prog in touch
11795do
11796  # Extract the first word of "$ac_prog", so it can be a program name with args.
11797set dummy $ac_prog; ac_word=$2
11798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11799$as_echo_n "checking for $ac_word... " >&6; }
11800if ${ac_cv_path_TOUCH+:} false; then :
11801  $as_echo_n "(cached) " >&6
11802else
11803  case $TOUCH in
11804  [\\/]* | ?:[\\/]*)
11805  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11806  ;;
11807  *)
11808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11809for as_dir in $PATH
11810do
11811  IFS=$as_save_IFS
11812  test -z "$as_dir" && as_dir=.
11813    for ac_exec_ext in '' $ac_executable_extensions; do
11814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11815    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11817    break 2
11818  fi
11819done
11820  done
11821IFS=$as_save_IFS
11822
11823  ;;
11824esac
11825fi
11826TOUCH=$ac_cv_path_TOUCH
11827if test -n "$TOUCH"; then
11828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11829$as_echo "$TOUCH" >&6; }
11830else
11831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11832$as_echo "no" >&6; }
11833fi
11834
11835
11836  test -n "$TOUCH" && break
11837done
11838
11839    else
11840      # If it succeeded, then it was overridden by the user. We will use it
11841      # for the tool.
11842
11843      # First remove it from the list of overridden variables, so we can test
11844      # for unknown variables in the end.
11845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11846
11847      # Check if we try to supply an empty value
11848      if test "x$TOUCH" = x; then
11849        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11850$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11852$as_echo_n "checking for TOUCH... " >&6; }
11853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11854$as_echo "disabled" >&6; }
11855      else
11856        # Check if the provided tool contains a complete path.
11857        tool_specified="$TOUCH"
11858        tool_basename="${tool_specified##*/}"
11859        if test "x$tool_basename" = "x$tool_specified"; then
11860          # A command without a complete path is provided, search $PATH.
11861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11862$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11863          # Extract the first word of "$tool_basename", so it can be a program name with args.
11864set dummy $tool_basename; ac_word=$2
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11866$as_echo_n "checking for $ac_word... " >&6; }
11867if ${ac_cv_path_TOUCH+:} false; then :
11868  $as_echo_n "(cached) " >&6
11869else
11870  case $TOUCH in
11871  [\\/]* | ?:[\\/]*)
11872  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11873  ;;
11874  *)
11875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11876for as_dir in $PATH
11877do
11878  IFS=$as_save_IFS
11879  test -z "$as_dir" && as_dir=.
11880    for ac_exec_ext in '' $ac_executable_extensions; do
11881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11882    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11884    break 2
11885  fi
11886done
11887  done
11888IFS=$as_save_IFS
11889
11890  ;;
11891esac
11892fi
11893TOUCH=$ac_cv_path_TOUCH
11894if test -n "$TOUCH"; then
11895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11896$as_echo "$TOUCH" >&6; }
11897else
11898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11899$as_echo "no" >&6; }
11900fi
11901
11902
11903          if test "x$TOUCH" = x; then
11904            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11905          fi
11906        else
11907          # Otherwise we believe it is a complete path. Use it as it is.
11908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11909$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11910          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11911$as_echo_n "checking for TOUCH... " >&6; }
11912          if test ! -x "$tool_specified"; then
11913            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11914$as_echo "not found" >&6; }
11915            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11916          fi
11917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11918$as_echo "$tool_specified" >&6; }
11919        fi
11920      fi
11921    fi
11922
11923  fi
11924
11925
11926
11927  if test "x$TOUCH" = x; then
11928    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11929  fi
11930
11931
11932
11933
11934
11935  # Publish this variable in the help.
11936
11937
11938  if [ -z "${TR+x}" ]; then
11939    # The variable is not set by user, try to locate tool using the code snippet
11940    for ac_prog in tr
11941do
11942  # Extract the first word of "$ac_prog", so it can be a program name with args.
11943set dummy $ac_prog; ac_word=$2
11944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11945$as_echo_n "checking for $ac_word... " >&6; }
11946if ${ac_cv_path_TR+:} false; then :
11947  $as_echo_n "(cached) " >&6
11948else
11949  case $TR in
11950  [\\/]* | ?:[\\/]*)
11951  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11952  ;;
11953  *)
11954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11955for as_dir in $PATH
11956do
11957  IFS=$as_save_IFS
11958  test -z "$as_dir" && as_dir=.
11959    for ac_exec_ext in '' $ac_executable_extensions; do
11960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11961    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11963    break 2
11964  fi
11965done
11966  done
11967IFS=$as_save_IFS
11968
11969  ;;
11970esac
11971fi
11972TR=$ac_cv_path_TR
11973if test -n "$TR"; then
11974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11975$as_echo "$TR" >&6; }
11976else
11977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
11979fi
11980
11981
11982  test -n "$TR" && break
11983done
11984
11985  else
11986    # The variable is set, but is it from the command line or the environment?
11987
11988    # Try to remove the string !TR! from our list.
11989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11991      # If it failed, the variable was not from the command line. Ignore it,
11992      # but warn the user (except for BASH, which is always set by the calling BASH).
11993      if test "xTR" != xBASH; then
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11995$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11996      fi
11997      # Try to locate tool using the code snippet
11998      for ac_prog in tr
11999do
12000  # Extract the first word of "$ac_prog", so it can be a program name with args.
12001set dummy $ac_prog; ac_word=$2
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12003$as_echo_n "checking for $ac_word... " >&6; }
12004if ${ac_cv_path_TR+:} false; then :
12005  $as_echo_n "(cached) " >&6
12006else
12007  case $TR in
12008  [\\/]* | ?:[\\/]*)
12009  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12010  ;;
12011  *)
12012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12013for as_dir in $PATH
12014do
12015  IFS=$as_save_IFS
12016  test -z "$as_dir" && as_dir=.
12017    for ac_exec_ext in '' $ac_executable_extensions; do
12018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12019    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12021    break 2
12022  fi
12023done
12024  done
12025IFS=$as_save_IFS
12026
12027  ;;
12028esac
12029fi
12030TR=$ac_cv_path_TR
12031if test -n "$TR"; then
12032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12033$as_echo "$TR" >&6; }
12034else
12035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
12037fi
12038
12039
12040  test -n "$TR" && break
12041done
12042
12043    else
12044      # If it succeeded, then it was overridden by the user. We will use it
12045      # for the tool.
12046
12047      # First remove it from the list of overridden variables, so we can test
12048      # for unknown variables in the end.
12049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12050
12051      # Check if we try to supply an empty value
12052      if test "x$TR" = x; then
12053        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12054$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12056$as_echo_n "checking for TR... " >&6; }
12057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12058$as_echo "disabled" >&6; }
12059      else
12060        # Check if the provided tool contains a complete path.
12061        tool_specified="$TR"
12062        tool_basename="${tool_specified##*/}"
12063        if test "x$tool_basename" = "x$tool_specified"; then
12064          # A command without a complete path is provided, search $PATH.
12065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12066$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12067          # Extract the first word of "$tool_basename", so it can be a program name with args.
12068set dummy $tool_basename; ac_word=$2
12069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12070$as_echo_n "checking for $ac_word... " >&6; }
12071if ${ac_cv_path_TR+:} false; then :
12072  $as_echo_n "(cached) " >&6
12073else
12074  case $TR in
12075  [\\/]* | ?:[\\/]*)
12076  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12077  ;;
12078  *)
12079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12080for as_dir in $PATH
12081do
12082  IFS=$as_save_IFS
12083  test -z "$as_dir" && as_dir=.
12084    for ac_exec_ext in '' $ac_executable_extensions; do
12085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12086    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12088    break 2
12089  fi
12090done
12091  done
12092IFS=$as_save_IFS
12093
12094  ;;
12095esac
12096fi
12097TR=$ac_cv_path_TR
12098if test -n "$TR"; then
12099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12100$as_echo "$TR" >&6; }
12101else
12102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12103$as_echo "no" >&6; }
12104fi
12105
12106
12107          if test "x$TR" = x; then
12108            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12109          fi
12110        else
12111          # Otherwise we believe it is a complete path. Use it as it is.
12112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12113$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12114          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12115$as_echo_n "checking for TR... " >&6; }
12116          if test ! -x "$tool_specified"; then
12117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12118$as_echo "not found" >&6; }
12119            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12120          fi
12121          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12122$as_echo "$tool_specified" >&6; }
12123        fi
12124      fi
12125    fi
12126
12127  fi
12128
12129
12130
12131  if test "x$TR" = x; then
12132    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12133  fi
12134
12135
12136
12137
12138
12139  # Publish this variable in the help.
12140
12141
12142  if [ -z "${UNAME+x}" ]; then
12143    # The variable is not set by user, try to locate tool using the code snippet
12144    for ac_prog in uname
12145do
12146  # Extract the first word of "$ac_prog", so it can be a program name with args.
12147set dummy $ac_prog; ac_word=$2
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12149$as_echo_n "checking for $ac_word... " >&6; }
12150if ${ac_cv_path_UNAME+:} false; then :
12151  $as_echo_n "(cached) " >&6
12152else
12153  case $UNAME in
12154  [\\/]* | ?:[\\/]*)
12155  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12156  ;;
12157  *)
12158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159for as_dir in $PATH
12160do
12161  IFS=$as_save_IFS
12162  test -z "$as_dir" && as_dir=.
12163    for ac_exec_ext in '' $ac_executable_extensions; do
12164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12165    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12167    break 2
12168  fi
12169done
12170  done
12171IFS=$as_save_IFS
12172
12173  ;;
12174esac
12175fi
12176UNAME=$ac_cv_path_UNAME
12177if test -n "$UNAME"; then
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12179$as_echo "$UNAME" >&6; }
12180else
12181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
12183fi
12184
12185
12186  test -n "$UNAME" && break
12187done
12188
12189  else
12190    # The variable is set, but is it from the command line or the environment?
12191
12192    # Try to remove the string !UNAME! from our list.
12193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12195      # If it failed, the variable was not from the command line. Ignore it,
12196      # but warn the user (except for BASH, which is always set by the calling BASH).
12197      if test "xUNAME" != xBASH; then
12198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12199$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12200      fi
12201      # Try to locate tool using the code snippet
12202      for ac_prog in uname
12203do
12204  # Extract the first word of "$ac_prog", so it can be a program name with args.
12205set dummy $ac_prog; ac_word=$2
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12207$as_echo_n "checking for $ac_word... " >&6; }
12208if ${ac_cv_path_UNAME+:} false; then :
12209  $as_echo_n "(cached) " >&6
12210else
12211  case $UNAME in
12212  [\\/]* | ?:[\\/]*)
12213  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12214  ;;
12215  *)
12216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12217for as_dir in $PATH
12218do
12219  IFS=$as_save_IFS
12220  test -z "$as_dir" && as_dir=.
12221    for ac_exec_ext in '' $ac_executable_extensions; do
12222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12223    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12225    break 2
12226  fi
12227done
12228  done
12229IFS=$as_save_IFS
12230
12231  ;;
12232esac
12233fi
12234UNAME=$ac_cv_path_UNAME
12235if test -n "$UNAME"; then
12236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12237$as_echo "$UNAME" >&6; }
12238else
12239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240$as_echo "no" >&6; }
12241fi
12242
12243
12244  test -n "$UNAME" && break
12245done
12246
12247    else
12248      # If it succeeded, then it was overridden by the user. We will use it
12249      # for the tool.
12250
12251      # First remove it from the list of overridden variables, so we can test
12252      # for unknown variables in the end.
12253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12254
12255      # Check if we try to supply an empty value
12256      if test "x$UNAME" = x; then
12257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12258$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12260$as_echo_n "checking for UNAME... " >&6; }
12261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12262$as_echo "disabled" >&6; }
12263      else
12264        # Check if the provided tool contains a complete path.
12265        tool_specified="$UNAME"
12266        tool_basename="${tool_specified##*/}"
12267        if test "x$tool_basename" = "x$tool_specified"; then
12268          # A command without a complete path is provided, search $PATH.
12269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12270$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12271          # Extract the first word of "$tool_basename", so it can be a program name with args.
12272set dummy $tool_basename; ac_word=$2
12273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12274$as_echo_n "checking for $ac_word... " >&6; }
12275if ${ac_cv_path_UNAME+:} false; then :
12276  $as_echo_n "(cached) " >&6
12277else
12278  case $UNAME in
12279  [\\/]* | ?:[\\/]*)
12280  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12281  ;;
12282  *)
12283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12284for as_dir in $PATH
12285do
12286  IFS=$as_save_IFS
12287  test -z "$as_dir" && as_dir=.
12288    for ac_exec_ext in '' $ac_executable_extensions; do
12289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12290    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12292    break 2
12293  fi
12294done
12295  done
12296IFS=$as_save_IFS
12297
12298  ;;
12299esac
12300fi
12301UNAME=$ac_cv_path_UNAME
12302if test -n "$UNAME"; then
12303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12304$as_echo "$UNAME" >&6; }
12305else
12306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12307$as_echo "no" >&6; }
12308fi
12309
12310
12311          if test "x$UNAME" = x; then
12312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12313          fi
12314        else
12315          # Otherwise we believe it is a complete path. Use it as it is.
12316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12317$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12319$as_echo_n "checking for UNAME... " >&6; }
12320          if test ! -x "$tool_specified"; then
12321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12322$as_echo "not found" >&6; }
12323            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12324          fi
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12326$as_echo "$tool_specified" >&6; }
12327        fi
12328      fi
12329    fi
12330
12331  fi
12332
12333
12334
12335  if test "x$UNAME" = x; then
12336    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12337  fi
12338
12339
12340
12341
12342
12343  # Publish this variable in the help.
12344
12345
12346  if [ -z "${UNIQ+x}" ]; then
12347    # The variable is not set by user, try to locate tool using the code snippet
12348    for ac_prog in uniq
12349do
12350  # Extract the first word of "$ac_prog", so it can be a program name with args.
12351set dummy $ac_prog; ac_word=$2
12352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12353$as_echo_n "checking for $ac_word... " >&6; }
12354if ${ac_cv_path_UNIQ+:} false; then :
12355  $as_echo_n "(cached) " >&6
12356else
12357  case $UNIQ in
12358  [\\/]* | ?:[\\/]*)
12359  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12360  ;;
12361  *)
12362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12363for as_dir in $PATH
12364do
12365  IFS=$as_save_IFS
12366  test -z "$as_dir" && as_dir=.
12367    for ac_exec_ext in '' $ac_executable_extensions; do
12368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12369    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12371    break 2
12372  fi
12373done
12374  done
12375IFS=$as_save_IFS
12376
12377  ;;
12378esac
12379fi
12380UNIQ=$ac_cv_path_UNIQ
12381if test -n "$UNIQ"; then
12382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12383$as_echo "$UNIQ" >&6; }
12384else
12385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12386$as_echo "no" >&6; }
12387fi
12388
12389
12390  test -n "$UNIQ" && break
12391done
12392
12393  else
12394    # The variable is set, but is it from the command line or the environment?
12395
12396    # Try to remove the string !UNIQ! from our list.
12397    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12398    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12399      # If it failed, the variable was not from the command line. Ignore it,
12400      # but warn the user (except for BASH, which is always set by the calling BASH).
12401      if test "xUNIQ" != xBASH; then
12402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12403$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12404      fi
12405      # Try to locate tool using the code snippet
12406      for ac_prog in uniq
12407do
12408  # Extract the first word of "$ac_prog", so it can be a program name with args.
12409set dummy $ac_prog; ac_word=$2
12410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12411$as_echo_n "checking for $ac_word... " >&6; }
12412if ${ac_cv_path_UNIQ+:} false; then :
12413  $as_echo_n "(cached) " >&6
12414else
12415  case $UNIQ in
12416  [\\/]* | ?:[\\/]*)
12417  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12418  ;;
12419  *)
12420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12421for as_dir in $PATH
12422do
12423  IFS=$as_save_IFS
12424  test -z "$as_dir" && as_dir=.
12425    for ac_exec_ext in '' $ac_executable_extensions; do
12426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12427    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12429    break 2
12430  fi
12431done
12432  done
12433IFS=$as_save_IFS
12434
12435  ;;
12436esac
12437fi
12438UNIQ=$ac_cv_path_UNIQ
12439if test -n "$UNIQ"; then
12440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12441$as_echo "$UNIQ" >&6; }
12442else
12443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12444$as_echo "no" >&6; }
12445fi
12446
12447
12448  test -n "$UNIQ" && break
12449done
12450
12451    else
12452      # If it succeeded, then it was overridden by the user. We will use it
12453      # for the tool.
12454
12455      # First remove it from the list of overridden variables, so we can test
12456      # for unknown variables in the end.
12457      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12458
12459      # Check if we try to supply an empty value
12460      if test "x$UNIQ" = x; then
12461        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12462$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12464$as_echo_n "checking for UNIQ... " >&6; }
12465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12466$as_echo "disabled" >&6; }
12467      else
12468        # Check if the provided tool contains a complete path.
12469        tool_specified="$UNIQ"
12470        tool_basename="${tool_specified##*/}"
12471        if test "x$tool_basename" = "x$tool_specified"; then
12472          # A command without a complete path is provided, search $PATH.
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12474$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12475          # Extract the first word of "$tool_basename", so it can be a program name with args.
12476set dummy $tool_basename; ac_word=$2
12477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12478$as_echo_n "checking for $ac_word... " >&6; }
12479if ${ac_cv_path_UNIQ+:} false; then :
12480  $as_echo_n "(cached) " >&6
12481else
12482  case $UNIQ in
12483  [\\/]* | ?:[\\/]*)
12484  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12485  ;;
12486  *)
12487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12488for as_dir in $PATH
12489do
12490  IFS=$as_save_IFS
12491  test -z "$as_dir" && as_dir=.
12492    for ac_exec_ext in '' $ac_executable_extensions; do
12493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12494    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12496    break 2
12497  fi
12498done
12499  done
12500IFS=$as_save_IFS
12501
12502  ;;
12503esac
12504fi
12505UNIQ=$ac_cv_path_UNIQ
12506if test -n "$UNIQ"; then
12507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12508$as_echo "$UNIQ" >&6; }
12509else
12510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12511$as_echo "no" >&6; }
12512fi
12513
12514
12515          if test "x$UNIQ" = x; then
12516            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12517          fi
12518        else
12519          # Otherwise we believe it is a complete path. Use it as it is.
12520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12521$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12522          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12523$as_echo_n "checking for UNIQ... " >&6; }
12524          if test ! -x "$tool_specified"; then
12525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12526$as_echo "not found" >&6; }
12527            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12528          fi
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12530$as_echo "$tool_specified" >&6; }
12531        fi
12532      fi
12533    fi
12534
12535  fi
12536
12537
12538
12539  if test "x$UNIQ" = x; then
12540    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12541  fi
12542
12543
12544
12545
12546
12547  # Publish this variable in the help.
12548
12549
12550  if [ -z "${WC+x}" ]; then
12551    # The variable is not set by user, try to locate tool using the code snippet
12552    for ac_prog in wc
12553do
12554  # Extract the first word of "$ac_prog", so it can be a program name with args.
12555set dummy $ac_prog; ac_word=$2
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12557$as_echo_n "checking for $ac_word... " >&6; }
12558if ${ac_cv_path_WC+:} false; then :
12559  $as_echo_n "(cached) " >&6
12560else
12561  case $WC in
12562  [\\/]* | ?:[\\/]*)
12563  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12564  ;;
12565  *)
12566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12567for as_dir in $PATH
12568do
12569  IFS=$as_save_IFS
12570  test -z "$as_dir" && as_dir=.
12571    for ac_exec_ext in '' $ac_executable_extensions; do
12572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12573    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12575    break 2
12576  fi
12577done
12578  done
12579IFS=$as_save_IFS
12580
12581  ;;
12582esac
12583fi
12584WC=$ac_cv_path_WC
12585if test -n "$WC"; then
12586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12587$as_echo "$WC" >&6; }
12588else
12589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12590$as_echo "no" >&6; }
12591fi
12592
12593
12594  test -n "$WC" && break
12595done
12596
12597  else
12598    # The variable is set, but is it from the command line or the environment?
12599
12600    # Try to remove the string !WC! from our list.
12601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12603      # If it failed, the variable was not from the command line. Ignore it,
12604      # but warn the user (except for BASH, which is always set by the calling BASH).
12605      if test "xWC" != xBASH; then
12606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12607$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12608      fi
12609      # Try to locate tool using the code snippet
12610      for ac_prog in wc
12611do
12612  # Extract the first word of "$ac_prog", so it can be a program name with args.
12613set dummy $ac_prog; ac_word=$2
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12615$as_echo_n "checking for $ac_word... " >&6; }
12616if ${ac_cv_path_WC+:} false; then :
12617  $as_echo_n "(cached) " >&6
12618else
12619  case $WC in
12620  [\\/]* | ?:[\\/]*)
12621  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12622  ;;
12623  *)
12624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12625for as_dir in $PATH
12626do
12627  IFS=$as_save_IFS
12628  test -z "$as_dir" && as_dir=.
12629    for ac_exec_ext in '' $ac_executable_extensions; do
12630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12631    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12633    break 2
12634  fi
12635done
12636  done
12637IFS=$as_save_IFS
12638
12639  ;;
12640esac
12641fi
12642WC=$ac_cv_path_WC
12643if test -n "$WC"; then
12644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12645$as_echo "$WC" >&6; }
12646else
12647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
12649fi
12650
12651
12652  test -n "$WC" && break
12653done
12654
12655    else
12656      # If it succeeded, then it was overridden by the user. We will use it
12657      # for the tool.
12658
12659      # First remove it from the list of overridden variables, so we can test
12660      # for unknown variables in the end.
12661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12662
12663      # Check if we try to supply an empty value
12664      if test "x$WC" = x; then
12665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12666$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12668$as_echo_n "checking for WC... " >&6; }
12669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12670$as_echo "disabled" >&6; }
12671      else
12672        # Check if the provided tool contains a complete path.
12673        tool_specified="$WC"
12674        tool_basename="${tool_specified##*/}"
12675        if test "x$tool_basename" = "x$tool_specified"; then
12676          # A command without a complete path is provided, search $PATH.
12677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12678$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12679          # Extract the first word of "$tool_basename", so it can be a program name with args.
12680set dummy $tool_basename; ac_word=$2
12681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12682$as_echo_n "checking for $ac_word... " >&6; }
12683if ${ac_cv_path_WC+:} false; then :
12684  $as_echo_n "(cached) " >&6
12685else
12686  case $WC in
12687  [\\/]* | ?:[\\/]*)
12688  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12689  ;;
12690  *)
12691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12692for as_dir in $PATH
12693do
12694  IFS=$as_save_IFS
12695  test -z "$as_dir" && as_dir=.
12696    for ac_exec_ext in '' $ac_executable_extensions; do
12697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12698    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12700    break 2
12701  fi
12702done
12703  done
12704IFS=$as_save_IFS
12705
12706  ;;
12707esac
12708fi
12709WC=$ac_cv_path_WC
12710if test -n "$WC"; then
12711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12712$as_echo "$WC" >&6; }
12713else
12714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12715$as_echo "no" >&6; }
12716fi
12717
12718
12719          if test "x$WC" = x; then
12720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12721          fi
12722        else
12723          # Otherwise we believe it is a complete path. Use it as it is.
12724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12725$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12727$as_echo_n "checking for WC... " >&6; }
12728          if test ! -x "$tool_specified"; then
12729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12730$as_echo "not found" >&6; }
12731            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12732          fi
12733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12734$as_echo "$tool_specified" >&6; }
12735        fi
12736      fi
12737    fi
12738
12739  fi
12740
12741
12742
12743  if test "x$WC" = x; then
12744    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12745  fi
12746
12747
12748
12749
12750
12751  # Publish this variable in the help.
12752
12753
12754  if [ -z "${WHICH+x}" ]; then
12755    # The variable is not set by user, try to locate tool using the code snippet
12756    for ac_prog in which
12757do
12758  # Extract the first word of "$ac_prog", so it can be a program name with args.
12759set dummy $ac_prog; ac_word=$2
12760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12761$as_echo_n "checking for $ac_word... " >&6; }
12762if ${ac_cv_path_WHICH+:} false; then :
12763  $as_echo_n "(cached) " >&6
12764else
12765  case $WHICH in
12766  [\\/]* | ?:[\\/]*)
12767  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12768  ;;
12769  *)
12770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12771for as_dir in $PATH
12772do
12773  IFS=$as_save_IFS
12774  test -z "$as_dir" && as_dir=.
12775    for ac_exec_ext in '' $ac_executable_extensions; do
12776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12777    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12779    break 2
12780  fi
12781done
12782  done
12783IFS=$as_save_IFS
12784
12785  ;;
12786esac
12787fi
12788WHICH=$ac_cv_path_WHICH
12789if test -n "$WHICH"; then
12790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12791$as_echo "$WHICH" >&6; }
12792else
12793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12794$as_echo "no" >&6; }
12795fi
12796
12797
12798  test -n "$WHICH" && break
12799done
12800
12801  else
12802    # The variable is set, but is it from the command line or the environment?
12803
12804    # Try to remove the string !WHICH! from our list.
12805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12807      # If it failed, the variable was not from the command line. Ignore it,
12808      # but warn the user (except for BASH, which is always set by the calling BASH).
12809      if test "xWHICH" != xBASH; then
12810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12811$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12812      fi
12813      # Try to locate tool using the code snippet
12814      for ac_prog in which
12815do
12816  # Extract the first word of "$ac_prog", so it can be a program name with args.
12817set dummy $ac_prog; ac_word=$2
12818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12819$as_echo_n "checking for $ac_word... " >&6; }
12820if ${ac_cv_path_WHICH+:} false; then :
12821  $as_echo_n "(cached) " >&6
12822else
12823  case $WHICH in
12824  [\\/]* | ?:[\\/]*)
12825  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12826  ;;
12827  *)
12828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12829for as_dir in $PATH
12830do
12831  IFS=$as_save_IFS
12832  test -z "$as_dir" && as_dir=.
12833    for ac_exec_ext in '' $ac_executable_extensions; do
12834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12835    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12837    break 2
12838  fi
12839done
12840  done
12841IFS=$as_save_IFS
12842
12843  ;;
12844esac
12845fi
12846WHICH=$ac_cv_path_WHICH
12847if test -n "$WHICH"; then
12848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12849$as_echo "$WHICH" >&6; }
12850else
12851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12852$as_echo "no" >&6; }
12853fi
12854
12855
12856  test -n "$WHICH" && break
12857done
12858
12859    else
12860      # If it succeeded, then it was overridden by the user. We will use it
12861      # for the tool.
12862
12863      # First remove it from the list of overridden variables, so we can test
12864      # for unknown variables in the end.
12865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12866
12867      # Check if we try to supply an empty value
12868      if test "x$WHICH" = x; then
12869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12870$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12872$as_echo_n "checking for WHICH... " >&6; }
12873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12874$as_echo "disabled" >&6; }
12875      else
12876        # Check if the provided tool contains a complete path.
12877        tool_specified="$WHICH"
12878        tool_basename="${tool_specified##*/}"
12879        if test "x$tool_basename" = "x$tool_specified"; then
12880          # A command without a complete path is provided, search $PATH.
12881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12882$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12883          # Extract the first word of "$tool_basename", so it can be a program name with args.
12884set dummy $tool_basename; ac_word=$2
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886$as_echo_n "checking for $ac_word... " >&6; }
12887if ${ac_cv_path_WHICH+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  case $WHICH in
12891  [\\/]* | ?:[\\/]*)
12892  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12893  ;;
12894  *)
12895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896for as_dir in $PATH
12897do
12898  IFS=$as_save_IFS
12899  test -z "$as_dir" && as_dir=.
12900    for ac_exec_ext in '' $ac_executable_extensions; do
12901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904    break 2
12905  fi
12906done
12907  done
12908IFS=$as_save_IFS
12909
12910  ;;
12911esac
12912fi
12913WHICH=$ac_cv_path_WHICH
12914if test -n "$WHICH"; then
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12916$as_echo "$WHICH" >&6; }
12917else
12918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
12920fi
12921
12922
12923          if test "x$WHICH" = x; then
12924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12925          fi
12926        else
12927          # Otherwise we believe it is a complete path. Use it as it is.
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12929$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12931$as_echo_n "checking for WHICH... " >&6; }
12932          if test ! -x "$tool_specified"; then
12933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934$as_echo "not found" >&6; }
12935            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12936          fi
12937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12938$as_echo "$tool_specified" >&6; }
12939        fi
12940      fi
12941    fi
12942
12943  fi
12944
12945
12946
12947  if test "x$WHICH" = x; then
12948    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12949  fi
12950
12951
12952
12953
12954
12955  # Publish this variable in the help.
12956
12957
12958  if [ -z "${XARGS+x}" ]; then
12959    # The variable is not set by user, try to locate tool using the code snippet
12960    for ac_prog in xargs
12961do
12962  # Extract the first word of "$ac_prog", so it can be a program name with args.
12963set dummy $ac_prog; ac_word=$2
12964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12965$as_echo_n "checking for $ac_word... " >&6; }
12966if ${ac_cv_path_XARGS+:} false; then :
12967  $as_echo_n "(cached) " >&6
12968else
12969  case $XARGS in
12970  [\\/]* | ?:[\\/]*)
12971  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12972  ;;
12973  *)
12974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12975for as_dir in $PATH
12976do
12977  IFS=$as_save_IFS
12978  test -z "$as_dir" && as_dir=.
12979    for ac_exec_ext in '' $ac_executable_extensions; do
12980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12981    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12983    break 2
12984  fi
12985done
12986  done
12987IFS=$as_save_IFS
12988
12989  ;;
12990esac
12991fi
12992XARGS=$ac_cv_path_XARGS
12993if test -n "$XARGS"; then
12994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12995$as_echo "$XARGS" >&6; }
12996else
12997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12998$as_echo "no" >&6; }
12999fi
13000
13001
13002  test -n "$XARGS" && break
13003done
13004
13005  else
13006    # The variable is set, but is it from the command line or the environment?
13007
13008    # Try to remove the string !XARGS! from our list.
13009    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13010    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13011      # If it failed, the variable was not from the command line. Ignore it,
13012      # but warn the user (except for BASH, which is always set by the calling BASH).
13013      if test "xXARGS" != xBASH; then
13014        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13015$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13016      fi
13017      # Try to locate tool using the code snippet
13018      for ac_prog in xargs
13019do
13020  # Extract the first word of "$ac_prog", so it can be a program name with args.
13021set dummy $ac_prog; ac_word=$2
13022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13023$as_echo_n "checking for $ac_word... " >&6; }
13024if ${ac_cv_path_XARGS+:} false; then :
13025  $as_echo_n "(cached) " >&6
13026else
13027  case $XARGS in
13028  [\\/]* | ?:[\\/]*)
13029  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13030  ;;
13031  *)
13032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13033for as_dir in $PATH
13034do
13035  IFS=$as_save_IFS
13036  test -z "$as_dir" && as_dir=.
13037    for ac_exec_ext in '' $ac_executable_extensions; do
13038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13039    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13041    break 2
13042  fi
13043done
13044  done
13045IFS=$as_save_IFS
13046
13047  ;;
13048esac
13049fi
13050XARGS=$ac_cv_path_XARGS
13051if test -n "$XARGS"; then
13052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13053$as_echo "$XARGS" >&6; }
13054else
13055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13056$as_echo "no" >&6; }
13057fi
13058
13059
13060  test -n "$XARGS" && break
13061done
13062
13063    else
13064      # If it succeeded, then it was overridden by the user. We will use it
13065      # for the tool.
13066
13067      # First remove it from the list of overridden variables, so we can test
13068      # for unknown variables in the end.
13069      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13070
13071      # Check if we try to supply an empty value
13072      if test "x$XARGS" = x; then
13073        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13074$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13076$as_echo_n "checking for XARGS... " >&6; }
13077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13078$as_echo "disabled" >&6; }
13079      else
13080        # Check if the provided tool contains a complete path.
13081        tool_specified="$XARGS"
13082        tool_basename="${tool_specified##*/}"
13083        if test "x$tool_basename" = "x$tool_specified"; then
13084          # A command without a complete path is provided, search $PATH.
13085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13086$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13087          # Extract the first word of "$tool_basename", so it can be a program name with args.
13088set dummy $tool_basename; ac_word=$2
13089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13090$as_echo_n "checking for $ac_word... " >&6; }
13091if ${ac_cv_path_XARGS+:} false; then :
13092  $as_echo_n "(cached) " >&6
13093else
13094  case $XARGS in
13095  [\\/]* | ?:[\\/]*)
13096  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13097  ;;
13098  *)
13099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13100for as_dir in $PATH
13101do
13102  IFS=$as_save_IFS
13103  test -z "$as_dir" && as_dir=.
13104    for ac_exec_ext in '' $ac_executable_extensions; do
13105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13106    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13108    break 2
13109  fi
13110done
13111  done
13112IFS=$as_save_IFS
13113
13114  ;;
13115esac
13116fi
13117XARGS=$ac_cv_path_XARGS
13118if test -n "$XARGS"; then
13119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13120$as_echo "$XARGS" >&6; }
13121else
13122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13123$as_echo "no" >&6; }
13124fi
13125
13126
13127          if test "x$XARGS" = x; then
13128            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13129          fi
13130        else
13131          # Otherwise we believe it is a complete path. Use it as it is.
13132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13133$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13134          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13135$as_echo_n "checking for XARGS... " >&6; }
13136          if test ! -x "$tool_specified"; then
13137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13138$as_echo "not found" >&6; }
13139            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13140          fi
13141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13142$as_echo "$tool_specified" >&6; }
13143        fi
13144      fi
13145    fi
13146
13147  fi
13148
13149
13150
13151  if test "x$XARGS" = x; then
13152    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13153  fi
13154
13155
13156
13157  # Then required tools that require some special treatment.
13158
13159
13160  # Publish this variable in the help.
13161
13162
13163  if [ -z "${AWK+x}" ]; then
13164    # The variable is not set by user, try to locate tool using the code snippet
13165    for ac_prog in gawk mawk nawk awk
13166do
13167  # Extract the first word of "$ac_prog", so it can be a program name with args.
13168set dummy $ac_prog; ac_word=$2
13169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13170$as_echo_n "checking for $ac_word... " >&6; }
13171if ${ac_cv_prog_AWK+:} false; then :
13172  $as_echo_n "(cached) " >&6
13173else
13174  if test -n "$AWK"; then
13175  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13176else
13177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13178for as_dir in $PATH
13179do
13180  IFS=$as_save_IFS
13181  test -z "$as_dir" && as_dir=.
13182    for ac_exec_ext in '' $ac_executable_extensions; do
13183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13184    ac_cv_prog_AWK="$ac_prog"
13185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13186    break 2
13187  fi
13188done
13189  done
13190IFS=$as_save_IFS
13191
13192fi
13193fi
13194AWK=$ac_cv_prog_AWK
13195if test -n "$AWK"; then
13196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13197$as_echo "$AWK" >&6; }
13198else
13199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13200$as_echo "no" >&6; }
13201fi
13202
13203
13204  test -n "$AWK" && break
13205done
13206
13207  else
13208    # The variable is set, but is it from the command line or the environment?
13209
13210    # Try to remove the string !AWK! from our list.
13211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13213      # If it failed, the variable was not from the command line. Ignore it,
13214      # but warn the user (except for BASH, which is always set by the calling BASH).
13215      if test "xAWK" != xBASH; then
13216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13217$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13218      fi
13219      # Try to locate tool using the code snippet
13220      for ac_prog in gawk mawk nawk awk
13221do
13222  # Extract the first word of "$ac_prog", so it can be a program name with args.
13223set dummy $ac_prog; ac_word=$2
13224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13225$as_echo_n "checking for $ac_word... " >&6; }
13226if ${ac_cv_prog_AWK+:} false; then :
13227  $as_echo_n "(cached) " >&6
13228else
13229  if test -n "$AWK"; then
13230  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13231else
13232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13233for as_dir in $PATH
13234do
13235  IFS=$as_save_IFS
13236  test -z "$as_dir" && as_dir=.
13237    for ac_exec_ext in '' $ac_executable_extensions; do
13238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13239    ac_cv_prog_AWK="$ac_prog"
13240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13241    break 2
13242  fi
13243done
13244  done
13245IFS=$as_save_IFS
13246
13247fi
13248fi
13249AWK=$ac_cv_prog_AWK
13250if test -n "$AWK"; then
13251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13252$as_echo "$AWK" >&6; }
13253else
13254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13255$as_echo "no" >&6; }
13256fi
13257
13258
13259  test -n "$AWK" && break
13260done
13261
13262    else
13263      # If it succeeded, then it was overridden by the user. We will use it
13264      # for the tool.
13265
13266      # First remove it from the list of overridden variables, so we can test
13267      # for unknown variables in the end.
13268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13269
13270      # Check if we try to supply an empty value
13271      if test "x$AWK" = x; then
13272        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13273$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13275$as_echo_n "checking for AWK... " >&6; }
13276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13277$as_echo "disabled" >&6; }
13278      else
13279        # Check if the provided tool contains a complete path.
13280        tool_specified="$AWK"
13281        tool_basename="${tool_specified##*/}"
13282        if test "x$tool_basename" = "x$tool_specified"; then
13283          # A command without a complete path is provided, search $PATH.
13284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13285$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13286          # Extract the first word of "$tool_basename", so it can be a program name with args.
13287set dummy $tool_basename; ac_word=$2
13288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13289$as_echo_n "checking for $ac_word... " >&6; }
13290if ${ac_cv_path_AWK+:} false; then :
13291  $as_echo_n "(cached) " >&6
13292else
13293  case $AWK in
13294  [\\/]* | ?:[\\/]*)
13295  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13296  ;;
13297  *)
13298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13299for as_dir in $PATH
13300do
13301  IFS=$as_save_IFS
13302  test -z "$as_dir" && as_dir=.
13303    for ac_exec_ext in '' $ac_executable_extensions; do
13304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13305    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13307    break 2
13308  fi
13309done
13310  done
13311IFS=$as_save_IFS
13312
13313  ;;
13314esac
13315fi
13316AWK=$ac_cv_path_AWK
13317if test -n "$AWK"; then
13318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13319$as_echo "$AWK" >&6; }
13320else
13321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13322$as_echo "no" >&6; }
13323fi
13324
13325
13326          if test "x$AWK" = x; then
13327            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13328          fi
13329        else
13330          # Otherwise we believe it is a complete path. Use it as it is.
13331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13332$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13333          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13334$as_echo_n "checking for AWK... " >&6; }
13335          if test ! -x "$tool_specified"; then
13336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13337$as_echo "not found" >&6; }
13338            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13339          fi
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13341$as_echo "$tool_specified" >&6; }
13342        fi
13343      fi
13344    fi
13345
13346  fi
13347
13348
13349  if test "x$AWK" = x; then
13350    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13351  fi
13352
13353
13354
13355
13356  # Publish this variable in the help.
13357
13358
13359  if [ -z "${GREP+x}" ]; then
13360    # The variable is not set by user, try to locate tool using the code snippet
13361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13362$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13363if ${ac_cv_path_GREP+:} false; then :
13364  $as_echo_n "(cached) " >&6
13365else
13366  if test -z "$GREP"; then
13367  ac_path_GREP_found=false
13368  # Loop through the user's path and test for each of PROGNAME-LIST
13369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13370for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13371do
13372  IFS=$as_save_IFS
13373  test -z "$as_dir" && as_dir=.
13374    for ac_prog in grep ggrep; do
13375    for ac_exec_ext in '' $ac_executable_extensions; do
13376      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13377      as_fn_executable_p "$ac_path_GREP" || continue
13378# Check for GNU ac_path_GREP and select it if it is found.
13379  # Check for GNU $ac_path_GREP
13380case `"$ac_path_GREP" --version 2>&1` in
13381*GNU*)
13382  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13383*)
13384  ac_count=0
13385  $as_echo_n 0123456789 >"conftest.in"
13386  while :
13387  do
13388    cat "conftest.in" "conftest.in" >"conftest.tmp"
13389    mv "conftest.tmp" "conftest.in"
13390    cp "conftest.in" "conftest.nl"
13391    $as_echo 'GREP' >> "conftest.nl"
13392    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13393    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13394    as_fn_arith $ac_count + 1 && ac_count=$as_val
13395    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13396      # Best one so far, save it but keep looking for a better one
13397      ac_cv_path_GREP="$ac_path_GREP"
13398      ac_path_GREP_max=$ac_count
13399    fi
13400    # 10*(2^10) chars as input seems more than enough
13401    test $ac_count -gt 10 && break
13402  done
13403  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13404esac
13405
13406      $ac_path_GREP_found && break 3
13407    done
13408  done
13409  done
13410IFS=$as_save_IFS
13411  if test -z "$ac_cv_path_GREP"; then
13412    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13413  fi
13414else
13415  ac_cv_path_GREP=$GREP
13416fi
13417
13418fi
13419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13420$as_echo "$ac_cv_path_GREP" >&6; }
13421 GREP="$ac_cv_path_GREP"
13422
13423
13424  else
13425    # The variable is set, but is it from the command line or the environment?
13426
13427    # Try to remove the string !GREP! from our list.
13428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13430      # If it failed, the variable was not from the command line. Ignore it,
13431      # but warn the user (except for BASH, which is always set by the calling BASH).
13432      if test "xGREP" != xBASH; then
13433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13434$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13435      fi
13436      # Try to locate tool using the code snippet
13437      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13438$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13439if ${ac_cv_path_GREP+:} false; then :
13440  $as_echo_n "(cached) " >&6
13441else
13442  if test -z "$GREP"; then
13443  ac_path_GREP_found=false
13444  # Loop through the user's path and test for each of PROGNAME-LIST
13445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13447do
13448  IFS=$as_save_IFS
13449  test -z "$as_dir" && as_dir=.
13450    for ac_prog in grep ggrep; do
13451    for ac_exec_ext in '' $ac_executable_extensions; do
13452      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13453      as_fn_executable_p "$ac_path_GREP" || continue
13454# Check for GNU ac_path_GREP and select it if it is found.
13455  # Check for GNU $ac_path_GREP
13456case `"$ac_path_GREP" --version 2>&1` in
13457*GNU*)
13458  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13459*)
13460  ac_count=0
13461  $as_echo_n 0123456789 >"conftest.in"
13462  while :
13463  do
13464    cat "conftest.in" "conftest.in" >"conftest.tmp"
13465    mv "conftest.tmp" "conftest.in"
13466    cp "conftest.in" "conftest.nl"
13467    $as_echo 'GREP' >> "conftest.nl"
13468    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13470    as_fn_arith $ac_count + 1 && ac_count=$as_val
13471    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13472      # Best one so far, save it but keep looking for a better one
13473      ac_cv_path_GREP="$ac_path_GREP"
13474      ac_path_GREP_max=$ac_count
13475    fi
13476    # 10*(2^10) chars as input seems more than enough
13477    test $ac_count -gt 10 && break
13478  done
13479  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13480esac
13481
13482      $ac_path_GREP_found && break 3
13483    done
13484  done
13485  done
13486IFS=$as_save_IFS
13487  if test -z "$ac_cv_path_GREP"; then
13488    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13489  fi
13490else
13491  ac_cv_path_GREP=$GREP
13492fi
13493
13494fi
13495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13496$as_echo "$ac_cv_path_GREP" >&6; }
13497 GREP="$ac_cv_path_GREP"
13498
13499
13500    else
13501      # If it succeeded, then it was overridden by the user. We will use it
13502      # for the tool.
13503
13504      # First remove it from the list of overridden variables, so we can test
13505      # for unknown variables in the end.
13506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13507
13508      # Check if we try to supply an empty value
13509      if test "x$GREP" = x; then
13510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13511$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13513$as_echo_n "checking for GREP... " >&6; }
13514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13515$as_echo "disabled" >&6; }
13516      else
13517        # Check if the provided tool contains a complete path.
13518        tool_specified="$GREP"
13519        tool_basename="${tool_specified##*/}"
13520        if test "x$tool_basename" = "x$tool_specified"; then
13521          # A command without a complete path is provided, search $PATH.
13522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13523$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13524          # Extract the first word of "$tool_basename", so it can be a program name with args.
13525set dummy $tool_basename; ac_word=$2
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13527$as_echo_n "checking for $ac_word... " >&6; }
13528if ${ac_cv_path_GREP+:} false; then :
13529  $as_echo_n "(cached) " >&6
13530else
13531  case $GREP in
13532  [\\/]* | ?:[\\/]*)
13533  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13534  ;;
13535  *)
13536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13537for as_dir in $PATH
13538do
13539  IFS=$as_save_IFS
13540  test -z "$as_dir" && as_dir=.
13541    for ac_exec_ext in '' $ac_executable_extensions; do
13542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13543    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13545    break 2
13546  fi
13547done
13548  done
13549IFS=$as_save_IFS
13550
13551  ;;
13552esac
13553fi
13554GREP=$ac_cv_path_GREP
13555if test -n "$GREP"; then
13556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13557$as_echo "$GREP" >&6; }
13558else
13559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13560$as_echo "no" >&6; }
13561fi
13562
13563
13564          if test "x$GREP" = x; then
13565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13566          fi
13567        else
13568          # Otherwise we believe it is a complete path. Use it as it is.
13569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13570$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13572$as_echo_n "checking for GREP... " >&6; }
13573          if test ! -x "$tool_specified"; then
13574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13575$as_echo "not found" >&6; }
13576            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13577          fi
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13579$as_echo "$tool_specified" >&6; }
13580        fi
13581      fi
13582    fi
13583
13584  fi
13585
13586
13587  if test "x$GREP" = x; then
13588    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13589  fi
13590
13591
13592
13593
13594  # Publish this variable in the help.
13595
13596
13597  if [ -z "${EGREP+x}" ]; then
13598    # The variable is not set by user, try to locate tool using the code snippet
13599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13600$as_echo_n "checking for egrep... " >&6; }
13601if ${ac_cv_path_EGREP+:} false; then :
13602  $as_echo_n "(cached) " >&6
13603else
13604  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13605   then ac_cv_path_EGREP="$GREP -E"
13606   else
13607     if test -z "$EGREP"; then
13608  ac_path_EGREP_found=false
13609  # Loop through the user's path and test for each of PROGNAME-LIST
13610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13611for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13612do
13613  IFS=$as_save_IFS
13614  test -z "$as_dir" && as_dir=.
13615    for ac_prog in egrep; do
13616    for ac_exec_ext in '' $ac_executable_extensions; do
13617      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13618      as_fn_executable_p "$ac_path_EGREP" || continue
13619# Check for GNU ac_path_EGREP and select it if it is found.
13620  # Check for GNU $ac_path_EGREP
13621case `"$ac_path_EGREP" --version 2>&1` in
13622*GNU*)
13623  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13624*)
13625  ac_count=0
13626  $as_echo_n 0123456789 >"conftest.in"
13627  while :
13628  do
13629    cat "conftest.in" "conftest.in" >"conftest.tmp"
13630    mv "conftest.tmp" "conftest.in"
13631    cp "conftest.in" "conftest.nl"
13632    $as_echo 'EGREP' >> "conftest.nl"
13633    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13634    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13635    as_fn_arith $ac_count + 1 && ac_count=$as_val
13636    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13637      # Best one so far, save it but keep looking for a better one
13638      ac_cv_path_EGREP="$ac_path_EGREP"
13639      ac_path_EGREP_max=$ac_count
13640    fi
13641    # 10*(2^10) chars as input seems more than enough
13642    test $ac_count -gt 10 && break
13643  done
13644  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13645esac
13646
13647      $ac_path_EGREP_found && break 3
13648    done
13649  done
13650  done
13651IFS=$as_save_IFS
13652  if test -z "$ac_cv_path_EGREP"; then
13653    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13654  fi
13655else
13656  ac_cv_path_EGREP=$EGREP
13657fi
13658
13659   fi
13660fi
13661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13662$as_echo "$ac_cv_path_EGREP" >&6; }
13663 EGREP="$ac_cv_path_EGREP"
13664
13665
13666  else
13667    # The variable is set, but is it from the command line or the environment?
13668
13669    # Try to remove the string !EGREP! from our list.
13670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13672      # If it failed, the variable was not from the command line. Ignore it,
13673      # but warn the user (except for BASH, which is always set by the calling BASH).
13674      if test "xEGREP" != xBASH; then
13675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13676$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13677      fi
13678      # Try to locate tool using the code snippet
13679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13680$as_echo_n "checking for egrep... " >&6; }
13681if ${ac_cv_path_EGREP+:} false; then :
13682  $as_echo_n "(cached) " >&6
13683else
13684  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13685   then ac_cv_path_EGREP="$GREP -E"
13686   else
13687     if test -z "$EGREP"; then
13688  ac_path_EGREP_found=false
13689  # Loop through the user's path and test for each of PROGNAME-LIST
13690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13691for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13692do
13693  IFS=$as_save_IFS
13694  test -z "$as_dir" && as_dir=.
13695    for ac_prog in egrep; do
13696    for ac_exec_ext in '' $ac_executable_extensions; do
13697      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13698      as_fn_executable_p "$ac_path_EGREP" || continue
13699# Check for GNU ac_path_EGREP and select it if it is found.
13700  # Check for GNU $ac_path_EGREP
13701case `"$ac_path_EGREP" --version 2>&1` in
13702*GNU*)
13703  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13704*)
13705  ac_count=0
13706  $as_echo_n 0123456789 >"conftest.in"
13707  while :
13708  do
13709    cat "conftest.in" "conftest.in" >"conftest.tmp"
13710    mv "conftest.tmp" "conftest.in"
13711    cp "conftest.in" "conftest.nl"
13712    $as_echo 'EGREP' >> "conftest.nl"
13713    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13714    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13715    as_fn_arith $ac_count + 1 && ac_count=$as_val
13716    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13717      # Best one so far, save it but keep looking for a better one
13718      ac_cv_path_EGREP="$ac_path_EGREP"
13719      ac_path_EGREP_max=$ac_count
13720    fi
13721    # 10*(2^10) chars as input seems more than enough
13722    test $ac_count -gt 10 && break
13723  done
13724  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13725esac
13726
13727      $ac_path_EGREP_found && break 3
13728    done
13729  done
13730  done
13731IFS=$as_save_IFS
13732  if test -z "$ac_cv_path_EGREP"; then
13733    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13734  fi
13735else
13736  ac_cv_path_EGREP=$EGREP
13737fi
13738
13739   fi
13740fi
13741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13742$as_echo "$ac_cv_path_EGREP" >&6; }
13743 EGREP="$ac_cv_path_EGREP"
13744
13745
13746    else
13747      # If it succeeded, then it was overridden by the user. We will use it
13748      # for the tool.
13749
13750      # First remove it from the list of overridden variables, so we can test
13751      # for unknown variables in the end.
13752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13753
13754      # Check if we try to supply an empty value
13755      if test "x$EGREP" = x; then
13756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13757$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13759$as_echo_n "checking for EGREP... " >&6; }
13760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13761$as_echo "disabled" >&6; }
13762      else
13763        # Check if the provided tool contains a complete path.
13764        tool_specified="$EGREP"
13765        tool_basename="${tool_specified##*/}"
13766        if test "x$tool_basename" = "x$tool_specified"; then
13767          # A command without a complete path is provided, search $PATH.
13768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13769$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13770          # Extract the first word of "$tool_basename", so it can be a program name with args.
13771set dummy $tool_basename; ac_word=$2
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13773$as_echo_n "checking for $ac_word... " >&6; }
13774if ${ac_cv_path_EGREP+:} false; then :
13775  $as_echo_n "(cached) " >&6
13776else
13777  case $EGREP in
13778  [\\/]* | ?:[\\/]*)
13779  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13780  ;;
13781  *)
13782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13783for as_dir in $PATH
13784do
13785  IFS=$as_save_IFS
13786  test -z "$as_dir" && as_dir=.
13787    for ac_exec_ext in '' $ac_executable_extensions; do
13788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13789    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13791    break 2
13792  fi
13793done
13794  done
13795IFS=$as_save_IFS
13796
13797  ;;
13798esac
13799fi
13800EGREP=$ac_cv_path_EGREP
13801if test -n "$EGREP"; then
13802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13803$as_echo "$EGREP" >&6; }
13804else
13805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13806$as_echo "no" >&6; }
13807fi
13808
13809
13810          if test "x$EGREP" = x; then
13811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13812          fi
13813        else
13814          # Otherwise we believe it is a complete path. Use it as it is.
13815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13816$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13818$as_echo_n "checking for EGREP... " >&6; }
13819          if test ! -x "$tool_specified"; then
13820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13821$as_echo "not found" >&6; }
13822            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13823          fi
13824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13825$as_echo "$tool_specified" >&6; }
13826        fi
13827      fi
13828    fi
13829
13830  fi
13831
13832
13833  if test "x$EGREP" = x; then
13834    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13835  fi
13836
13837
13838
13839
13840  # Publish this variable in the help.
13841
13842
13843  if [ -z "${FGREP+x}" ]; then
13844    # The variable is not set by user, try to locate tool using the code snippet
13845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13846$as_echo_n "checking for fgrep... " >&6; }
13847if ${ac_cv_path_FGREP+:} false; then :
13848  $as_echo_n "(cached) " >&6
13849else
13850  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13851   then ac_cv_path_FGREP="$GREP -F"
13852   else
13853     if test -z "$FGREP"; then
13854  ac_path_FGREP_found=false
13855  # Loop through the user's path and test for each of PROGNAME-LIST
13856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13858do
13859  IFS=$as_save_IFS
13860  test -z "$as_dir" && as_dir=.
13861    for ac_prog in fgrep; do
13862    for ac_exec_ext in '' $ac_executable_extensions; do
13863      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13864      as_fn_executable_p "$ac_path_FGREP" || continue
13865# Check for GNU ac_path_FGREP and select it if it is found.
13866  # Check for GNU $ac_path_FGREP
13867case `"$ac_path_FGREP" --version 2>&1` in
13868*GNU*)
13869  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13870*)
13871  ac_count=0
13872  $as_echo_n 0123456789 >"conftest.in"
13873  while :
13874  do
13875    cat "conftest.in" "conftest.in" >"conftest.tmp"
13876    mv "conftest.tmp" "conftest.in"
13877    cp "conftest.in" "conftest.nl"
13878    $as_echo 'FGREP' >> "conftest.nl"
13879    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13880    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13881    as_fn_arith $ac_count + 1 && ac_count=$as_val
13882    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13883      # Best one so far, save it but keep looking for a better one
13884      ac_cv_path_FGREP="$ac_path_FGREP"
13885      ac_path_FGREP_max=$ac_count
13886    fi
13887    # 10*(2^10) chars as input seems more than enough
13888    test $ac_count -gt 10 && break
13889  done
13890  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13891esac
13892
13893      $ac_path_FGREP_found && break 3
13894    done
13895  done
13896  done
13897IFS=$as_save_IFS
13898  if test -z "$ac_cv_path_FGREP"; then
13899    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13900  fi
13901else
13902  ac_cv_path_FGREP=$FGREP
13903fi
13904
13905   fi
13906fi
13907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13908$as_echo "$ac_cv_path_FGREP" >&6; }
13909 FGREP="$ac_cv_path_FGREP"
13910
13911
13912  else
13913    # The variable is set, but is it from the command line or the environment?
13914
13915    # Try to remove the string !FGREP! from our list.
13916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13918      # If it failed, the variable was not from the command line. Ignore it,
13919      # but warn the user (except for BASH, which is always set by the calling BASH).
13920      if test "xFGREP" != xBASH; then
13921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13922$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13923      fi
13924      # Try to locate tool using the code snippet
13925      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13926$as_echo_n "checking for fgrep... " >&6; }
13927if ${ac_cv_path_FGREP+:} false; then :
13928  $as_echo_n "(cached) " >&6
13929else
13930  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13931   then ac_cv_path_FGREP="$GREP -F"
13932   else
13933     if test -z "$FGREP"; then
13934  ac_path_FGREP_found=false
13935  # Loop through the user's path and test for each of PROGNAME-LIST
13936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13937for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13938do
13939  IFS=$as_save_IFS
13940  test -z "$as_dir" && as_dir=.
13941    for ac_prog in fgrep; do
13942    for ac_exec_ext in '' $ac_executable_extensions; do
13943      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13944      as_fn_executable_p "$ac_path_FGREP" || continue
13945# Check for GNU ac_path_FGREP and select it if it is found.
13946  # Check for GNU $ac_path_FGREP
13947case `"$ac_path_FGREP" --version 2>&1` in
13948*GNU*)
13949  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13950*)
13951  ac_count=0
13952  $as_echo_n 0123456789 >"conftest.in"
13953  while :
13954  do
13955    cat "conftest.in" "conftest.in" >"conftest.tmp"
13956    mv "conftest.tmp" "conftest.in"
13957    cp "conftest.in" "conftest.nl"
13958    $as_echo 'FGREP' >> "conftest.nl"
13959    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13960    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13961    as_fn_arith $ac_count + 1 && ac_count=$as_val
13962    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13963      # Best one so far, save it but keep looking for a better one
13964      ac_cv_path_FGREP="$ac_path_FGREP"
13965      ac_path_FGREP_max=$ac_count
13966    fi
13967    # 10*(2^10) chars as input seems more than enough
13968    test $ac_count -gt 10 && break
13969  done
13970  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13971esac
13972
13973      $ac_path_FGREP_found && break 3
13974    done
13975  done
13976  done
13977IFS=$as_save_IFS
13978  if test -z "$ac_cv_path_FGREP"; then
13979    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13980  fi
13981else
13982  ac_cv_path_FGREP=$FGREP
13983fi
13984
13985   fi
13986fi
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13988$as_echo "$ac_cv_path_FGREP" >&6; }
13989 FGREP="$ac_cv_path_FGREP"
13990
13991
13992    else
13993      # If it succeeded, then it was overridden by the user. We will use it
13994      # for the tool.
13995
13996      # First remove it from the list of overridden variables, so we can test
13997      # for unknown variables in the end.
13998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13999
14000      # Check if we try to supply an empty value
14001      if test "x$FGREP" = x; then
14002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14003$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14005$as_echo_n "checking for FGREP... " >&6; }
14006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14007$as_echo "disabled" >&6; }
14008      else
14009        # Check if the provided tool contains a complete path.
14010        tool_specified="$FGREP"
14011        tool_basename="${tool_specified##*/}"
14012        if test "x$tool_basename" = "x$tool_specified"; then
14013          # A command without a complete path is provided, search $PATH.
14014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14015$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14016          # Extract the first word of "$tool_basename", so it can be a program name with args.
14017set dummy $tool_basename; ac_word=$2
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14019$as_echo_n "checking for $ac_word... " >&6; }
14020if ${ac_cv_path_FGREP+:} false; then :
14021  $as_echo_n "(cached) " >&6
14022else
14023  case $FGREP in
14024  [\\/]* | ?:[\\/]*)
14025  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14026  ;;
14027  *)
14028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14029for as_dir in $PATH
14030do
14031  IFS=$as_save_IFS
14032  test -z "$as_dir" && as_dir=.
14033    for ac_exec_ext in '' $ac_executable_extensions; do
14034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14035    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14037    break 2
14038  fi
14039done
14040  done
14041IFS=$as_save_IFS
14042
14043  ;;
14044esac
14045fi
14046FGREP=$ac_cv_path_FGREP
14047if test -n "$FGREP"; then
14048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14049$as_echo "$FGREP" >&6; }
14050else
14051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14052$as_echo "no" >&6; }
14053fi
14054
14055
14056          if test "x$FGREP" = x; then
14057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14058          fi
14059        else
14060          # Otherwise we believe it is a complete path. Use it as it is.
14061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14062$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14064$as_echo_n "checking for FGREP... " >&6; }
14065          if test ! -x "$tool_specified"; then
14066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14067$as_echo "not found" >&6; }
14068            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14069          fi
14070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14071$as_echo "$tool_specified" >&6; }
14072        fi
14073      fi
14074    fi
14075
14076  fi
14077
14078
14079  if test "x$FGREP" = x; then
14080    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14081  fi
14082
14083
14084
14085
14086  # Publish this variable in the help.
14087
14088
14089  if [ -z "${SED+x}" ]; then
14090    # The variable is not set by user, try to locate tool using the code snippet
14091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14092$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14093if ${ac_cv_path_SED+:} false; then :
14094  $as_echo_n "(cached) " >&6
14095else
14096            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14097     for ac_i in 1 2 3 4 5 6 7; do
14098       ac_script="$ac_script$as_nl$ac_script"
14099     done
14100     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14101     { ac_script=; unset ac_script;}
14102     if test -z "$SED"; then
14103  ac_path_SED_found=false
14104  # Loop through the user's path and test for each of PROGNAME-LIST
14105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14106for as_dir in $PATH
14107do
14108  IFS=$as_save_IFS
14109  test -z "$as_dir" && as_dir=.
14110    for ac_prog in sed gsed; do
14111    for ac_exec_ext in '' $ac_executable_extensions; do
14112      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14113      as_fn_executable_p "$ac_path_SED" || continue
14114# Check for GNU ac_path_SED and select it if it is found.
14115  # Check for GNU $ac_path_SED
14116case `"$ac_path_SED" --version 2>&1` in
14117*GNU*)
14118  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14119*)
14120  ac_count=0
14121  $as_echo_n 0123456789 >"conftest.in"
14122  while :
14123  do
14124    cat "conftest.in" "conftest.in" >"conftest.tmp"
14125    mv "conftest.tmp" "conftest.in"
14126    cp "conftest.in" "conftest.nl"
14127    $as_echo '' >> "conftest.nl"
14128    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14129    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14130    as_fn_arith $ac_count + 1 && ac_count=$as_val
14131    if test $ac_count -gt ${ac_path_SED_max-0}; then
14132      # Best one so far, save it but keep looking for a better one
14133      ac_cv_path_SED="$ac_path_SED"
14134      ac_path_SED_max=$ac_count
14135    fi
14136    # 10*(2^10) chars as input seems more than enough
14137    test $ac_count -gt 10 && break
14138  done
14139  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14140esac
14141
14142      $ac_path_SED_found && break 3
14143    done
14144  done
14145  done
14146IFS=$as_save_IFS
14147  if test -z "$ac_cv_path_SED"; then
14148    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14149  fi
14150else
14151  ac_cv_path_SED=$SED
14152fi
14153
14154fi
14155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14156$as_echo "$ac_cv_path_SED" >&6; }
14157 SED="$ac_cv_path_SED"
14158  rm -f conftest.sed
14159
14160  else
14161    # The variable is set, but is it from the command line or the environment?
14162
14163    # Try to remove the string !SED! from our list.
14164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14166      # If it failed, the variable was not from the command line. Ignore it,
14167      # but warn the user (except for BASH, which is always set by the calling BASH).
14168      if test "xSED" != xBASH; then
14169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14170$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14171      fi
14172      # Try to locate tool using the code snippet
14173      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14174$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14175if ${ac_cv_path_SED+:} false; then :
14176  $as_echo_n "(cached) " >&6
14177else
14178            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14179     for ac_i in 1 2 3 4 5 6 7; do
14180       ac_script="$ac_script$as_nl$ac_script"
14181     done
14182     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14183     { ac_script=; unset ac_script;}
14184     if test -z "$SED"; then
14185  ac_path_SED_found=false
14186  # Loop through the user's path and test for each of PROGNAME-LIST
14187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14188for as_dir in $PATH
14189do
14190  IFS=$as_save_IFS
14191  test -z "$as_dir" && as_dir=.
14192    for ac_prog in sed gsed; do
14193    for ac_exec_ext in '' $ac_executable_extensions; do
14194      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14195      as_fn_executable_p "$ac_path_SED" || continue
14196# Check for GNU ac_path_SED and select it if it is found.
14197  # Check for GNU $ac_path_SED
14198case `"$ac_path_SED" --version 2>&1` in
14199*GNU*)
14200  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14201*)
14202  ac_count=0
14203  $as_echo_n 0123456789 >"conftest.in"
14204  while :
14205  do
14206    cat "conftest.in" "conftest.in" >"conftest.tmp"
14207    mv "conftest.tmp" "conftest.in"
14208    cp "conftest.in" "conftest.nl"
14209    $as_echo '' >> "conftest.nl"
14210    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14211    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14212    as_fn_arith $ac_count + 1 && ac_count=$as_val
14213    if test $ac_count -gt ${ac_path_SED_max-0}; then
14214      # Best one so far, save it but keep looking for a better one
14215      ac_cv_path_SED="$ac_path_SED"
14216      ac_path_SED_max=$ac_count
14217    fi
14218    # 10*(2^10) chars as input seems more than enough
14219    test $ac_count -gt 10 && break
14220  done
14221  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14222esac
14223
14224      $ac_path_SED_found && break 3
14225    done
14226  done
14227  done
14228IFS=$as_save_IFS
14229  if test -z "$ac_cv_path_SED"; then
14230    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14231  fi
14232else
14233  ac_cv_path_SED=$SED
14234fi
14235
14236fi
14237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14238$as_echo "$ac_cv_path_SED" >&6; }
14239 SED="$ac_cv_path_SED"
14240  rm -f conftest.sed
14241
14242    else
14243      # If it succeeded, then it was overridden by the user. We will use it
14244      # for the tool.
14245
14246      # First remove it from the list of overridden variables, so we can test
14247      # for unknown variables in the end.
14248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14249
14250      # Check if we try to supply an empty value
14251      if test "x$SED" = x; then
14252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14253$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14255$as_echo_n "checking for SED... " >&6; }
14256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14257$as_echo "disabled" >&6; }
14258      else
14259        # Check if the provided tool contains a complete path.
14260        tool_specified="$SED"
14261        tool_basename="${tool_specified##*/}"
14262        if test "x$tool_basename" = "x$tool_specified"; then
14263          # A command without a complete path is provided, search $PATH.
14264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14265$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14266          # Extract the first word of "$tool_basename", so it can be a program name with args.
14267set dummy $tool_basename; ac_word=$2
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14269$as_echo_n "checking for $ac_word... " >&6; }
14270if ${ac_cv_path_SED+:} false; then :
14271  $as_echo_n "(cached) " >&6
14272else
14273  case $SED in
14274  [\\/]* | ?:[\\/]*)
14275  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14276  ;;
14277  *)
14278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14279for as_dir in $PATH
14280do
14281  IFS=$as_save_IFS
14282  test -z "$as_dir" && as_dir=.
14283    for ac_exec_ext in '' $ac_executable_extensions; do
14284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14285    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14287    break 2
14288  fi
14289done
14290  done
14291IFS=$as_save_IFS
14292
14293  ;;
14294esac
14295fi
14296SED=$ac_cv_path_SED
14297if test -n "$SED"; then
14298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14299$as_echo "$SED" >&6; }
14300else
14301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14302$as_echo "no" >&6; }
14303fi
14304
14305
14306          if test "x$SED" = x; then
14307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14308          fi
14309        else
14310          # Otherwise we believe it is a complete path. Use it as it is.
14311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14312$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14314$as_echo_n "checking for SED... " >&6; }
14315          if test ! -x "$tool_specified"; then
14316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14317$as_echo "not found" >&6; }
14318            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14319          fi
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14321$as_echo "$tool_specified" >&6; }
14322        fi
14323      fi
14324    fi
14325
14326  fi
14327
14328
14329  if test "x$SED" = x; then
14330    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14331  fi
14332
14333
14334
14335  # Always force rm.
14336  RM="$RM -f"
14337
14338  # pwd behaves differently on various platforms and some don't support the -L flag.
14339  # Always use the bash builtin pwd to get uniform behavior.
14340  THEPWDCMD=pwd
14341
14342  # These are not required on all platforms
14343
14344
14345  # Publish this variable in the help.
14346
14347
14348  if [ -z "${CYGPATH+x}" ]; then
14349    # The variable is not set by user, try to locate tool using the code snippet
14350    for ac_prog in cygpath
14351do
14352  # Extract the first word of "$ac_prog", so it can be a program name with args.
14353set dummy $ac_prog; ac_word=$2
14354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14355$as_echo_n "checking for $ac_word... " >&6; }
14356if ${ac_cv_path_CYGPATH+:} false; then :
14357  $as_echo_n "(cached) " >&6
14358else
14359  case $CYGPATH in
14360  [\\/]* | ?:[\\/]*)
14361  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14362  ;;
14363  *)
14364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14365for as_dir in $PATH
14366do
14367  IFS=$as_save_IFS
14368  test -z "$as_dir" && as_dir=.
14369    for ac_exec_ext in '' $ac_executable_extensions; do
14370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14371    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14373    break 2
14374  fi
14375done
14376  done
14377IFS=$as_save_IFS
14378
14379  ;;
14380esac
14381fi
14382CYGPATH=$ac_cv_path_CYGPATH
14383if test -n "$CYGPATH"; then
14384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14385$as_echo "$CYGPATH" >&6; }
14386else
14387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14388$as_echo "no" >&6; }
14389fi
14390
14391
14392  test -n "$CYGPATH" && break
14393done
14394
14395  else
14396    # The variable is set, but is it from the command line or the environment?
14397
14398    # Try to remove the string !CYGPATH! from our list.
14399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14401      # If it failed, the variable was not from the command line. Ignore it,
14402      # but warn the user (except for BASH, which is always set by the calling BASH).
14403      if test "xCYGPATH" != xBASH; then
14404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14405$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14406      fi
14407      # Try to locate tool using the code snippet
14408      for ac_prog in cygpath
14409do
14410  # Extract the first word of "$ac_prog", so it can be a program name with args.
14411set dummy $ac_prog; ac_word=$2
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14413$as_echo_n "checking for $ac_word... " >&6; }
14414if ${ac_cv_path_CYGPATH+:} false; then :
14415  $as_echo_n "(cached) " >&6
14416else
14417  case $CYGPATH in
14418  [\\/]* | ?:[\\/]*)
14419  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14420  ;;
14421  *)
14422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14423for as_dir in $PATH
14424do
14425  IFS=$as_save_IFS
14426  test -z "$as_dir" && as_dir=.
14427    for ac_exec_ext in '' $ac_executable_extensions; do
14428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14429    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14431    break 2
14432  fi
14433done
14434  done
14435IFS=$as_save_IFS
14436
14437  ;;
14438esac
14439fi
14440CYGPATH=$ac_cv_path_CYGPATH
14441if test -n "$CYGPATH"; then
14442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14443$as_echo "$CYGPATH" >&6; }
14444else
14445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14446$as_echo "no" >&6; }
14447fi
14448
14449
14450  test -n "$CYGPATH" && break
14451done
14452
14453    else
14454      # If it succeeded, then it was overridden by the user. We will use it
14455      # for the tool.
14456
14457      # First remove it from the list of overridden variables, so we can test
14458      # for unknown variables in the end.
14459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14460
14461      # Check if we try to supply an empty value
14462      if test "x$CYGPATH" = x; then
14463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14464$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14466$as_echo_n "checking for CYGPATH... " >&6; }
14467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14468$as_echo "disabled" >&6; }
14469      else
14470        # Check if the provided tool contains a complete path.
14471        tool_specified="$CYGPATH"
14472        tool_basename="${tool_specified##*/}"
14473        if test "x$tool_basename" = "x$tool_specified"; then
14474          # A command without a complete path is provided, search $PATH.
14475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14476$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14477          # Extract the first word of "$tool_basename", so it can be a program name with args.
14478set dummy $tool_basename; ac_word=$2
14479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14480$as_echo_n "checking for $ac_word... " >&6; }
14481if ${ac_cv_path_CYGPATH+:} false; then :
14482  $as_echo_n "(cached) " >&6
14483else
14484  case $CYGPATH in
14485  [\\/]* | ?:[\\/]*)
14486  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14487  ;;
14488  *)
14489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14490for as_dir in $PATH
14491do
14492  IFS=$as_save_IFS
14493  test -z "$as_dir" && as_dir=.
14494    for ac_exec_ext in '' $ac_executable_extensions; do
14495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14496    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14498    break 2
14499  fi
14500done
14501  done
14502IFS=$as_save_IFS
14503
14504  ;;
14505esac
14506fi
14507CYGPATH=$ac_cv_path_CYGPATH
14508if test -n "$CYGPATH"; then
14509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14510$as_echo "$CYGPATH" >&6; }
14511else
14512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14513$as_echo "no" >&6; }
14514fi
14515
14516
14517          if test "x$CYGPATH" = x; then
14518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14519          fi
14520        else
14521          # Otherwise we believe it is a complete path. Use it as it is.
14522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14523$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14525$as_echo_n "checking for CYGPATH... " >&6; }
14526          if test ! -x "$tool_specified"; then
14527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14528$as_echo "not found" >&6; }
14529            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14530          fi
14531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14532$as_echo "$tool_specified" >&6; }
14533        fi
14534      fi
14535    fi
14536
14537  fi
14538
14539
14540
14541
14542  # Publish this variable in the help.
14543
14544
14545  if [ -z "${READLINK+x}" ]; then
14546    # The variable is not set by user, try to locate tool using the code snippet
14547    for ac_prog in greadlink readlink
14548do
14549  # Extract the first word of "$ac_prog", so it can be a program name with args.
14550set dummy $ac_prog; ac_word=$2
14551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14552$as_echo_n "checking for $ac_word... " >&6; }
14553if ${ac_cv_path_READLINK+:} false; then :
14554  $as_echo_n "(cached) " >&6
14555else
14556  case $READLINK in
14557  [\\/]* | ?:[\\/]*)
14558  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14559  ;;
14560  *)
14561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14562for as_dir in $PATH
14563do
14564  IFS=$as_save_IFS
14565  test -z "$as_dir" && as_dir=.
14566    for ac_exec_ext in '' $ac_executable_extensions; do
14567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14568    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14570    break 2
14571  fi
14572done
14573  done
14574IFS=$as_save_IFS
14575
14576  ;;
14577esac
14578fi
14579READLINK=$ac_cv_path_READLINK
14580if test -n "$READLINK"; then
14581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14582$as_echo "$READLINK" >&6; }
14583else
14584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14585$as_echo "no" >&6; }
14586fi
14587
14588
14589  test -n "$READLINK" && break
14590done
14591
14592  else
14593    # The variable is set, but is it from the command line or the environment?
14594
14595    # Try to remove the string !READLINK! from our list.
14596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14598      # If it failed, the variable was not from the command line. Ignore it,
14599      # but warn the user (except for BASH, which is always set by the calling BASH).
14600      if test "xREADLINK" != xBASH; then
14601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14602$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14603      fi
14604      # Try to locate tool using the code snippet
14605      for ac_prog in greadlink readlink
14606do
14607  # Extract the first word of "$ac_prog", so it can be a program name with args.
14608set dummy $ac_prog; ac_word=$2
14609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14610$as_echo_n "checking for $ac_word... " >&6; }
14611if ${ac_cv_path_READLINK+:} false; then :
14612  $as_echo_n "(cached) " >&6
14613else
14614  case $READLINK in
14615  [\\/]* | ?:[\\/]*)
14616  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14617  ;;
14618  *)
14619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14620for as_dir in $PATH
14621do
14622  IFS=$as_save_IFS
14623  test -z "$as_dir" && as_dir=.
14624    for ac_exec_ext in '' $ac_executable_extensions; do
14625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14626    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14628    break 2
14629  fi
14630done
14631  done
14632IFS=$as_save_IFS
14633
14634  ;;
14635esac
14636fi
14637READLINK=$ac_cv_path_READLINK
14638if test -n "$READLINK"; then
14639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14640$as_echo "$READLINK" >&6; }
14641else
14642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14643$as_echo "no" >&6; }
14644fi
14645
14646
14647  test -n "$READLINK" && break
14648done
14649
14650    else
14651      # If it succeeded, then it was overridden by the user. We will use it
14652      # for the tool.
14653
14654      # First remove it from the list of overridden variables, so we can test
14655      # for unknown variables in the end.
14656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14657
14658      # Check if we try to supply an empty value
14659      if test "x$READLINK" = x; then
14660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14661$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14663$as_echo_n "checking for READLINK... " >&6; }
14664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14665$as_echo "disabled" >&6; }
14666      else
14667        # Check if the provided tool contains a complete path.
14668        tool_specified="$READLINK"
14669        tool_basename="${tool_specified##*/}"
14670        if test "x$tool_basename" = "x$tool_specified"; then
14671          # A command without a complete path is provided, search $PATH.
14672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14673$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14674          # Extract the first word of "$tool_basename", so it can be a program name with args.
14675set dummy $tool_basename; ac_word=$2
14676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14677$as_echo_n "checking for $ac_word... " >&6; }
14678if ${ac_cv_path_READLINK+:} false; then :
14679  $as_echo_n "(cached) " >&6
14680else
14681  case $READLINK in
14682  [\\/]* | ?:[\\/]*)
14683  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14684  ;;
14685  *)
14686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14687for as_dir in $PATH
14688do
14689  IFS=$as_save_IFS
14690  test -z "$as_dir" && as_dir=.
14691    for ac_exec_ext in '' $ac_executable_extensions; do
14692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14693    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14695    break 2
14696  fi
14697done
14698  done
14699IFS=$as_save_IFS
14700
14701  ;;
14702esac
14703fi
14704READLINK=$ac_cv_path_READLINK
14705if test -n "$READLINK"; then
14706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14707$as_echo "$READLINK" >&6; }
14708else
14709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14710$as_echo "no" >&6; }
14711fi
14712
14713
14714          if test "x$READLINK" = x; then
14715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14716          fi
14717        else
14718          # Otherwise we believe it is a complete path. Use it as it is.
14719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14720$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14722$as_echo_n "checking for READLINK... " >&6; }
14723          if test ! -x "$tool_specified"; then
14724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14725$as_echo "not found" >&6; }
14726            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14727          fi
14728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14729$as_echo "$tool_specified" >&6; }
14730        fi
14731      fi
14732    fi
14733
14734  fi
14735
14736
14737
14738
14739  # Publish this variable in the help.
14740
14741
14742  if [ -z "${DF+x}" ]; then
14743    # The variable is not set by user, try to locate tool using the code snippet
14744    for ac_prog in df
14745do
14746  # Extract the first word of "$ac_prog", so it can be a program name with args.
14747set dummy $ac_prog; ac_word=$2
14748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14749$as_echo_n "checking for $ac_word... " >&6; }
14750if ${ac_cv_path_DF+:} false; then :
14751  $as_echo_n "(cached) " >&6
14752else
14753  case $DF in
14754  [\\/]* | ?:[\\/]*)
14755  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14756  ;;
14757  *)
14758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14759for as_dir in $PATH
14760do
14761  IFS=$as_save_IFS
14762  test -z "$as_dir" && as_dir=.
14763    for ac_exec_ext in '' $ac_executable_extensions; do
14764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14765    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14767    break 2
14768  fi
14769done
14770  done
14771IFS=$as_save_IFS
14772
14773  ;;
14774esac
14775fi
14776DF=$ac_cv_path_DF
14777if test -n "$DF"; then
14778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14779$as_echo "$DF" >&6; }
14780else
14781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14782$as_echo "no" >&6; }
14783fi
14784
14785
14786  test -n "$DF" && break
14787done
14788
14789  else
14790    # The variable is set, but is it from the command line or the environment?
14791
14792    # Try to remove the string !DF! from our list.
14793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14795      # If it failed, the variable was not from the command line. Ignore it,
14796      # but warn the user (except for BASH, which is always set by the calling BASH).
14797      if test "xDF" != xBASH; then
14798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14799$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14800      fi
14801      # Try to locate tool using the code snippet
14802      for ac_prog in df
14803do
14804  # Extract the first word of "$ac_prog", so it can be a program name with args.
14805set dummy $ac_prog; ac_word=$2
14806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14807$as_echo_n "checking for $ac_word... " >&6; }
14808if ${ac_cv_path_DF+:} false; then :
14809  $as_echo_n "(cached) " >&6
14810else
14811  case $DF in
14812  [\\/]* | ?:[\\/]*)
14813  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14814  ;;
14815  *)
14816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14817for as_dir in $PATH
14818do
14819  IFS=$as_save_IFS
14820  test -z "$as_dir" && as_dir=.
14821    for ac_exec_ext in '' $ac_executable_extensions; do
14822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14823    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14825    break 2
14826  fi
14827done
14828  done
14829IFS=$as_save_IFS
14830
14831  ;;
14832esac
14833fi
14834DF=$ac_cv_path_DF
14835if test -n "$DF"; then
14836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14837$as_echo "$DF" >&6; }
14838else
14839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14840$as_echo "no" >&6; }
14841fi
14842
14843
14844  test -n "$DF" && break
14845done
14846
14847    else
14848      # If it succeeded, then it was overridden by the user. We will use it
14849      # for the tool.
14850
14851      # First remove it from the list of overridden variables, so we can test
14852      # for unknown variables in the end.
14853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14854
14855      # Check if we try to supply an empty value
14856      if test "x$DF" = x; then
14857        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14858$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14860$as_echo_n "checking for DF... " >&6; }
14861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14862$as_echo "disabled" >&6; }
14863      else
14864        # Check if the provided tool contains a complete path.
14865        tool_specified="$DF"
14866        tool_basename="${tool_specified##*/}"
14867        if test "x$tool_basename" = "x$tool_specified"; then
14868          # A command without a complete path is provided, search $PATH.
14869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14870$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14871          # Extract the first word of "$tool_basename", so it can be a program name with args.
14872set dummy $tool_basename; ac_word=$2
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14874$as_echo_n "checking for $ac_word... " >&6; }
14875if ${ac_cv_path_DF+:} false; then :
14876  $as_echo_n "(cached) " >&6
14877else
14878  case $DF in
14879  [\\/]* | ?:[\\/]*)
14880  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14881  ;;
14882  *)
14883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14884for as_dir in $PATH
14885do
14886  IFS=$as_save_IFS
14887  test -z "$as_dir" && as_dir=.
14888    for ac_exec_ext in '' $ac_executable_extensions; do
14889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14890    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14892    break 2
14893  fi
14894done
14895  done
14896IFS=$as_save_IFS
14897
14898  ;;
14899esac
14900fi
14901DF=$ac_cv_path_DF
14902if test -n "$DF"; then
14903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14904$as_echo "$DF" >&6; }
14905else
14906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14907$as_echo "no" >&6; }
14908fi
14909
14910
14911          if test "x$DF" = x; then
14912            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14913          fi
14914        else
14915          # Otherwise we believe it is a complete path. Use it as it is.
14916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14917$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14918          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14919$as_echo_n "checking for DF... " >&6; }
14920          if test ! -x "$tool_specified"; then
14921            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14922$as_echo "not found" >&6; }
14923            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14924          fi
14925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14926$as_echo "$tool_specified" >&6; }
14927        fi
14928      fi
14929    fi
14930
14931  fi
14932
14933
14934
14935
14936  # Publish this variable in the help.
14937
14938
14939  if [ -z "${CPIO+x}" ]; then
14940    # The variable is not set by user, try to locate tool using the code snippet
14941    for ac_prog in cpio bsdcpio
14942do
14943  # Extract the first word of "$ac_prog", so it can be a program name with args.
14944set dummy $ac_prog; ac_word=$2
14945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14946$as_echo_n "checking for $ac_word... " >&6; }
14947if ${ac_cv_path_CPIO+:} false; then :
14948  $as_echo_n "(cached) " >&6
14949else
14950  case $CPIO in
14951  [\\/]* | ?:[\\/]*)
14952  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14953  ;;
14954  *)
14955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14956for as_dir in $PATH
14957do
14958  IFS=$as_save_IFS
14959  test -z "$as_dir" && as_dir=.
14960    for ac_exec_ext in '' $ac_executable_extensions; do
14961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14962    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14964    break 2
14965  fi
14966done
14967  done
14968IFS=$as_save_IFS
14969
14970  ;;
14971esac
14972fi
14973CPIO=$ac_cv_path_CPIO
14974if test -n "$CPIO"; then
14975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14976$as_echo "$CPIO" >&6; }
14977else
14978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14979$as_echo "no" >&6; }
14980fi
14981
14982
14983  test -n "$CPIO" && break
14984done
14985
14986  else
14987    # The variable is set, but is it from the command line or the environment?
14988
14989    # Try to remove the string !CPIO! from our list.
14990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14992      # If it failed, the variable was not from the command line. Ignore it,
14993      # but warn the user (except for BASH, which is always set by the calling BASH).
14994      if test "xCPIO" != xBASH; then
14995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14996$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14997      fi
14998      # Try to locate tool using the code snippet
14999      for ac_prog in cpio bsdcpio
15000do
15001  # Extract the first word of "$ac_prog", so it can be a program name with args.
15002set dummy $ac_prog; ac_word=$2
15003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15004$as_echo_n "checking for $ac_word... " >&6; }
15005if ${ac_cv_path_CPIO+:} false; then :
15006  $as_echo_n "(cached) " >&6
15007else
15008  case $CPIO in
15009  [\\/]* | ?:[\\/]*)
15010  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15011  ;;
15012  *)
15013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15014for as_dir in $PATH
15015do
15016  IFS=$as_save_IFS
15017  test -z "$as_dir" && as_dir=.
15018    for ac_exec_ext in '' $ac_executable_extensions; do
15019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15020    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15022    break 2
15023  fi
15024done
15025  done
15026IFS=$as_save_IFS
15027
15028  ;;
15029esac
15030fi
15031CPIO=$ac_cv_path_CPIO
15032if test -n "$CPIO"; then
15033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15034$as_echo "$CPIO" >&6; }
15035else
15036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15037$as_echo "no" >&6; }
15038fi
15039
15040
15041  test -n "$CPIO" && break
15042done
15043
15044    else
15045      # If it succeeded, then it was overridden by the user. We will use it
15046      # for the tool.
15047
15048      # First remove it from the list of overridden variables, so we can test
15049      # for unknown variables in the end.
15050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15051
15052      # Check if we try to supply an empty value
15053      if test "x$CPIO" = x; then
15054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15055$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15057$as_echo_n "checking for CPIO... " >&6; }
15058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15059$as_echo "disabled" >&6; }
15060      else
15061        # Check if the provided tool contains a complete path.
15062        tool_specified="$CPIO"
15063        tool_basename="${tool_specified##*/}"
15064        if test "x$tool_basename" = "x$tool_specified"; then
15065          # A command without a complete path is provided, search $PATH.
15066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15067$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15068          # Extract the first word of "$tool_basename", so it can be a program name with args.
15069set dummy $tool_basename; ac_word=$2
15070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15071$as_echo_n "checking for $ac_word... " >&6; }
15072if ${ac_cv_path_CPIO+:} false; then :
15073  $as_echo_n "(cached) " >&6
15074else
15075  case $CPIO in
15076  [\\/]* | ?:[\\/]*)
15077  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15078  ;;
15079  *)
15080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15081for as_dir in $PATH
15082do
15083  IFS=$as_save_IFS
15084  test -z "$as_dir" && as_dir=.
15085    for ac_exec_ext in '' $ac_executable_extensions; do
15086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15087    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15089    break 2
15090  fi
15091done
15092  done
15093IFS=$as_save_IFS
15094
15095  ;;
15096esac
15097fi
15098CPIO=$ac_cv_path_CPIO
15099if test -n "$CPIO"; then
15100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15101$as_echo "$CPIO" >&6; }
15102else
15103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15104$as_echo "no" >&6; }
15105fi
15106
15107
15108          if test "x$CPIO" = x; then
15109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15110          fi
15111        else
15112          # Otherwise we believe it is a complete path. Use it as it is.
15113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15114$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15116$as_echo_n "checking for CPIO... " >&6; }
15117          if test ! -x "$tool_specified"; then
15118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15119$as_echo "not found" >&6; }
15120            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15121          fi
15122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15123$as_echo "$tool_specified" >&6; }
15124        fi
15125      fi
15126    fi
15127
15128  fi
15129
15130
15131
15132
15133  # Publish this variable in the help.
15134
15135
15136  if [ -z "${NICE+x}" ]; then
15137    # The variable is not set by user, try to locate tool using the code snippet
15138    for ac_prog in nice
15139do
15140  # Extract the first word of "$ac_prog", so it can be a program name with args.
15141set dummy $ac_prog; ac_word=$2
15142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15143$as_echo_n "checking for $ac_word... " >&6; }
15144if ${ac_cv_path_NICE+:} false; then :
15145  $as_echo_n "(cached) " >&6
15146else
15147  case $NICE in
15148  [\\/]* | ?:[\\/]*)
15149  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15150  ;;
15151  *)
15152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15153for as_dir in $PATH
15154do
15155  IFS=$as_save_IFS
15156  test -z "$as_dir" && as_dir=.
15157    for ac_exec_ext in '' $ac_executable_extensions; do
15158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15159    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15161    break 2
15162  fi
15163done
15164  done
15165IFS=$as_save_IFS
15166
15167  ;;
15168esac
15169fi
15170NICE=$ac_cv_path_NICE
15171if test -n "$NICE"; then
15172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15173$as_echo "$NICE" >&6; }
15174else
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15176$as_echo "no" >&6; }
15177fi
15178
15179
15180  test -n "$NICE" && break
15181done
15182
15183  else
15184    # The variable is set, but is it from the command line or the environment?
15185
15186    # Try to remove the string !NICE! from our list.
15187    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15188    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15189      # If it failed, the variable was not from the command line. Ignore it,
15190      # but warn the user (except for BASH, which is always set by the calling BASH).
15191      if test "xNICE" != xBASH; then
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15193$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15194      fi
15195      # Try to locate tool using the code snippet
15196      for ac_prog in nice
15197do
15198  # Extract the first word of "$ac_prog", so it can be a program name with args.
15199set dummy $ac_prog; ac_word=$2
15200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15201$as_echo_n "checking for $ac_word... " >&6; }
15202if ${ac_cv_path_NICE+:} false; then :
15203  $as_echo_n "(cached) " >&6
15204else
15205  case $NICE in
15206  [\\/]* | ?:[\\/]*)
15207  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15208  ;;
15209  *)
15210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15211for as_dir in $PATH
15212do
15213  IFS=$as_save_IFS
15214  test -z "$as_dir" && as_dir=.
15215    for ac_exec_ext in '' $ac_executable_extensions; do
15216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15217    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15219    break 2
15220  fi
15221done
15222  done
15223IFS=$as_save_IFS
15224
15225  ;;
15226esac
15227fi
15228NICE=$ac_cv_path_NICE
15229if test -n "$NICE"; then
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15231$as_echo "$NICE" >&6; }
15232else
15233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15234$as_echo "no" >&6; }
15235fi
15236
15237
15238  test -n "$NICE" && break
15239done
15240
15241    else
15242      # If it succeeded, then it was overridden by the user. We will use it
15243      # for the tool.
15244
15245      # First remove it from the list of overridden variables, so we can test
15246      # for unknown variables in the end.
15247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15248
15249      # Check if we try to supply an empty value
15250      if test "x$NICE" = x; then
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15252$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15254$as_echo_n "checking for NICE... " >&6; }
15255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15256$as_echo "disabled" >&6; }
15257      else
15258        # Check if the provided tool contains a complete path.
15259        tool_specified="$NICE"
15260        tool_basename="${tool_specified##*/}"
15261        if test "x$tool_basename" = "x$tool_specified"; then
15262          # A command without a complete path is provided, search $PATH.
15263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15264$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15265          # Extract the first word of "$tool_basename", so it can be a program name with args.
15266set dummy $tool_basename; ac_word=$2
15267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15268$as_echo_n "checking for $ac_word... " >&6; }
15269if ${ac_cv_path_NICE+:} false; then :
15270  $as_echo_n "(cached) " >&6
15271else
15272  case $NICE in
15273  [\\/]* | ?:[\\/]*)
15274  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15275  ;;
15276  *)
15277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15278for as_dir in $PATH
15279do
15280  IFS=$as_save_IFS
15281  test -z "$as_dir" && as_dir=.
15282    for ac_exec_ext in '' $ac_executable_extensions; do
15283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15284    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15286    break 2
15287  fi
15288done
15289  done
15290IFS=$as_save_IFS
15291
15292  ;;
15293esac
15294fi
15295NICE=$ac_cv_path_NICE
15296if test -n "$NICE"; then
15297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15298$as_echo "$NICE" >&6; }
15299else
15300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15301$as_echo "no" >&6; }
15302fi
15303
15304
15305          if test "x$NICE" = x; then
15306            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15307          fi
15308        else
15309          # Otherwise we believe it is a complete path. Use it as it is.
15310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15311$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15313$as_echo_n "checking for NICE... " >&6; }
15314          if test ! -x "$tool_specified"; then
15315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15316$as_echo "not found" >&6; }
15317            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15318          fi
15319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15320$as_echo "$tool_specified" >&6; }
15321        fi
15322      fi
15323    fi
15324
15325  fi
15326
15327
15328
15329
15330  # Publish this variable in the help.
15331
15332
15333  if [ -z "${PANDOC+x}" ]; then
15334    # The variable is not set by user, try to locate tool using the code snippet
15335    for ac_prog in pandoc
15336do
15337  # Extract the first word of "$ac_prog", so it can be a program name with args.
15338set dummy $ac_prog; ac_word=$2
15339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15340$as_echo_n "checking for $ac_word... " >&6; }
15341if ${ac_cv_path_PANDOC+:} false; then :
15342  $as_echo_n "(cached) " >&6
15343else
15344  case $PANDOC in
15345  [\\/]* | ?:[\\/]*)
15346  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15347  ;;
15348  *)
15349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15350for as_dir in $PATH
15351do
15352  IFS=$as_save_IFS
15353  test -z "$as_dir" && as_dir=.
15354    for ac_exec_ext in '' $ac_executable_extensions; do
15355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15356    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15358    break 2
15359  fi
15360done
15361  done
15362IFS=$as_save_IFS
15363
15364  ;;
15365esac
15366fi
15367PANDOC=$ac_cv_path_PANDOC
15368if test -n "$PANDOC"; then
15369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15370$as_echo "$PANDOC" >&6; }
15371else
15372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15373$as_echo "no" >&6; }
15374fi
15375
15376
15377  test -n "$PANDOC" && break
15378done
15379
15380  else
15381    # The variable is set, but is it from the command line or the environment?
15382
15383    # Try to remove the string !PANDOC! from our list.
15384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15386      # If it failed, the variable was not from the command line. Ignore it,
15387      # but warn the user (except for BASH, which is always set by the calling BASH).
15388      if test "xPANDOC" != xBASH; then
15389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15390$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15391      fi
15392      # Try to locate tool using the code snippet
15393      for ac_prog in pandoc
15394do
15395  # Extract the first word of "$ac_prog", so it can be a program name with args.
15396set dummy $ac_prog; ac_word=$2
15397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15398$as_echo_n "checking for $ac_word... " >&6; }
15399if ${ac_cv_path_PANDOC+:} false; then :
15400  $as_echo_n "(cached) " >&6
15401else
15402  case $PANDOC in
15403  [\\/]* | ?:[\\/]*)
15404  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15405  ;;
15406  *)
15407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15408for as_dir in $PATH
15409do
15410  IFS=$as_save_IFS
15411  test -z "$as_dir" && as_dir=.
15412    for ac_exec_ext in '' $ac_executable_extensions; do
15413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15414    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15416    break 2
15417  fi
15418done
15419  done
15420IFS=$as_save_IFS
15421
15422  ;;
15423esac
15424fi
15425PANDOC=$ac_cv_path_PANDOC
15426if test -n "$PANDOC"; then
15427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15428$as_echo "$PANDOC" >&6; }
15429else
15430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15431$as_echo "no" >&6; }
15432fi
15433
15434
15435  test -n "$PANDOC" && break
15436done
15437
15438    else
15439      # If it succeeded, then it was overridden by the user. We will use it
15440      # for the tool.
15441
15442      # First remove it from the list of overridden variables, so we can test
15443      # for unknown variables in the end.
15444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15445
15446      # Check if we try to supply an empty value
15447      if test "x$PANDOC" = x; then
15448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15449$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15451$as_echo_n "checking for PANDOC... " >&6; }
15452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15453$as_echo "disabled" >&6; }
15454      else
15455        # Check if the provided tool contains a complete path.
15456        tool_specified="$PANDOC"
15457        tool_basename="${tool_specified##*/}"
15458        if test "x$tool_basename" = "x$tool_specified"; then
15459          # A command without a complete path is provided, search $PATH.
15460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15461$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15462          # Extract the first word of "$tool_basename", so it can be a program name with args.
15463set dummy $tool_basename; ac_word=$2
15464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15465$as_echo_n "checking for $ac_word... " >&6; }
15466if ${ac_cv_path_PANDOC+:} false; then :
15467  $as_echo_n "(cached) " >&6
15468else
15469  case $PANDOC in
15470  [\\/]* | ?:[\\/]*)
15471  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15472  ;;
15473  *)
15474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15475for as_dir in $PATH
15476do
15477  IFS=$as_save_IFS
15478  test -z "$as_dir" && as_dir=.
15479    for ac_exec_ext in '' $ac_executable_extensions; do
15480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15481    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15483    break 2
15484  fi
15485done
15486  done
15487IFS=$as_save_IFS
15488
15489  ;;
15490esac
15491fi
15492PANDOC=$ac_cv_path_PANDOC
15493if test -n "$PANDOC"; then
15494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15495$as_echo "$PANDOC" >&6; }
15496else
15497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15498$as_echo "no" >&6; }
15499fi
15500
15501
15502          if test "x$PANDOC" = x; then
15503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15504          fi
15505        else
15506          # Otherwise we believe it is a complete path. Use it as it is.
15507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15508$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15510$as_echo_n "checking for PANDOC... " >&6; }
15511          if test ! -x "$tool_specified"; then
15512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15513$as_echo "not found" >&6; }
15514            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15515          fi
15516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15517$as_echo "$tool_specified" >&6; }
15518        fi
15519      fi
15520    fi
15521
15522  fi
15523
15524
15525
15526
15527# Now we can determine OpenJDK build and target platforms. This is required to
15528# have early on.
15529# Make sure we can run config.sub.
15530$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15531  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15532
15533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15534$as_echo_n "checking build system type... " >&6; }
15535if ${ac_cv_build+:} false; then :
15536  $as_echo_n "(cached) " >&6
15537else
15538  ac_build_alias=$build_alias
15539test "x$ac_build_alias" = x &&
15540  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15541test "x$ac_build_alias" = x &&
15542  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15543ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15544  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15545
15546fi
15547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15548$as_echo "$ac_cv_build" >&6; }
15549case $ac_cv_build in
15550*-*-*) ;;
15551*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15552esac
15553build=$ac_cv_build
15554ac_save_IFS=$IFS; IFS='-'
15555set x $ac_cv_build
15556shift
15557build_cpu=$1
15558build_vendor=$2
15559shift; shift
15560# Remember, the first character of IFS is used to create $*,
15561# except with old shells:
15562build_os=$*
15563IFS=$ac_save_IFS
15564case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15565
15566
15567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15568$as_echo_n "checking host system type... " >&6; }
15569if ${ac_cv_host+:} false; then :
15570  $as_echo_n "(cached) " >&6
15571else
15572  if test "x$host_alias" = x; then
15573  ac_cv_host=$ac_cv_build
15574else
15575  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15576    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15577fi
15578
15579fi
15580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15581$as_echo "$ac_cv_host" >&6; }
15582case $ac_cv_host in
15583*-*-*) ;;
15584*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15585esac
15586host=$ac_cv_host
15587ac_save_IFS=$IFS; IFS='-'
15588set x $ac_cv_host
15589shift
15590host_cpu=$1
15591host_vendor=$2
15592shift; shift
15593# Remember, the first character of IFS is used to create $*,
15594# except with old shells:
15595host_os=$*
15596IFS=$ac_save_IFS
15597case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15598
15599
15600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15601$as_echo_n "checking target system type... " >&6; }
15602if ${ac_cv_target+:} false; then :
15603  $as_echo_n "(cached) " >&6
15604else
15605  if test "x$target_alias" = x; then
15606  ac_cv_target=$ac_cv_host
15607else
15608  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15609    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15610fi
15611
15612fi
15613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15614$as_echo "$ac_cv_target" >&6; }
15615case $ac_cv_target in
15616*-*-*) ;;
15617*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15618esac
15619target=$ac_cv_target
15620ac_save_IFS=$IFS; IFS='-'
15621set x $ac_cv_target
15622shift
15623target_cpu=$1
15624target_vendor=$2
15625shift; shift
15626# Remember, the first character of IFS is used to create $*,
15627# except with old shells:
15628target_os=$*
15629IFS=$ac_save_IFS
15630case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15631
15632
15633# The aliases save the names the user supplied, while $host etc.
15634# will get canonicalized.
15635test -n "$target_alias" &&
15636  test "$program_prefix$program_suffix$program_transform_name" = \
15637    NONENONEs,x,x, &&
15638  program_prefix=${target_alias}-
15639
15640  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15641  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15642  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15643  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15644  # to use the configure naming style.
15645
15646
15647
15648
15649
15650  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15651  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15652  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15653  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15654  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15655  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15656
15657
15658
15659  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15660
15661  case "$build_os" in
15662    *linux*)
15663      VAR_OS=linux
15664      VAR_OS_TYPE=unix
15665      ;;
15666    *solaris*)
15667      VAR_OS=solaris
15668      VAR_OS_TYPE=unix
15669      ;;
15670    *darwin*)
15671      VAR_OS=macosx
15672      VAR_OS_TYPE=unix
15673      ;;
15674    *bsd*)
15675      VAR_OS=bsd
15676      VAR_OS_TYPE=unix
15677      ;;
15678    *cygwin*)
15679      VAR_OS=windows
15680      VAR_OS_ENV=windows.cygwin
15681      ;;
15682    *mingw*)
15683      VAR_OS=windows
15684      VAR_OS_ENV=windows.msys
15685      ;;
15686    *aix*)
15687      VAR_OS=aix
15688      VAR_OS_TYPE=unix
15689      ;;
15690    *)
15691      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15692      ;;
15693  esac
15694
15695
15696  # First argument is the cpu name from the trip/quad
15697  case "$build_cpu" in
15698    x86_64)
15699      VAR_CPU=x86_64
15700      VAR_CPU_ARCH=x86
15701      VAR_CPU_BITS=64
15702      VAR_CPU_ENDIAN=little
15703      ;;
15704    i?86)
15705      VAR_CPU=x86
15706      VAR_CPU_ARCH=x86
15707      VAR_CPU_BITS=32
15708      VAR_CPU_ENDIAN=little
15709      ;;
15710    arm*)
15711      VAR_CPU=arm
15712      VAR_CPU_ARCH=arm
15713      VAR_CPU_BITS=32
15714      VAR_CPU_ENDIAN=little
15715      ;;
15716    aarch64)
15717      VAR_CPU=aarch64
15718      VAR_CPU_ARCH=aarch64
15719      VAR_CPU_BITS=64
15720      VAR_CPU_ENDIAN=little
15721      ;;
15722    powerpc)
15723      VAR_CPU=ppc
15724      VAR_CPU_ARCH=ppc
15725      VAR_CPU_BITS=32
15726      VAR_CPU_ENDIAN=big
15727      ;;
15728    powerpc64)
15729      VAR_CPU=ppc64
15730      VAR_CPU_ARCH=ppc
15731      VAR_CPU_BITS=64
15732      VAR_CPU_ENDIAN=big
15733      ;;
15734    powerpc64le)
15735      VAR_CPU=ppc64le
15736      VAR_CPU_ARCH=ppc
15737      VAR_CPU_BITS=64
15738      VAR_CPU_ENDIAN=little
15739      ;;
15740    s390)
15741      VAR_CPU=s390
15742      VAR_CPU_ARCH=s390
15743      VAR_CPU_BITS=32
15744      VAR_CPU_ENDIAN=big
15745      ;;
15746    s390x)
15747      VAR_CPU=s390x
15748      VAR_CPU_ARCH=s390
15749      VAR_CPU_BITS=64
15750      VAR_CPU_ENDIAN=big
15751      ;;
15752    sparc)
15753      VAR_CPU=sparc
15754      VAR_CPU_ARCH=sparc
15755      VAR_CPU_BITS=32
15756      VAR_CPU_ENDIAN=big
15757      ;;
15758    sparcv9|sparc64)
15759      VAR_CPU=sparcv9
15760      VAR_CPU_ARCH=sparc
15761      VAR_CPU_BITS=64
15762      VAR_CPU_ENDIAN=big
15763      ;;
15764    *)
15765      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15766      ;;
15767  esac
15768
15769  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15770  OPENJDK_BUILD_OS="$VAR_OS"
15771  if test "x$VAR_OS_TYPE" != x; then
15772    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15773  else
15774    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15775  fi
15776  if test "x$VAR_OS_ENV" != x; then
15777    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15778  else
15779    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15780  fi
15781  OPENJDK_BUILD_CPU="$VAR_CPU"
15782  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15783  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15784  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15785
15786
15787
15788
15789
15790
15791
15792
15793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15794$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15796$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15797
15798  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15799
15800  case "$host_os" in
15801    *linux*)
15802      VAR_OS=linux
15803      VAR_OS_TYPE=unix
15804      ;;
15805    *solaris*)
15806      VAR_OS=solaris
15807      VAR_OS_TYPE=unix
15808      ;;
15809    *darwin*)
15810      VAR_OS=macosx
15811      VAR_OS_TYPE=unix
15812      ;;
15813    *bsd*)
15814      VAR_OS=bsd
15815      VAR_OS_TYPE=unix
15816      ;;
15817    *cygwin*)
15818      VAR_OS=windows
15819      VAR_OS_ENV=windows.cygwin
15820      ;;
15821    *mingw*)
15822      VAR_OS=windows
15823      VAR_OS_ENV=windows.msys
15824      ;;
15825    *aix*)
15826      VAR_OS=aix
15827      VAR_OS_TYPE=unix
15828      ;;
15829    *)
15830      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15831      ;;
15832  esac
15833
15834
15835  # First argument is the cpu name from the trip/quad
15836  case "$host_cpu" in
15837    x86_64)
15838      VAR_CPU=x86_64
15839      VAR_CPU_ARCH=x86
15840      VAR_CPU_BITS=64
15841      VAR_CPU_ENDIAN=little
15842      ;;
15843    i?86)
15844      VAR_CPU=x86
15845      VAR_CPU_ARCH=x86
15846      VAR_CPU_BITS=32
15847      VAR_CPU_ENDIAN=little
15848      ;;
15849    arm*)
15850      VAR_CPU=arm
15851      VAR_CPU_ARCH=arm
15852      VAR_CPU_BITS=32
15853      VAR_CPU_ENDIAN=little
15854      ;;
15855    aarch64)
15856      VAR_CPU=aarch64
15857      VAR_CPU_ARCH=aarch64
15858      VAR_CPU_BITS=64
15859      VAR_CPU_ENDIAN=little
15860      ;;
15861    powerpc)
15862      VAR_CPU=ppc
15863      VAR_CPU_ARCH=ppc
15864      VAR_CPU_BITS=32
15865      VAR_CPU_ENDIAN=big
15866      ;;
15867    powerpc64)
15868      VAR_CPU=ppc64
15869      VAR_CPU_ARCH=ppc
15870      VAR_CPU_BITS=64
15871      VAR_CPU_ENDIAN=big
15872      ;;
15873    powerpc64le)
15874      VAR_CPU=ppc64le
15875      VAR_CPU_ARCH=ppc
15876      VAR_CPU_BITS=64
15877      VAR_CPU_ENDIAN=little
15878      ;;
15879    s390)
15880      VAR_CPU=s390
15881      VAR_CPU_ARCH=s390
15882      VAR_CPU_BITS=32
15883      VAR_CPU_ENDIAN=big
15884      ;;
15885    s390x)
15886      VAR_CPU=s390x
15887      VAR_CPU_ARCH=s390
15888      VAR_CPU_BITS=64
15889      VAR_CPU_ENDIAN=big
15890      ;;
15891    sparc)
15892      VAR_CPU=sparc
15893      VAR_CPU_ARCH=sparc
15894      VAR_CPU_BITS=32
15895      VAR_CPU_ENDIAN=big
15896      ;;
15897    sparcv9|sparc64)
15898      VAR_CPU=sparcv9
15899      VAR_CPU_ARCH=sparc
15900      VAR_CPU_BITS=64
15901      VAR_CPU_ENDIAN=big
15902      ;;
15903    *)
15904      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15905      ;;
15906  esac
15907
15908  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15909  OPENJDK_TARGET_OS="$VAR_OS"
15910  if test "x$VAR_OS_TYPE" != x; then
15911    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15912  else
15913    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15914  fi
15915  if test "x$VAR_OS_ENV" != x; then
15916    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15917  else
15918    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15919  fi
15920  OPENJDK_TARGET_CPU="$VAR_CPU"
15921  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15922  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15923  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15924
15925
15926
15927
15928
15929
15930
15931
15932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15933$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15935$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15936
15937
15938
15939# Check whether --with-target-bits was given.
15940if test "${with_target_bits+set}" = set; then :
15941  withval=$with_target_bits;
15942fi
15943
15944
15945  # We have three types of compiles:
15946  # native  == normal compilation, target system == build system
15947  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15948  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15949  #
15950  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15951    # We're doing a proper cross-compilation
15952    COMPILE_TYPE="cross"
15953  else
15954    COMPILE_TYPE="native"
15955  fi
15956
15957  if test "x$with_target_bits" != x; then
15958    if test "x$COMPILE_TYPE" = "xcross"; then
15959      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15960    fi
15961
15962    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15963      # A reduced build is requested
15964      COMPILE_TYPE="reduced"
15965      OPENJDK_TARGET_CPU_BITS=32
15966      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15967        OPENJDK_TARGET_CPU=x86
15968      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15969        OPENJDK_TARGET_CPU=sparc
15970      else
15971        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15972      fi
15973    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15974      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
15975    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15976      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15977$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15978    else
15979      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15980    fi
15981  fi
15982
15983
15984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15985$as_echo_n "checking compilation type... " >&6; }
15986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15987$as_echo "$COMPILE_TYPE" >&6; }
15988
15989
15990  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15991    REQUIRED_OS_NAME=SunOS
15992    REQUIRED_OS_VERSION=5.10
15993  fi
15994  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15995    REQUIRED_OS_NAME=Linux
15996    REQUIRED_OS_VERSION=2.6
15997  fi
15998  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15999    REQUIRED_OS_NAME=Windows
16000    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
16001      REQUIRED_OS_VERSION=5.2
16002    else
16003      REQUIRED_OS_VERSION=5.1
16004    fi
16005  fi
16006  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16007    REQUIRED_OS_NAME="Mac OS X"
16008    REQUIRED_OS_VERSION=11.2
16009  fi
16010  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16011    REQUIRED_OS_NAME=AIX
16012    REQUIRED_OS_VERSION=7.1
16013  fi
16014  REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
16015
16016
16017
16018
16019
16020
16021
16022  # Also store the legacy naming of the cpu.
16023  # Ie i586 and amd64 instead of x86 and x86_64
16024  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16025  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16026    OPENJDK_TARGET_CPU_LEGACY="i586"
16027  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16028    # On all platforms except MacOSX replace x86_64 with amd64.
16029    OPENJDK_TARGET_CPU_LEGACY="amd64"
16030  fi
16031
16032
16033  # And the second legacy naming of the cpu.
16034  # Ie i386 and amd64 instead of x86 and x86_64.
16035  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16036  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16037    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16038  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16039    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16040  fi
16041
16042
16043  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16044  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16045  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16046  OPENJDK_TARGET_CPU_ISADIR=""
16047  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16048    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16049      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16050    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16051      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16052    fi
16053  fi
16054
16055
16056  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16057  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16058  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16059    # On linux only, we replace x86 with i386.
16060    OPENJDK_TARGET_CPU_OSARCH="i386"
16061  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16062    # On all platforms except macosx, we replace x86_64 with amd64.
16063    OPENJDK_TARGET_CPU_OSARCH="amd64"
16064  fi
16065
16066
16067  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16068  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16069    OPENJDK_TARGET_CPU_JLI="i386"
16070  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16071    # On all platforms except macosx, we replace x86_64 with amd64.
16072    OPENJDK_TARGET_CPU_JLI="amd64"
16073  fi
16074
16075  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16076      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16077  else
16078      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16079  fi
16080
16081
16082  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16083  # Macosx is osx and x86_64 is x64
16084  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16085    OPENJDK_TARGET_OS_BUNDLE="osx"
16086  else
16087    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16088  fi
16089  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16090    OPENJDK_TARGET_CPU_BUNDLE="x64"
16091  else
16092    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16093  fi
16094  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16095
16096
16097  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16098    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16099    # unpack200.exe. This variable is used in
16100    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16101    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16102      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16103    fi
16104  fi
16105
16106  if test "x$COMPILE_TYPE" = "xcross"; then
16107    # FIXME: ... or should this include reduced builds..?
16108    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16109  else
16110    DEFINE_CROSS_COMPILE_ARCH=""
16111  fi
16112
16113
16114  # Convert openjdk platform names to hotspot names
16115
16116  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16117  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16118    HOTSPOT_TARGET_OS=bsd
16119  fi
16120
16121
16122  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16123  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16124    HOTSPOT_TARGET_OS_TYPE=posix
16125  fi
16126
16127
16128  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16129  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16130    HOTSPOT_TARGET_CPU=x86_32
16131  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16132    HOTSPOT_TARGET_CPU=sparc
16133  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16134    HOTSPOT_TARGET_CPU=ppc_64
16135  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16136    HOTSPOT_TARGET_CPU=ppc_64
16137  fi
16138
16139
16140  # This is identical with OPENJDK_*, but define anyway for consistency.
16141  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16142
16143
16144  # Setup HOTSPOT_TARGET_CPU_DEFINE
16145  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16146    HOTSPOT_TARGET_CPU_DEFINE=IA32
16147  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16148    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16149  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16150    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16151  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16152    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16153  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16154    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16155  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16156    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16157
16158  # The cpu defines below are for zero, we don't support them directly.
16159  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16160    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16161  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16162    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16163  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16164    HOTSPOT_TARGET_CPU_DEFINE=S390
16165  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16166    HOTSPOT_TARGET_CPU_DEFINE=S390
16167  elif test "x$OPENJDK_TARGET_CPU" != x; then
16168    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16169  fi
16170
16171
16172
16173
16174  # Also store the legacy naming of the cpu.
16175  # Ie i586 and amd64 instead of x86 and x86_64
16176  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16177  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16178    OPENJDK_BUILD_CPU_LEGACY="i586"
16179  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16180    # On all platforms except MacOSX replace x86_64 with amd64.
16181    OPENJDK_BUILD_CPU_LEGACY="amd64"
16182  fi
16183
16184
16185  # And the second legacy naming of the cpu.
16186  # Ie i386 and amd64 instead of x86 and x86_64.
16187  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16188  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16189    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16190  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16191    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16192  fi
16193
16194
16195  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16196  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16197  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16198  OPENJDK_BUILD_CPU_ISADIR=""
16199  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16200    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16201      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16202    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16203      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16204    fi
16205  fi
16206
16207
16208  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16209  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16210  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16211    # On linux only, we replace x86 with i386.
16212    OPENJDK_BUILD_CPU_OSARCH="i386"
16213  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16214    # On all platforms except macosx, we replace x86_64 with amd64.
16215    OPENJDK_BUILD_CPU_OSARCH="amd64"
16216  fi
16217
16218
16219  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16220  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16221    OPENJDK_BUILD_CPU_JLI="i386"
16222  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16223    # On all platforms except macosx, we replace x86_64 with amd64.
16224    OPENJDK_BUILD_CPU_JLI="amd64"
16225  fi
16226
16227  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16228      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16229  else
16230      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16231  fi
16232
16233
16234  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16235  # Macosx is osx and x86_64 is x64
16236  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16237    OPENJDK_BUILD_OS_BUNDLE="osx"
16238  else
16239    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16240  fi
16241  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16242    OPENJDK_BUILD_CPU_BUNDLE="x64"
16243  else
16244    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16245  fi
16246  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16247
16248
16249  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16250    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16251    # unpack200.exe. This variable is used in
16252    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16253    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16254      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16255    fi
16256  fi
16257
16258  if test "x$COMPILE_TYPE" = "xcross"; then
16259    # FIXME: ... or should this include reduced builds..?
16260    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16261  else
16262    DEFINE_CROSS_COMPILE_ARCH=""
16263  fi
16264
16265
16266  # Convert openjdk platform names to hotspot names
16267
16268  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16269  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16270    HOTSPOT_BUILD_OS=bsd
16271  fi
16272
16273
16274  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16275  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16276    HOTSPOT_BUILD_OS_TYPE=posix
16277  fi
16278
16279
16280  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16281  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16282    HOTSPOT_BUILD_CPU=x86_32
16283  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16284    HOTSPOT_BUILD_CPU=sparc
16285  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16286    HOTSPOT_BUILD_CPU=ppc_64
16287  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16288    HOTSPOT_BUILD_CPU=ppc_64
16289  fi
16290
16291
16292  # This is identical with OPENJDK_*, but define anyway for consistency.
16293  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16294
16295
16296  # Setup HOTSPOT_BUILD_CPU_DEFINE
16297  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16298    HOTSPOT_BUILD_CPU_DEFINE=IA32
16299  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16300    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16301  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16302    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16303  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16304    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16305  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16306    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16307  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16308    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16309
16310  # The cpu defines below are for zero, we don't support them directly.
16311  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16312    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16313  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16314    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16315  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16316    HOTSPOT_BUILD_CPU_DEFINE=S390
16317  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16318    HOTSPOT_BUILD_CPU_DEFINE=S390
16319  elif test "x$OPENJDK_BUILD_CPU" != x; then
16320    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16321  fi
16322
16323
16324
16325
16326
16327
16328# Continue setting up basic stuff. Most remaining code require fundamental tools.
16329
16330  # Save the current directory this script was started from
16331  CURDIR="$PWD"
16332
16333  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16334  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16335  # was not available at that time.
16336  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16337  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16338    ORIGINAL_PATH="$REWRITTEN_PATH"
16339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16340$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16341  fi
16342
16343  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16344    PATH_SEP=";"
16345
16346  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16347  if test $SRC_ROOT_LENGTH -gt 100; then
16348    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16349  fi
16350
16351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16353$as_echo_n "checking cygwin release... " >&6; }
16354    CYGWIN_VERSION=`$UNAME -r`
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16356$as_echo "$CYGWIN_VERSION" >&6; }
16357    WINDOWS_ENV_VENDOR='cygwin'
16358    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16359
16360    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16361    if test "x$CYGWIN_VERSION_OLD" != x; then
16362      { $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
16363$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;}
16364      as_fn_error $? "Cannot continue" "$LINENO" 5
16365    fi
16366    if test "x$CYGPATH" = x; then
16367      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16368    fi
16369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16370$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16371    # The cmd output ends with Windows line endings (CR/LF)
16372    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16373    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16374    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16376$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16377    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16378    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16379    if test "x$test_cygdrive_prefix" = x; then
16380      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16381    fi
16382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16384$as_echo_n "checking msys release... " >&6; }
16385    MSYS_VERSION=`$UNAME -r`
16386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16387$as_echo "$MSYS_VERSION" >&6; }
16388
16389    WINDOWS_ENV_VENDOR='msys'
16390    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16391
16392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16393$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16394    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16395    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16396
16397  windows_path="$MSYS_ROOT_PATH"
16398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16399    unix_path=`$CYGPATH -u "$windows_path"`
16400    MSYS_ROOT_PATH="$unix_path"
16401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16403    MSYS_ROOT_PATH="$unix_path"
16404  fi
16405
16406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16407$as_echo "$MSYS_ROOT_PATH" >&6; }
16408    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16409  else
16410    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16411  fi
16412
16413  # Test if windows or unix (cygwin/msys) find is first in path.
16414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16415$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16416  FIND_BINARY_OUTPUT=`find --version 2>&1`
16417  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16419$as_echo "unix style" >&6; }
16420  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16422$as_echo "Windows" >&6; }
16423    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16424$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16425    { $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
16426$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16427    as_fn_error $? "Cannot continue" "$LINENO" 5
16428  else
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16430$as_echo "unknown" >&6; }
16431    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16432$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16433  fi
16434
16435  else
16436    PATH_SEP=":"
16437  fi
16438
16439
16440  # We get the top-level directory from the supporting wrappers.
16441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16442$as_echo_n "checking for top-level directory... " >&6; }
16443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16444$as_echo "$TOPDIR" >&6; }
16445
16446
16447  # Save the original version of TOPDIR for string comparisons
16448  ORIGINAL_TOPDIR="$TOPDIR"
16449
16450
16451  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16452
16453  # Only process if variable expands to non-empty
16454
16455  if test "x$CURDIR" != x; then
16456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16457
16458  # Input might be given as Windows format, start by converting to
16459  # unix format.
16460  path="$CURDIR"
16461  new_path=`$CYGPATH -u "$path"`
16462
16463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16466  # "foo.exe" is OK but "foo" is an error.
16467  #
16468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16469  # It is also a way to make sure we got the proper file name for the real test later on.
16470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16471  if test "x$test_shortpath" = x; then
16472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16473$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16474    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16475  fi
16476
16477  # Call helper function which possibly converts this using DOS-style short mode.
16478  # If so, the updated path is stored in $new_path.
16479
16480  input_path="$new_path"
16481  # Check if we need to convert this using DOS-style short mode. If the path
16482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16483  # take no chances and rewrite it.
16484  # Note: m4 eats our [], so we need to use [ and ] instead.
16485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16486  if test "x$has_forbidden_chars" != x; then
16487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16491      # Going to short mode and back again did indeed matter. Since short mode is
16492      # case insensitive, let's make it lowercase to improve readability.
16493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16494      # Now convert it back to Unix-style (cygpath)
16495      input_path=`$CYGPATH -u "$shortmode_path"`
16496      new_path="$input_path"
16497    fi
16498  fi
16499
16500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16501  if test "x$test_cygdrive_prefix" = x; then
16502    # As a simple fix, exclude /usr/bin since it's not a real path.
16503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16505      # a path prefixed by /cygdrive for fixpath to work.
16506      new_path="$CYGWIN_ROOT_PATH$input_path"
16507    fi
16508  fi
16509
16510
16511  if test "x$path" != "x$new_path"; then
16512    CURDIR="$new_path"
16513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16514$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16515  fi
16516
16517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16518
16519  path="$CURDIR"
16520  has_colon=`$ECHO $path | $GREP ^.:`
16521  new_path="$path"
16522  if test "x$has_colon" = x; then
16523    # Not in mixed or Windows style, start by that.
16524    new_path=`cmd //c echo $path`
16525  fi
16526
16527
16528  input_path="$new_path"
16529  # Check if we need to convert this using DOS-style short mode. If the path
16530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16531  # take no chances and rewrite it.
16532  # Note: m4 eats our [], so we need to use [ and ] instead.
16533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16534  if test "x$has_forbidden_chars" != x; then
16535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16537  fi
16538
16539
16540  windows_path="$new_path"
16541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16542    unix_path=`$CYGPATH -u "$windows_path"`
16543    new_path="$unix_path"
16544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16546    new_path="$unix_path"
16547  fi
16548
16549  if test "x$path" != "x$new_path"; then
16550    CURDIR="$new_path"
16551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16552$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16553  fi
16554
16555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16557
16558    else
16559      # We're on a unix platform. Hooray! :)
16560      path="$CURDIR"
16561      has_space=`$ECHO "$path" | $GREP " "`
16562      if test "x$has_space" != x; then
16563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16564$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16566      fi
16567
16568      # Use eval to expand a potential ~
16569      eval path="$path"
16570      if test ! -f "$path" && test ! -d "$path"; then
16571        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16572      fi
16573
16574      if test -d "$path"; then
16575        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16576      else
16577        dir="`$DIRNAME "$path"`"
16578        base="`$BASENAME "$path"`"
16579        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16580      fi
16581    fi
16582  fi
16583
16584
16585  # Only process if variable expands to non-empty
16586
16587  if test "x$TOPDIR" != x; then
16588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16589
16590  # Input might be given as Windows format, start by converting to
16591  # unix format.
16592  path="$TOPDIR"
16593  new_path=`$CYGPATH -u "$path"`
16594
16595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16598  # "foo.exe" is OK but "foo" is an error.
16599  #
16600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16601  # It is also a way to make sure we got the proper file name for the real test later on.
16602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16603  if test "x$test_shortpath" = x; then
16604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16605$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16606    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16607  fi
16608
16609  # Call helper function which possibly converts this using DOS-style short mode.
16610  # If so, the updated path is stored in $new_path.
16611
16612  input_path="$new_path"
16613  # Check if we need to convert this using DOS-style short mode. If the path
16614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16615  # take no chances and rewrite it.
16616  # Note: m4 eats our [], so we need to use [ and ] instead.
16617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16618  if test "x$has_forbidden_chars" != x; then
16619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16623      # Going to short mode and back again did indeed matter. Since short mode is
16624      # case insensitive, let's make it lowercase to improve readability.
16625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16626      # Now convert it back to Unix-style (cygpath)
16627      input_path=`$CYGPATH -u "$shortmode_path"`
16628      new_path="$input_path"
16629    fi
16630  fi
16631
16632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16633  if test "x$test_cygdrive_prefix" = x; then
16634    # As a simple fix, exclude /usr/bin since it's not a real path.
16635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16637      # a path prefixed by /cygdrive for fixpath to work.
16638      new_path="$CYGWIN_ROOT_PATH$input_path"
16639    fi
16640  fi
16641
16642
16643  if test "x$path" != "x$new_path"; then
16644    TOPDIR="$new_path"
16645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16646$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16647  fi
16648
16649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16650
16651  path="$TOPDIR"
16652  has_colon=`$ECHO $path | $GREP ^.:`
16653  new_path="$path"
16654  if test "x$has_colon" = x; then
16655    # Not in mixed or Windows style, start by that.
16656    new_path=`cmd //c echo $path`
16657  fi
16658
16659
16660  input_path="$new_path"
16661  # Check if we need to convert this using DOS-style short mode. If the path
16662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16663  # take no chances and rewrite it.
16664  # Note: m4 eats our [], so we need to use [ and ] instead.
16665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16666  if test "x$has_forbidden_chars" != x; then
16667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16669  fi
16670
16671
16672  windows_path="$new_path"
16673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16674    unix_path=`$CYGPATH -u "$windows_path"`
16675    new_path="$unix_path"
16676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16678    new_path="$unix_path"
16679  fi
16680
16681  if test "x$path" != "x$new_path"; then
16682    TOPDIR="$new_path"
16683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16684$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16685  fi
16686
16687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16689
16690    else
16691      # We're on a unix platform. Hooray! :)
16692      path="$TOPDIR"
16693      has_space=`$ECHO "$path" | $GREP " "`
16694      if test "x$has_space" != x; then
16695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16696$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16698      fi
16699
16700      # Use eval to expand a potential ~
16701      eval path="$path"
16702      if test ! -f "$path" && test ! -d "$path"; then
16703        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16704      fi
16705
16706      if test -d "$path"; then
16707        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16708      else
16709        dir="`$DIRNAME "$path"`"
16710        base="`$BASENAME "$path"`"
16711        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16712      fi
16713    fi
16714  fi
16715
16716  # SRC_ROOT is a traditional alias for TOPDIR.
16717  SRC_ROOT=$TOPDIR
16718
16719  # Calculate a canonical version of TOPDIR for string comparisons
16720  CANONICAL_TOPDIR=$TOPDIR
16721
16722  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16723    # Follow a chain of symbolic links. Use readlink
16724    # where it exists, else fall back to horribly
16725    # complicated shell code.
16726    if test "x$READLINK_TESTED" != yes; then
16727      # On MacOSX there is a readlink tool with a different
16728      # purpose than the GNU readlink tool. Check the found readlink.
16729      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16730      if test "x$ISGNU" = x; then
16731        # A readlink that we do not know how to use.
16732        # Are there other non-GNU readlinks out there?
16733        READLINK_TESTED=yes
16734        READLINK=
16735      fi
16736    fi
16737
16738    if test "x$READLINK" != x; then
16739      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16740    else
16741      # Save the current directory for restoring afterwards
16742      STARTDIR=$PWD
16743      COUNTER=0
16744      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16745      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16746      cd $sym_link_dir
16747      # Use -P flag to resolve symlinks in directories.
16748      cd `$THEPWDCMD -P`
16749      sym_link_dir=`$THEPWDCMD -P`
16750      # Resolve file symlinks
16751      while test $COUNTER -lt 20; do
16752        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16753        if test "x$ISLINK" == x; then
16754          # This is not a symbolic link! We are done!
16755          break
16756        fi
16757        # Again resolve directory symlinks since the target of the just found
16758        # link could be in a different directory
16759        cd `$DIRNAME $ISLINK`
16760        sym_link_dir=`$THEPWDCMD -P`
16761        sym_link_file=`$BASENAME $ISLINK`
16762        let COUNTER=COUNTER+1
16763      done
16764      cd $STARTDIR
16765      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16766    fi
16767  fi
16768
16769
16770
16771  # Locate the directory of this script.
16772  AUTOCONF_DIR=$TOPDIR/common/autoconf
16773
16774  # Setup username (for use in adhoc version strings etc)
16775  # Outer [ ] to quote m4.
16776   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16777
16778
16779
16780# Check if it's a pure open build or if custom sources are to be used.
16781
16782  # Check whether --enable-openjdk-only was given.
16783if test "${enable_openjdk_only+set}" = set; then :
16784  enableval=$enable_openjdk_only;
16785else
16786  enable_openjdk_only="no"
16787fi
16788
16789
16790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16791$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16793$as_echo "$enable_openjdk_only" >&6; }
16794  if test "x$enable_openjdk_only" = "xyes"; then
16795    SUPPRESS_CUSTOM_EXTENSIONS="true"
16796  elif test "x$enable_openjdk_only" = "xno"; then
16797    SUPPRESS_CUSTOM_EXTENSIONS="false"
16798  else
16799    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16800  fi
16801
16802  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16803  # the IncludeCustomExtension macro.
16804
16805
16806# Check whether --with-custom-make-dir was given.
16807if test "${with_custom_make_dir+set}" = set; then :
16808  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
16809$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16810fi
16811
16812
16813
16814
16815# These are needed to be able to create a configuration name (and thus the output directory)
16816
16817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16818$as_echo_n "checking which variant of the JDK to build... " >&6; }
16819
16820# Check whether --with-jdk-variant was given.
16821if test "${with_jdk_variant+set}" = set; then :
16822  withval=$with_jdk_variant;
16823fi
16824
16825
16826  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16827    JDK_VARIANT="normal"
16828  else
16829    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16830  fi
16831
16832
16833
16834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16835$as_echo "$JDK_VARIANT" >&6; }
16836
16837
16838  DEBUG_LEVEL="release"
16839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16840$as_echo_n "checking which debug level to use... " >&6; }
16841  # Check whether --enable-debug was given.
16842if test "${enable_debug+set}" = set; then :
16843  enableval=$enable_debug;
16844        ENABLE_DEBUG="${enableval}"
16845        DEBUG_LEVEL="fastdebug"
16846
16847else
16848  ENABLE_DEBUG="no"
16849fi
16850
16851
16852
16853# Check whether --with-debug-level was given.
16854if test "${with_debug_level+set}" = set; then :
16855  withval=$with_debug_level;
16856        DEBUG_LEVEL="${withval}"
16857        if test "x$ENABLE_DEBUG" = xyes; then
16858          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16859        fi
16860
16861fi
16862
16863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16864$as_echo "$DEBUG_LEVEL" >&6; }
16865
16866  if test "x$DEBUG_LEVEL" != xrelease && \
16867      test "x$DEBUG_LEVEL" != xoptimized && \
16868      test "x$DEBUG_LEVEL" != xfastdebug && \
16869      test "x$DEBUG_LEVEL" != xslowdebug; then
16870    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16871  fi
16872
16873  # Translate DEBUG_LEVEL to debug level used by Hotspot
16874  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16875  if test "x$DEBUG_LEVEL" = xrelease; then
16876    HOTSPOT_DEBUG_LEVEL="product"
16877  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16878    HOTSPOT_DEBUG_LEVEL="debug"
16879  fi
16880
16881  if test "x$DEBUG_LEVEL" = xoptimized; then
16882    # The debug level 'optimized' is a little special because it is currently only
16883    # applicable to the HotSpot build where it means to build a completely
16884    # optimized version of the VM without any debugging code (like for the
16885    # 'release' debug level which is called 'product' in the HotSpot build) but
16886    # with the exception that it can contain additional code which is otherwise
16887    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16888    # test new and/or experimental features which are not intended for customer
16889    # shipment. Because these new features need to be tested and benchmarked in
16890    # real world scenarios, we want to build the containing JDK at the 'release'
16891    # debug level.
16892    DEBUG_LEVEL="release"
16893  fi
16894
16895
16896
16897
16898
16899
16900# Check whether --with-jvm-variants was given.
16901if test "${with_jvm_variants+set}" = set; then :
16902  withval=$with_jvm_variants;
16903fi
16904
16905
16906
16907
16908# Check whether --with-cpu-port was given.
16909if test "${with_cpu_port+set}" = set; then :
16910  withval=$with_cpu_port;
16911fi
16912
16913
16914  if test "x$with_cpu_port" != x; then
16915    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16916      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16917    fi
16918    if test "x$with_cpu_port" != xarm64 && \
16919        test "x$with_cpu_port" != xaarch64; then
16920      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16921    fi
16922    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16923  fi
16924
16925
16926  if test "x$with_jvm_variants" = x; then
16927    with_jvm_variants="server"
16928  fi
16929  JVM_VARIANTS_OPT="$with_jvm_variants"
16930
16931  # Has the user listed more than one variant?
16932  # Additional [] needed to keep m4 from mangling shell constructs.
16933  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16934    BUILDING_MULTIPLE_JVM_VARIANTS=true
16935  else
16936    BUILDING_MULTIPLE_JVM_VARIANTS=false
16937  fi
16938  # Replace the commas with AND for use in the build directory name.
16939  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16940
16941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16942$as_echo_n "checking which variants of the JVM to build... " >&6; }
16943  # JVM_VARIANTS is a space-separated list.
16944  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16945  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16947$as_echo "$JVM_VARIANTS" >&6; }
16948
16949  # Check that the selected variants are valid
16950
16951  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16952  # Notice that the original variant failes on SLES 10 and 11
16953  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16954  STACK=${JVM_VARIANTS// /$'\n'}
16955  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16956  if test "x$INVALID_VARIANTS" != x; then
16957    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16958$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16959    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16960  fi
16961
16962  # All "special" variants share the same output directory ("server")
16963  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16964  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16965  STACK=${JVM_VARIANTS// /$'\n'}
16966  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16967  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16968    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16969  fi
16970
16971  # The "main" variant is the one used by other libs to link against during the
16972  # build.
16973  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16974    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16975    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16976      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16977        JVM_VARIANT_MAIN="$variant"
16978        break
16979      fi
16980    done
16981  else
16982    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16983  fi
16984
16985
16986
16987
16988
16989  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16990    # zero behaves as a platform and rewrites these values. This is really weird. :(
16991    # We are guaranteed that we do not build any other variants when building zero.
16992    HOTSPOT_TARGET_CPU=zero
16993    HOTSPOT_TARGET_CPU_ARCH=zero
16994  fi
16995
16996
16997# With basic setup done, call the custom early hook.
16998
16999
17000# Check if we have devkits, extra paths or sysroot set.
17001
17002
17003# Check whether --with-devkit was given.
17004if test "${with_devkit+set}" = set; then :
17005  withval=$with_devkit;
17006
17007  # Only process if variable expands to non-empty
17008
17009  if test "x$with_devkit" != x; then
17010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17011
17012  # Input might be given as Windows format, start by converting to
17013  # unix format.
17014  path="$with_devkit"
17015  new_path=`$CYGPATH -u "$path"`
17016
17017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17020  # "foo.exe" is OK but "foo" is an error.
17021  #
17022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17023  # It is also a way to make sure we got the proper file name for the real test later on.
17024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17025  if test "x$test_shortpath" = x; then
17026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17027$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17028    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17029  fi
17030
17031  # Call helper function which possibly converts this using DOS-style short mode.
17032  # If so, the updated path is stored in $new_path.
17033
17034  input_path="$new_path"
17035  # Check if we need to convert this using DOS-style short mode. If the path
17036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17037  # take no chances and rewrite it.
17038  # Note: m4 eats our [], so we need to use [ and ] instead.
17039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17040  if test "x$has_forbidden_chars" != x; then
17041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17045      # Going to short mode and back again did indeed matter. Since short mode is
17046      # case insensitive, let's make it lowercase to improve readability.
17047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17048      # Now convert it back to Unix-style (cygpath)
17049      input_path=`$CYGPATH -u "$shortmode_path"`
17050      new_path="$input_path"
17051    fi
17052  fi
17053
17054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17055  if test "x$test_cygdrive_prefix" = x; then
17056    # As a simple fix, exclude /usr/bin since it's not a real path.
17057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17059      # a path prefixed by /cygdrive for fixpath to work.
17060      new_path="$CYGWIN_ROOT_PATH$input_path"
17061    fi
17062  fi
17063
17064
17065  if test "x$path" != "x$new_path"; then
17066    with_devkit="$new_path"
17067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17068$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17069  fi
17070
17071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17072
17073  path="$with_devkit"
17074  has_colon=`$ECHO $path | $GREP ^.:`
17075  new_path="$path"
17076  if test "x$has_colon" = x; then
17077    # Not in mixed or Windows style, start by that.
17078    new_path=`cmd //c echo $path`
17079  fi
17080
17081
17082  input_path="$new_path"
17083  # Check if we need to convert this using DOS-style short mode. If the path
17084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17085  # take no chances and rewrite it.
17086  # Note: m4 eats our [], so we need to use [ and ] instead.
17087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17088  if test "x$has_forbidden_chars" != x; then
17089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17091  fi
17092
17093
17094  windows_path="$new_path"
17095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17096    unix_path=`$CYGPATH -u "$windows_path"`
17097    new_path="$unix_path"
17098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17100    new_path="$unix_path"
17101  fi
17102
17103  if test "x$path" != "x$new_path"; then
17104    with_devkit="$new_path"
17105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17106$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17107  fi
17108
17109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17111
17112    else
17113      # We're on a unix platform. Hooray! :)
17114      path="$with_devkit"
17115      has_space=`$ECHO "$path" | $GREP " "`
17116      if test "x$has_space" != x; then
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17118$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17120      fi
17121
17122      # Use eval to expand a potential ~
17123      eval path="$path"
17124      if test ! -f "$path" && test ! -d "$path"; then
17125        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17126      fi
17127
17128      if test -d "$path"; then
17129        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17130      else
17131        dir="`$DIRNAME "$path"`"
17132        base="`$BASENAME "$path"`"
17133        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17134      fi
17135    fi
17136  fi
17137
17138        DEVKIT_ROOT="$with_devkit"
17139        # Check for a meta data info file in the root of the devkit
17140        if test -f "$DEVKIT_ROOT/devkit.info"; then
17141          . $DEVKIT_ROOT/devkit.info
17142          # This potentially sets the following:
17143          # A descriptive name of the devkit
17144
17145  if test "x$DEVKIT_NAME" = x; then
17146    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17147  fi
17148
17149          # Corresponds to --with-extra-path
17150
17151  if test "x$DEVKIT_EXTRA_PATH" = x; then
17152    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17153  fi
17154
17155          # Corresponds to --with-toolchain-path
17156
17157  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17158    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17159  fi
17160
17161          # Corresponds to --with-sysroot
17162
17163  if test "x$DEVKIT_SYSROOT" = x; then
17164    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17165  fi
17166
17167
17168          # Identifies the Visual Studio version in the devkit
17169
17170  if test "x$DEVKIT_VS_VERSION" = x; then
17171    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17172  fi
17173
17174          # The Visual Studio include environment variable
17175
17176  if test "x$DEVKIT_VS_INCLUDE" = x; then
17177    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17178  fi
17179
17180          # The Visual Studio lib environment variable
17181
17182  if test "x$DEVKIT_VS_LIB" = x; then
17183    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17184  fi
17185
17186          # Corresponds to --with-msvcr-dll
17187
17188  if test "x$DEVKIT_MSVCR_DLL" = x; then
17189    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17190  fi
17191
17192          # Corresponds to --with-msvcp-dll
17193
17194  if test "x$DEVKIT_MSVCP_DLL" = x; then
17195    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17196  fi
17197
17198        fi
17199
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17201$as_echo_n "checking for devkit... " >&6; }
17202        if test "x$DEVKIT_NAME" != x; then
17203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17204$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17205        else
17206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17207$as_echo "$DEVKIT_ROOT" >&6; }
17208        fi
17209
17210
17211  if test "x$DEVKIT_EXTRA_PATH" != x; then
17212    if test "x$EXTRA_PATH" = x; then
17213      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17214    else
17215      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17216    fi
17217  fi
17218
17219
17220        # Fallback default of just /bin if DEVKIT_PATH is not defined
17221        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17222          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17223        fi
17224
17225  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17226    if test "x$TOOLCHAIN_PATH" = x; then
17227      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17228    else
17229      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17230    fi
17231  fi
17232
17233
17234        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17235        # places for backwards compatiblity.
17236        if test "x$DEVKIT_SYSROOT" != x; then
17237          SYSROOT="$DEVKIT_SYSROOT"
17238        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17239          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17240        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17241          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17242        fi
17243
17244
17245fi
17246
17247
17248  # You can force the sysroot if the sysroot encoded into the compiler tools
17249  # is not correct.
17250
17251# Check whether --with-sys-root was given.
17252if test "${with_sys_root+set}" = set; then :
17253  withval=$with_sys_root; SYSROOT=$with_sys_root
17254
17255fi
17256
17257
17258
17259# Check whether --with-sysroot was given.
17260if test "${with_sysroot+set}" = set; then :
17261  withval=$with_sysroot; SYSROOT=$with_sysroot
17262
17263fi
17264
17265
17266
17267# Check whether --with-tools-dir was given.
17268if test "${with_tools_dir+set}" = set; then :
17269  withval=$with_tools_dir;
17270  if test "x$with_tools_dir" != x; then
17271    if test "x$TOOLCHAIN_PATH" = x; then
17272      TOOLCHAIN_PATH="$with_tools_dir"
17273    else
17274      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17275    fi
17276  fi
17277
17278
17279fi
17280
17281
17282
17283# Check whether --with-toolchain-path was given.
17284if test "${with_toolchain_path+set}" = set; then :
17285  withval=$with_toolchain_path;
17286  if test "x$with_toolchain_path" != x; then
17287    if test "x$TOOLCHAIN_PATH" = x; then
17288      TOOLCHAIN_PATH="$with_toolchain_path"
17289    else
17290      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17291    fi
17292  fi
17293
17294
17295fi
17296
17297
17298
17299# Check whether --with-extra-path was given.
17300if test "${with_extra_path+set}" = set; then :
17301  withval=$with_extra_path;
17302  if test "x$with_extra_path" != x; then
17303    if test "x$EXTRA_PATH" = x; then
17304      EXTRA_PATH="$with_extra_path"
17305    else
17306      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17307    fi
17308  fi
17309
17310
17311fi
17312
17313
17314  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17315    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17316    # If not, detect if Xcode is installed by running xcodebuild -version
17317    # if no Xcode installed, xcodebuild exits with 1
17318    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17319    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17320      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17321      # fall back on the stub binary in /usr/bin/xcodebuild
17322      # Extract the first word of "xcodebuild", so it can be a program name with args.
17323set dummy xcodebuild; ac_word=$2
17324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17325$as_echo_n "checking for $ac_word... " >&6; }
17326if ${ac_cv_path_XCODEBUILD+:} false; then :
17327  $as_echo_n "(cached) " >&6
17328else
17329  case $XCODEBUILD in
17330  [\\/]* | ?:[\\/]*)
17331  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17332  ;;
17333  *)
17334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17335for as_dir in $TOOLCHAIN_PATH
17336do
17337  IFS=$as_save_IFS
17338  test -z "$as_dir" && as_dir=.
17339    for ac_exec_ext in '' $ac_executable_extensions; do
17340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17341    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17343    break 2
17344  fi
17345done
17346  done
17347IFS=$as_save_IFS
17348
17349  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17350  ;;
17351esac
17352fi
17353XCODEBUILD=$ac_cv_path_XCODEBUILD
17354if test -n "$XCODEBUILD"; then
17355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17356$as_echo "$XCODEBUILD" >&6; }
17357else
17358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17359$as_echo "no" >&6; }
17360fi
17361
17362
17363    else
17364      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17365      # when only the command line tools are installed there are no SDKs, so headers
17366      # are copied into the system frameworks
17367      XCODEBUILD=
17368
17369    fi
17370
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17372$as_echo_n "checking for sdk name... " >&6; }
17373
17374# Check whether --with-sdk-name was given.
17375if test "${with_sdk_name+set}" = set; then :
17376  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17377
17378fi
17379
17380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17381$as_echo "$SDKNAME" >&6; }
17382
17383    # if toolchain path is specified then don't rely on system headers, they may not compile
17384    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17385    test -z "$TOOLCHAIN_PATH" && \
17386      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17387
17388    if test -z "$SYSROOT"; then
17389      if test -n "$XCODEBUILD"; then
17390        # if we don't have system headers, use default SDK name (last resort)
17391        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17392          SDKNAME=${SDKNAME:-macosx}
17393        fi
17394
17395        if test -n "$SDKNAME"; then
17396          # Call xcodebuild to determine SYSROOT
17397          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17398        fi
17399      else
17400        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17401          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
17402        fi
17403      fi
17404    else
17405      # warn user if --with-sdk-name was also set
17406      if test -n "$with_sdk_name"; then
17407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17408$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17409      fi
17410    fi
17411
17412    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17413      # If no system framework headers, then SYSROOT must be set, or we won't build
17414      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
17415    fi
17416
17417    # Perform a basic sanity test
17418    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17419      if test -z "$SYSROOT"; then
17420        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
17421      else
17422        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17423      fi
17424    fi
17425
17426    # set SDKROOT too, Xcode tools will pick it up
17427    SDKROOT="$SYSROOT"
17428
17429  fi
17430
17431  # Prepend the extra path to the global path
17432
17433  if test "x$EXTRA_PATH" != x; then
17434    if test "x$PATH" = x; then
17435      PATH="$EXTRA_PATH"
17436    else
17437      PATH="$EXTRA_PATH:$PATH"
17438    fi
17439  fi
17440
17441
17442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17443$as_echo_n "checking for sysroot... " >&6; }
17444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17445$as_echo "$SYSROOT" >&6; }
17446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17447$as_echo_n "checking for toolchain path... " >&6; }
17448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17449$as_echo "$TOOLCHAIN_PATH" >&6; }
17450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17451$as_echo_n "checking for extra path... " >&6; }
17452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17453$as_echo "$EXTRA_PATH" >&6; }
17454
17455
17456# To properly create a configuration name, we need to have the OpenJDK target
17457# and options (variants and debug level) parsed.
17458
17459
17460
17461# Check whether --with-conf-name was given.
17462if test "${with_conf_name+set}" = set; then :
17463  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17464fi
17465
17466
17467  # Test from where we are running configure, in or outside of src root.
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17469$as_echo_n "checking where to store configuration... " >&6; }
17470  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17471      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17472      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17473    # We are running configure from the src root.
17474    # Create a default ./build/target-variant-debuglevel output root.
17475    if test "x${CONF_NAME}" = x; then
17476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17477$as_echo "in default location" >&6; }
17478      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17479    else
17480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17481$as_echo "in build directory with custom name" >&6; }
17482    fi
17483    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17484    $MKDIR -p "$OUTPUT_ROOT"
17485    if test ! -d "$OUTPUT_ROOT"; then
17486      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17487    fi
17488  else
17489    # We are running configure from outside of the src dir.
17490    # Then use the current directory as output dir!
17491    # If configuration is situated in normal build directory, just use the build
17492    # directory name as configuration name, otherwise use the complete path.
17493    if test "x${CONF_NAME}" = x; then
17494      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17495    fi
17496    OUTPUT_ROOT="$CURDIR"
17497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17498$as_echo "in current directory" >&6; }
17499
17500    # WARNING: This might be a bad thing to do. You need to be sure you want to
17501    # have a configuration in this directory. Do some sanity checks!
17502
17503    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17504      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17505      # other files
17506      files_present=`$LS $OUTPUT_ROOT`
17507      # Configure has already touched config.log and confdefs.h in the current dir when this check
17508      # is performed.
17509      filtered_files=`$ECHO "$files_present" \
17510          | $SED -e 's/config.log//g' \
17511              -e 's/configure.log//g' \
17512              -e 's/confdefs.h//g' \
17513              -e 's/ //g' \
17514          | $TR -d '\n'`
17515      if test "x$filtered_files" != x; then
17516        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17517$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17519$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17520        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17521$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17522        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17523$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17524        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17525$as_echo "$as_me: seriously mess up just about everything." >&6;}
17526        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17527$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17528        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17529$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17530        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17531      fi
17532    fi
17533  fi
17534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17535$as_echo_n "checking what configuration name to use... " >&6; }
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17537$as_echo "$CONF_NAME" >&6; }
17538
17539
17540  # Only process if variable expands to non-empty
17541
17542  if test "x$OUTPUT_ROOT" != x; then
17543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17544
17545  # Input might be given as Windows format, start by converting to
17546  # unix format.
17547  path="$OUTPUT_ROOT"
17548  new_path=`$CYGPATH -u "$path"`
17549
17550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17553  # "foo.exe" is OK but "foo" is an error.
17554  #
17555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17556  # It is also a way to make sure we got the proper file name for the real test later on.
17557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17558  if test "x$test_shortpath" = x; then
17559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17560$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17561    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17562  fi
17563
17564  # Call helper function which possibly converts this using DOS-style short mode.
17565  # If so, the updated path is stored in $new_path.
17566
17567  input_path="$new_path"
17568  # Check if we need to convert this using DOS-style short mode. If the path
17569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17570  # take no chances and rewrite it.
17571  # Note: m4 eats our [], so we need to use [ and ] instead.
17572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17573  if test "x$has_forbidden_chars" != x; then
17574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17578      # Going to short mode and back again did indeed matter. Since short mode is
17579      # case insensitive, let's make it lowercase to improve readability.
17580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17581      # Now convert it back to Unix-style (cygpath)
17582      input_path=`$CYGPATH -u "$shortmode_path"`
17583      new_path="$input_path"
17584    fi
17585  fi
17586
17587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17588  if test "x$test_cygdrive_prefix" = x; then
17589    # As a simple fix, exclude /usr/bin since it's not a real path.
17590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17592      # a path prefixed by /cygdrive for fixpath to work.
17593      new_path="$CYGWIN_ROOT_PATH$input_path"
17594    fi
17595  fi
17596
17597
17598  if test "x$path" != "x$new_path"; then
17599    OUTPUT_ROOT="$new_path"
17600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17601$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17602  fi
17603
17604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17605
17606  path="$OUTPUT_ROOT"
17607  has_colon=`$ECHO $path | $GREP ^.:`
17608  new_path="$path"
17609  if test "x$has_colon" = x; then
17610    # Not in mixed or Windows style, start by that.
17611    new_path=`cmd //c echo $path`
17612  fi
17613
17614
17615  input_path="$new_path"
17616  # Check if we need to convert this using DOS-style short mode. If the path
17617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17618  # take no chances and rewrite it.
17619  # Note: m4 eats our [], so we need to use [ and ] instead.
17620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17621  if test "x$has_forbidden_chars" != x; then
17622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17624  fi
17625
17626
17627  windows_path="$new_path"
17628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17629    unix_path=`$CYGPATH -u "$windows_path"`
17630    new_path="$unix_path"
17631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17633    new_path="$unix_path"
17634  fi
17635
17636  if test "x$path" != "x$new_path"; then
17637    OUTPUT_ROOT="$new_path"
17638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17639$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17640  fi
17641
17642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17644
17645    else
17646      # We're on a unix platform. Hooray! :)
17647      path="$OUTPUT_ROOT"
17648      has_space=`$ECHO "$path" | $GREP " "`
17649      if test "x$has_space" != x; then
17650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17651$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17653      fi
17654
17655      # Use eval to expand a potential ~
17656      eval path="$path"
17657      if test ! -f "$path" && test ! -d "$path"; then
17658        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17659      fi
17660
17661      if test -d "$path"; then
17662        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17663      else
17664        dir="`$DIRNAME "$path"`"
17665        base="`$BASENAME "$path"`"
17666        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17667      fi
17668    fi
17669  fi
17670
17671
17672  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17673  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17674
17675  SPEC="$OUTPUT_ROOT/spec.gmk"
17676
17677
17678
17679
17680
17681  # The spec.gmk file contains all variables for the make system.
17682  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17683
17684  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17685  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17686
17687  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17688  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17689
17690  # The compare.sh is used to compare the build output to other builds.
17691  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17692
17693  # The generated Makefile knows where the spec.gmk is and where the source is.
17694  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17695  # which will look for generated configurations
17696  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17697
17698
17699
17700# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17701
17702  for ac_prog in apt-get yum brew port pkgutil pkgadd
17703do
17704  # Extract the first word of "$ac_prog", so it can be a program name with args.
17705set dummy $ac_prog; ac_word=$2
17706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17707$as_echo_n "checking for $ac_word... " >&6; }
17708if ${ac_cv_prog_PKGHANDLER+:} false; then :
17709  $as_echo_n "(cached) " >&6
17710else
17711  if test -n "$PKGHANDLER"; then
17712  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17713else
17714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17715for as_dir in $PATH
17716do
17717  IFS=$as_save_IFS
17718  test -z "$as_dir" && as_dir=.
17719    for ac_exec_ext in '' $ac_executable_extensions; do
17720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17721    ac_cv_prog_PKGHANDLER="$ac_prog"
17722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17723    break 2
17724  fi
17725done
17726  done
17727IFS=$as_save_IFS
17728
17729fi
17730fi
17731PKGHANDLER=$ac_cv_prog_PKGHANDLER
17732if test -n "$PKGHANDLER"; then
17733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17734$as_echo "$PKGHANDLER" >&6; }
17735else
17736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17737$as_echo "no" >&6; }
17738fi
17739
17740
17741  test -n "$PKGHANDLER" && break
17742done
17743
17744
17745
17746# Setup tools that requires more complex handling, or that is not needed by the configure script.
17747
17748
17749
17750  # Publish this variable in the help.
17751
17752
17753  if [ -z "${MAKE+x}" ]; then
17754    # The variable is not set by user, try to locate tool using the code snippet
17755
17756    # Try our hardest to locate a correct version of GNU make
17757    for ac_prog in gmake
17758do
17759  # Extract the first word of "$ac_prog", so it can be a program name with args.
17760set dummy $ac_prog; ac_word=$2
17761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17762$as_echo_n "checking for $ac_word... " >&6; }
17763if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17764  $as_echo_n "(cached) " >&6
17765else
17766  case $CHECK_GMAKE in
17767  [\\/]* | ?:[\\/]*)
17768  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17769  ;;
17770  *)
17771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17772for as_dir in $PATH
17773do
17774  IFS=$as_save_IFS
17775  test -z "$as_dir" && as_dir=.
17776    for ac_exec_ext in '' $ac_executable_extensions; do
17777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17778    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17780    break 2
17781  fi
17782done
17783  done
17784IFS=$as_save_IFS
17785
17786  ;;
17787esac
17788fi
17789CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17790if test -n "$CHECK_GMAKE"; then
17791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17792$as_echo "$CHECK_GMAKE" >&6; }
17793else
17794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17795$as_echo "no" >&6; }
17796fi
17797
17798
17799  test -n "$CHECK_GMAKE" && break
17800done
17801
17802
17803  MAKE_CANDIDATE=""$CHECK_GMAKE""
17804  DESCRIPTION="gmake in PATH"
17805
17806  # On Cygwin, we require a newer version of make than on other platforms
17807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17808    MAKE_VERSION_EXPR="-e 4\."
17809    MAKE_REQUIRED_VERSION="4.0"
17810   else
17811    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17812    MAKE_REQUIRED_VERSION="3.81"
17813  fi
17814
17815  if test "x$MAKE_CANDIDATE" != x; then
17816    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17817$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17818    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17819    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17820    if test "x$IS_GNU_MAKE" = x; then
17821      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17822$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17823    else
17824      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17825      if test "x$IS_MODERN_MAKE" = x; then
17826        { $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
17827$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;}
17828      else
17829        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17830          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17831            MAKE_EXPECTED_ENV='cygwin'
17832          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17833            MAKE_EXPECTED_ENV='msys'
17834          else
17835            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17836          fi
17837          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17838          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17839        else
17840          # Not relevant for non-Windows
17841          IS_MAKE_CORRECT_ENV=true
17842        fi
17843        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17844          { $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
17845$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;}
17846        else
17847          FOUND_MAKE=$MAKE_CANDIDATE
17848
17849  # Only process if variable expands to non-empty
17850
17851  if test "x$FOUND_MAKE" != x; then
17852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17853
17854  # First separate the path from the arguments. This will split at the first
17855  # space.
17856  complete="$FOUND_MAKE"
17857  path="${complete%% *}"
17858  tmp="$complete EOL"
17859  arguments="${tmp#* }"
17860
17861  # Input might be given as Windows format, start by converting to
17862  # unix format.
17863  new_path=`$CYGPATH -u "$path"`
17864
17865  # Now try to locate executable using which
17866  new_path=`$WHICH "$new_path" 2> /dev/null`
17867  # bat and cmd files are not always considered executable in cygwin causing which
17868  # to not find them
17869  if test "x$new_path" = x \
17870      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17871      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17872    new_path=`$CYGPATH -u "$path"`
17873  fi
17874  if test "x$new_path" = x; then
17875    # Oops. Which didn't find the executable.
17876    # The splitting of arguments from the executable at a space might have been incorrect,
17877    # since paths with space are more likely in Windows. Give it another try with the whole
17878    # argument.
17879    path="$complete"
17880    arguments="EOL"
17881    new_path=`$CYGPATH -u "$path"`
17882    new_path=`$WHICH "$new_path" 2> /dev/null`
17883    # bat and cmd files are not always considered executable in cygwin causing which
17884    # to not find them
17885    if test "x$new_path" = x \
17886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17888      new_path=`$CYGPATH -u "$path"`
17889    fi
17890    if test "x$new_path" = x; then
17891      # It's still not found. Now this is an unrecoverable error.
17892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17893$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17894      has_space=`$ECHO "$complete" | $GREP " "`
17895      if test "x$has_space" != x; then
17896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17898      fi
17899      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17900    fi
17901  fi
17902
17903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17906  # "foo.exe" is OK but "foo" is an error.
17907  #
17908  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17909  # It is also a way to make sure we got the proper file name for the real test later on.
17910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17911  if test "x$test_shortpath" = x; then
17912    # Short path failed, file does not exist as specified.
17913    # Try adding .exe or .cmd
17914    if test -f "${new_path}.exe"; then
17915      input_to_shortpath="${new_path}.exe"
17916    elif test -f "${new_path}.cmd"; then
17917      input_to_shortpath="${new_path}.cmd"
17918    else
17919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17920$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17921      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17922$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17923      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17924    fi
17925  else
17926    input_to_shortpath="$new_path"
17927  fi
17928
17929  # Call helper function which possibly converts this using DOS-style short mode.
17930  # If so, the updated path is stored in $new_path.
17931  new_path="$input_to_shortpath"
17932
17933  input_path="$input_to_shortpath"
17934  # Check if we need to convert this using DOS-style short mode. If the path
17935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17936  # take no chances and rewrite it.
17937  # Note: m4 eats our [], so we need to use [ and ] instead.
17938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17939  if test "x$has_forbidden_chars" != x; then
17940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17944      # Going to short mode and back again did indeed matter. Since short mode is
17945      # case insensitive, let's make it lowercase to improve readability.
17946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17947      # Now convert it back to Unix-style (cygpath)
17948      input_path=`$CYGPATH -u "$shortmode_path"`
17949      new_path="$input_path"
17950    fi
17951  fi
17952
17953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17954  if test "x$test_cygdrive_prefix" = x; then
17955    # As a simple fix, exclude /usr/bin since it's not a real path.
17956    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17958      # a path prefixed by /cygdrive for fixpath to work.
17959      new_path="$CYGWIN_ROOT_PATH$input_path"
17960    fi
17961  fi
17962
17963  # remove trailing .exe if any
17964  new_path="${new_path/%.exe/}"
17965
17966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17967
17968  # First separate the path from the arguments. This will split at the first
17969  # space.
17970  complete="$FOUND_MAKE"
17971  path="${complete%% *}"
17972  tmp="$complete EOL"
17973  arguments="${tmp#* }"
17974
17975  # Input might be given as Windows format, start by converting to
17976  # unix format.
17977  new_path="$path"
17978
17979  windows_path="$new_path"
17980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17981    unix_path=`$CYGPATH -u "$windows_path"`
17982    new_path="$unix_path"
17983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17985    new_path="$unix_path"
17986  fi
17987
17988
17989  # Now try to locate executable using which
17990  new_path=`$WHICH "$new_path" 2> /dev/null`
17991
17992  if test "x$new_path" = x; then
17993    # Oops. Which didn't find the executable.
17994    # The splitting of arguments from the executable at a space might have been incorrect,
17995    # since paths with space are more likely in Windows. Give it another try with the whole
17996    # argument.
17997    path="$complete"
17998    arguments="EOL"
17999    new_path="$path"
18000
18001  windows_path="$new_path"
18002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18003    unix_path=`$CYGPATH -u "$windows_path"`
18004    new_path="$unix_path"
18005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18007    new_path="$unix_path"
18008  fi
18009
18010
18011    new_path=`$WHICH "$new_path" 2> /dev/null`
18012    # bat and cmd files are not always considered executable in MSYS causing which
18013    # to not find them
18014    if test "x$new_path" = x \
18015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18017      new_path="$path"
18018
18019  windows_path="$new_path"
18020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021    unix_path=`$CYGPATH -u "$windows_path"`
18022    new_path="$unix_path"
18023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18025    new_path="$unix_path"
18026  fi
18027
18028    fi
18029
18030    if test "x$new_path" = x; then
18031      # It's still not found. Now this is an unrecoverable error.
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18034      has_space=`$ECHO "$complete" | $GREP " "`
18035      if test "x$has_space" != x; then
18036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18038      fi
18039      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18040    fi
18041  fi
18042
18043  # Now new_path has a complete unix path to the binary
18044  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18045    # Keep paths in /bin as-is, but remove trailing .exe if any
18046    new_path="${new_path/%.exe/}"
18047    # Do not save /bin paths to all_fixpath_prefixes!
18048  else
18049    # Not in mixed or Windows style, start by that.
18050    new_path=`cmd //c echo $new_path`
18051
18052  input_path="$new_path"
18053  # Check if we need to convert this using DOS-style short mode. If the path
18054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18055  # take no chances and rewrite it.
18056  # Note: m4 eats our [], so we need to use [ and ] instead.
18057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18058  if test "x$has_forbidden_chars" != x; then
18059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18061  fi
18062
18063    # Output is in $new_path
18064
18065  windows_path="$new_path"
18066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18067    unix_path=`$CYGPATH -u "$windows_path"`
18068    new_path="$unix_path"
18069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18071    new_path="$unix_path"
18072  fi
18073
18074    # remove trailing .exe if any
18075    new_path="${new_path/%.exe/}"
18076
18077    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18078    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18079  fi
18080
18081    else
18082      # We're on a unix platform. Hooray! :)
18083      # First separate the path from the arguments. This will split at the first
18084      # space.
18085      complete="$FOUND_MAKE"
18086      path="${complete%% *}"
18087      tmp="$complete EOL"
18088      arguments="${tmp#* }"
18089
18090      # Cannot rely on the command "which" here since it doesn't always work.
18091      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18092      if test -z "$is_absolute_path"; then
18093        # Path to executable is not absolute. Find it.
18094        IFS_save="$IFS"
18095        IFS=:
18096        for p in $PATH; do
18097          if test -f "$p/$path" && test -x "$p/$path"; then
18098            new_path="$p/$path"
18099            break
18100          fi
18101        done
18102        IFS="$IFS_save"
18103      else
18104        # This is an absolute path, we can use it without further modifications.
18105        new_path="$path"
18106      fi
18107
18108      if test "x$new_path" = x; then
18109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18110$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18111        has_space=`$ECHO "$complete" | $GREP " "`
18112        if test "x$has_space" != x; then
18113          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18114$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18115        fi
18116        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18117      fi
18118    fi
18119
18120    # Now join together the path and the arguments once again
18121    if test "x$arguments" != xEOL; then
18122      new_complete="$new_path ${arguments% *}"
18123    else
18124      new_complete="$new_path"
18125    fi
18126
18127    if test "x$complete" != "x$new_complete"; then
18128      FOUND_MAKE="$new_complete"
18129      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18130$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18131    fi
18132  fi
18133
18134        fi
18135      fi
18136    fi
18137  fi
18138
18139
18140    if test "x$FOUND_MAKE" = x; then
18141      for ac_prog in make
18142do
18143  # Extract the first word of "$ac_prog", so it can be a program name with args.
18144set dummy $ac_prog; ac_word=$2
18145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18146$as_echo_n "checking for $ac_word... " >&6; }
18147if ${ac_cv_path_CHECK_MAKE+:} false; then :
18148  $as_echo_n "(cached) " >&6
18149else
18150  case $CHECK_MAKE in
18151  [\\/]* | ?:[\\/]*)
18152  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18153  ;;
18154  *)
18155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18156for as_dir in $PATH
18157do
18158  IFS=$as_save_IFS
18159  test -z "$as_dir" && as_dir=.
18160    for ac_exec_ext in '' $ac_executable_extensions; do
18161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18162    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18164    break 2
18165  fi
18166done
18167  done
18168IFS=$as_save_IFS
18169
18170  ;;
18171esac
18172fi
18173CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18174if test -n "$CHECK_MAKE"; then
18175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18176$as_echo "$CHECK_MAKE" >&6; }
18177else
18178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18179$as_echo "no" >&6; }
18180fi
18181
18182
18183  test -n "$CHECK_MAKE" && break
18184done
18185
18186
18187  MAKE_CANDIDATE=""$CHECK_MAKE""
18188  DESCRIPTION="make in PATH"
18189
18190  # On Cygwin, we require a newer version of make than on other platforms
18191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18192    MAKE_VERSION_EXPR="-e 4\."
18193    MAKE_REQUIRED_VERSION="4.0"
18194   else
18195    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18196    MAKE_REQUIRED_VERSION="3.81"
18197  fi
18198
18199  if test "x$MAKE_CANDIDATE" != x; then
18200    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18201$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18202    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18203    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18204    if test "x$IS_GNU_MAKE" = x; then
18205      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18206$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18207    else
18208      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18209      if test "x$IS_MODERN_MAKE" = x; then
18210        { $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
18211$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;}
18212      else
18213        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18214          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18215            MAKE_EXPECTED_ENV='cygwin'
18216          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18217            MAKE_EXPECTED_ENV='msys'
18218          else
18219            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18220          fi
18221          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18222          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18223        else
18224          # Not relevant for non-Windows
18225          IS_MAKE_CORRECT_ENV=true
18226        fi
18227        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18228          { $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
18229$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;}
18230        else
18231          FOUND_MAKE=$MAKE_CANDIDATE
18232
18233  # Only process if variable expands to non-empty
18234
18235  if test "x$FOUND_MAKE" != x; then
18236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18237
18238  # First separate the path from the arguments. This will split at the first
18239  # space.
18240  complete="$FOUND_MAKE"
18241  path="${complete%% *}"
18242  tmp="$complete EOL"
18243  arguments="${tmp#* }"
18244
18245  # Input might be given as Windows format, start by converting to
18246  # unix format.
18247  new_path=`$CYGPATH -u "$path"`
18248
18249  # Now try to locate executable using which
18250  new_path=`$WHICH "$new_path" 2> /dev/null`
18251  # bat and cmd files are not always considered executable in cygwin causing which
18252  # to not find them
18253  if test "x$new_path" = x \
18254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18256    new_path=`$CYGPATH -u "$path"`
18257  fi
18258  if test "x$new_path" = x; then
18259    # Oops. Which didn't find the executable.
18260    # The splitting of arguments from the executable at a space might have been incorrect,
18261    # since paths with space are more likely in Windows. Give it another try with the whole
18262    # argument.
18263    path="$complete"
18264    arguments="EOL"
18265    new_path=`$CYGPATH -u "$path"`
18266    new_path=`$WHICH "$new_path" 2> /dev/null`
18267    # bat and cmd files are not always considered executable in cygwin causing which
18268    # to not find them
18269    if test "x$new_path" = x \
18270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18272      new_path=`$CYGPATH -u "$path"`
18273    fi
18274    if test "x$new_path" = x; then
18275      # It's still not found. Now this is an unrecoverable error.
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18278      has_space=`$ECHO "$complete" | $GREP " "`
18279      if test "x$has_space" != x; then
18280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18282      fi
18283      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18284    fi
18285  fi
18286
18287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18290  # "foo.exe" is OK but "foo" is an error.
18291  #
18292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18293  # It is also a way to make sure we got the proper file name for the real test later on.
18294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18295  if test "x$test_shortpath" = x; then
18296    # Short path failed, file does not exist as specified.
18297    # Try adding .exe or .cmd
18298    if test -f "${new_path}.exe"; then
18299      input_to_shortpath="${new_path}.exe"
18300    elif test -f "${new_path}.cmd"; then
18301      input_to_shortpath="${new_path}.cmd"
18302    else
18303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18304$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18307      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18308    fi
18309  else
18310    input_to_shortpath="$new_path"
18311  fi
18312
18313  # Call helper function which possibly converts this using DOS-style short mode.
18314  # If so, the updated path is stored in $new_path.
18315  new_path="$input_to_shortpath"
18316
18317  input_path="$input_to_shortpath"
18318  # Check if we need to convert this using DOS-style short mode. If the path
18319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18320  # take no chances and rewrite it.
18321  # Note: m4 eats our [], so we need to use [ and ] instead.
18322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18323  if test "x$has_forbidden_chars" != x; then
18324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18328      # Going to short mode and back again did indeed matter. Since short mode is
18329      # case insensitive, let's make it lowercase to improve readability.
18330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18331      # Now convert it back to Unix-style (cygpath)
18332      input_path=`$CYGPATH -u "$shortmode_path"`
18333      new_path="$input_path"
18334    fi
18335  fi
18336
18337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18338  if test "x$test_cygdrive_prefix" = x; then
18339    # As a simple fix, exclude /usr/bin since it's not a real path.
18340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18342      # a path prefixed by /cygdrive for fixpath to work.
18343      new_path="$CYGWIN_ROOT_PATH$input_path"
18344    fi
18345  fi
18346
18347  # remove trailing .exe if any
18348  new_path="${new_path/%.exe/}"
18349
18350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18351
18352  # First separate the path from the arguments. This will split at the first
18353  # space.
18354  complete="$FOUND_MAKE"
18355  path="${complete%% *}"
18356  tmp="$complete EOL"
18357  arguments="${tmp#* }"
18358
18359  # Input might be given as Windows format, start by converting to
18360  # unix format.
18361  new_path="$path"
18362
18363  windows_path="$new_path"
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    unix_path=`$CYGPATH -u "$windows_path"`
18366    new_path="$unix_path"
18367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18369    new_path="$unix_path"
18370  fi
18371
18372
18373  # Now try to locate executable using which
18374  new_path=`$WHICH "$new_path" 2> /dev/null`
18375
18376  if test "x$new_path" = x; then
18377    # Oops. Which didn't find the executable.
18378    # The splitting of arguments from the executable at a space might have been incorrect,
18379    # since paths with space are more likely in Windows. Give it another try with the whole
18380    # argument.
18381    path="$complete"
18382    arguments="EOL"
18383    new_path="$path"
18384
18385  windows_path="$new_path"
18386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18387    unix_path=`$CYGPATH -u "$windows_path"`
18388    new_path="$unix_path"
18389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18391    new_path="$unix_path"
18392  fi
18393
18394
18395    new_path=`$WHICH "$new_path" 2> /dev/null`
18396    # bat and cmd files are not always considered executable in MSYS causing which
18397    # to not find them
18398    if test "x$new_path" = x \
18399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18401      new_path="$path"
18402
18403  windows_path="$new_path"
18404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18405    unix_path=`$CYGPATH -u "$windows_path"`
18406    new_path="$unix_path"
18407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18409    new_path="$unix_path"
18410  fi
18411
18412    fi
18413
18414    if test "x$new_path" = x; then
18415      # It's still not found. Now this is an unrecoverable error.
18416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18417$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18418      has_space=`$ECHO "$complete" | $GREP " "`
18419      if test "x$has_space" != x; then
18420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18422      fi
18423      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18424    fi
18425  fi
18426
18427  # Now new_path has a complete unix path to the binary
18428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18429    # Keep paths in /bin as-is, but remove trailing .exe if any
18430    new_path="${new_path/%.exe/}"
18431    # Do not save /bin paths to all_fixpath_prefixes!
18432  else
18433    # Not in mixed or Windows style, start by that.
18434    new_path=`cmd //c echo $new_path`
18435
18436  input_path="$new_path"
18437  # Check if we need to convert this using DOS-style short mode. If the path
18438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18439  # take no chances and rewrite it.
18440  # Note: m4 eats our [], so we need to use [ and ] instead.
18441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18442  if test "x$has_forbidden_chars" != x; then
18443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18445  fi
18446
18447    # Output is in $new_path
18448
18449  windows_path="$new_path"
18450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18451    unix_path=`$CYGPATH -u "$windows_path"`
18452    new_path="$unix_path"
18453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18455    new_path="$unix_path"
18456  fi
18457
18458    # remove trailing .exe if any
18459    new_path="${new_path/%.exe/}"
18460
18461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18463  fi
18464
18465    else
18466      # We're on a unix platform. Hooray! :)
18467      # First separate the path from the arguments. This will split at the first
18468      # space.
18469      complete="$FOUND_MAKE"
18470      path="${complete%% *}"
18471      tmp="$complete EOL"
18472      arguments="${tmp#* }"
18473
18474      # Cannot rely on the command "which" here since it doesn't always work.
18475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18476      if test -z "$is_absolute_path"; then
18477        # Path to executable is not absolute. Find it.
18478        IFS_save="$IFS"
18479        IFS=:
18480        for p in $PATH; do
18481          if test -f "$p/$path" && test -x "$p/$path"; then
18482            new_path="$p/$path"
18483            break
18484          fi
18485        done
18486        IFS="$IFS_save"
18487      else
18488        # This is an absolute path, we can use it without further modifications.
18489        new_path="$path"
18490      fi
18491
18492      if test "x$new_path" = x; then
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18494$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18495        has_space=`$ECHO "$complete" | $GREP " "`
18496        if test "x$has_space" != x; then
18497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18499        fi
18500        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18501      fi
18502    fi
18503
18504    # Now join together the path and the arguments once again
18505    if test "x$arguments" != xEOL; then
18506      new_complete="$new_path ${arguments% *}"
18507    else
18508      new_complete="$new_path"
18509    fi
18510
18511    if test "x$complete" != "x$new_complete"; then
18512      FOUND_MAKE="$new_complete"
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18514$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18515    fi
18516  fi
18517
18518        fi
18519      fi
18520    fi
18521  fi
18522
18523    fi
18524
18525    if test "x$FOUND_MAKE" = x; then
18526      if test "x$TOOLCHAIN_PATH" != x; then
18527        # We have a toolchain path, check that as well before giving up.
18528        OLD_PATH=$PATH
18529        PATH=$TOOLCHAIN_PATH:$PATH
18530        for ac_prog in gmake
18531do
18532  # Extract the first word of "$ac_prog", so it can be a program name with args.
18533set dummy $ac_prog; ac_word=$2
18534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18535$as_echo_n "checking for $ac_word... " >&6; }
18536if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18537  $as_echo_n "(cached) " >&6
18538else
18539  case $CHECK_TOOLSDIR_GMAKE in
18540  [\\/]* | ?:[\\/]*)
18541  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18542  ;;
18543  *)
18544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18545for as_dir in $PATH
18546do
18547  IFS=$as_save_IFS
18548  test -z "$as_dir" && as_dir=.
18549    for ac_exec_ext in '' $ac_executable_extensions; do
18550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18551    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18553    break 2
18554  fi
18555done
18556  done
18557IFS=$as_save_IFS
18558
18559  ;;
18560esac
18561fi
18562CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18563if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18565$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18566else
18567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18568$as_echo "no" >&6; }
18569fi
18570
18571
18572  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18573done
18574
18575
18576  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18577  DESCRIPTION="gmake in tools-dir"
18578
18579  # On Cygwin, we require a newer version of make than on other platforms
18580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18581    MAKE_VERSION_EXPR="-e 4\."
18582    MAKE_REQUIRED_VERSION="4.0"
18583   else
18584    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18585    MAKE_REQUIRED_VERSION="3.81"
18586  fi
18587
18588  if test "x$MAKE_CANDIDATE" != x; then
18589    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18590$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18591    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18592    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18593    if test "x$IS_GNU_MAKE" = x; then
18594      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18595$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18596    else
18597      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18598      if test "x$IS_MODERN_MAKE" = x; then
18599        { $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
18600$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;}
18601      else
18602        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18603          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18604            MAKE_EXPECTED_ENV='cygwin'
18605          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18606            MAKE_EXPECTED_ENV='msys'
18607          else
18608            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18609          fi
18610          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18611          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18612        else
18613          # Not relevant for non-Windows
18614          IS_MAKE_CORRECT_ENV=true
18615        fi
18616        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18617          { $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
18618$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;}
18619        else
18620          FOUND_MAKE=$MAKE_CANDIDATE
18621
18622  # Only process if variable expands to non-empty
18623
18624  if test "x$FOUND_MAKE" != x; then
18625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626
18627  # First separate the path from the arguments. This will split at the first
18628  # space.
18629  complete="$FOUND_MAKE"
18630  path="${complete%% *}"
18631  tmp="$complete EOL"
18632  arguments="${tmp#* }"
18633
18634  # Input might be given as Windows format, start by converting to
18635  # unix format.
18636  new_path=`$CYGPATH -u "$path"`
18637
18638  # Now try to locate executable using which
18639  new_path=`$WHICH "$new_path" 2> /dev/null`
18640  # bat and cmd files are not always considered executable in cygwin causing which
18641  # to not find them
18642  if test "x$new_path" = x \
18643      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18644      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18645    new_path=`$CYGPATH -u "$path"`
18646  fi
18647  if test "x$new_path" = x; then
18648    # Oops. Which didn't find the executable.
18649    # The splitting of arguments from the executable at a space might have been incorrect,
18650    # since paths with space are more likely in Windows. Give it another try with the whole
18651    # argument.
18652    path="$complete"
18653    arguments="EOL"
18654    new_path=`$CYGPATH -u "$path"`
18655    new_path=`$WHICH "$new_path" 2> /dev/null`
18656    # bat and cmd files are not always considered executable in cygwin causing which
18657    # to not find them
18658    if test "x$new_path" = x \
18659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18661      new_path=`$CYGPATH -u "$path"`
18662    fi
18663    if test "x$new_path" = x; then
18664      # It's still not found. Now this is an unrecoverable error.
18665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18667      has_space=`$ECHO "$complete" | $GREP " "`
18668      if test "x$has_space" != x; then
18669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18671      fi
18672      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18673    fi
18674  fi
18675
18676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18679  # "foo.exe" is OK but "foo" is an error.
18680  #
18681  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18682  # It is also a way to make sure we got the proper file name for the real test later on.
18683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18684  if test "x$test_shortpath" = x; then
18685    # Short path failed, file does not exist as specified.
18686    # Try adding .exe or .cmd
18687    if test -f "${new_path}.exe"; then
18688      input_to_shortpath="${new_path}.exe"
18689    elif test -f "${new_path}.cmd"; then
18690      input_to_shortpath="${new_path}.cmd"
18691    else
18692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18693$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18697    fi
18698  else
18699    input_to_shortpath="$new_path"
18700  fi
18701
18702  # Call helper function which possibly converts this using DOS-style short mode.
18703  # If so, the updated path is stored in $new_path.
18704  new_path="$input_to_shortpath"
18705
18706  input_path="$input_to_shortpath"
18707  # Check if we need to convert this using DOS-style short mode. If the path
18708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18709  # take no chances and rewrite it.
18710  # Note: m4 eats our [], so we need to use [ and ] instead.
18711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18712  if test "x$has_forbidden_chars" != x; then
18713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18717      # Going to short mode and back again did indeed matter. Since short mode is
18718      # case insensitive, let's make it lowercase to improve readability.
18719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18720      # Now convert it back to Unix-style (cygpath)
18721      input_path=`$CYGPATH -u "$shortmode_path"`
18722      new_path="$input_path"
18723    fi
18724  fi
18725
18726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18727  if test "x$test_cygdrive_prefix" = x; then
18728    # As a simple fix, exclude /usr/bin since it's not a real path.
18729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18731      # a path prefixed by /cygdrive for fixpath to work.
18732      new_path="$CYGWIN_ROOT_PATH$input_path"
18733    fi
18734  fi
18735
18736  # remove trailing .exe if any
18737  new_path="${new_path/%.exe/}"
18738
18739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18740
18741  # First separate the path from the arguments. This will split at the first
18742  # space.
18743  complete="$FOUND_MAKE"
18744  path="${complete%% *}"
18745  tmp="$complete EOL"
18746  arguments="${tmp#* }"
18747
18748  # Input might be given as Windows format, start by converting to
18749  # unix format.
18750  new_path="$path"
18751
18752  windows_path="$new_path"
18753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18754    unix_path=`$CYGPATH -u "$windows_path"`
18755    new_path="$unix_path"
18756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18758    new_path="$unix_path"
18759  fi
18760
18761
18762  # Now try to locate executable using which
18763  new_path=`$WHICH "$new_path" 2> /dev/null`
18764
18765  if test "x$new_path" = x; then
18766    # Oops. Which didn't find the executable.
18767    # The splitting of arguments from the executable at a space might have been incorrect,
18768    # since paths with space are more likely in Windows. Give it another try with the whole
18769    # argument.
18770    path="$complete"
18771    arguments="EOL"
18772    new_path="$path"
18773
18774  windows_path="$new_path"
18775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18776    unix_path=`$CYGPATH -u "$windows_path"`
18777    new_path="$unix_path"
18778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18780    new_path="$unix_path"
18781  fi
18782
18783
18784    new_path=`$WHICH "$new_path" 2> /dev/null`
18785    # bat and cmd files are not always considered executable in MSYS causing which
18786    # to not find them
18787    if test "x$new_path" = x \
18788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18790      new_path="$path"
18791
18792  windows_path="$new_path"
18793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18794    unix_path=`$CYGPATH -u "$windows_path"`
18795    new_path="$unix_path"
18796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18798    new_path="$unix_path"
18799  fi
18800
18801    fi
18802
18803    if test "x$new_path" = x; then
18804      # It's still not found. Now this is an unrecoverable error.
18805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18806$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18807      has_space=`$ECHO "$complete" | $GREP " "`
18808      if test "x$has_space" != x; then
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18811      fi
18812      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18813    fi
18814  fi
18815
18816  # Now new_path has a complete unix path to the binary
18817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18818    # Keep paths in /bin as-is, but remove trailing .exe if any
18819    new_path="${new_path/%.exe/}"
18820    # Do not save /bin paths to all_fixpath_prefixes!
18821  else
18822    # Not in mixed or Windows style, start by that.
18823    new_path=`cmd //c echo $new_path`
18824
18825  input_path="$new_path"
18826  # Check if we need to convert this using DOS-style short mode. If the path
18827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18828  # take no chances and rewrite it.
18829  # Note: m4 eats our [], so we need to use [ and ] instead.
18830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18831  if test "x$has_forbidden_chars" != x; then
18832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18834  fi
18835
18836    # Output is in $new_path
18837
18838  windows_path="$new_path"
18839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18840    unix_path=`$CYGPATH -u "$windows_path"`
18841    new_path="$unix_path"
18842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18844    new_path="$unix_path"
18845  fi
18846
18847    # remove trailing .exe if any
18848    new_path="${new_path/%.exe/}"
18849
18850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18852  fi
18853
18854    else
18855      # We're on a unix platform. Hooray! :)
18856      # First separate the path from the arguments. This will split at the first
18857      # space.
18858      complete="$FOUND_MAKE"
18859      path="${complete%% *}"
18860      tmp="$complete EOL"
18861      arguments="${tmp#* }"
18862
18863      # Cannot rely on the command "which" here since it doesn't always work.
18864      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18865      if test -z "$is_absolute_path"; then
18866        # Path to executable is not absolute. Find it.
18867        IFS_save="$IFS"
18868        IFS=:
18869        for p in $PATH; do
18870          if test -f "$p/$path" && test -x "$p/$path"; then
18871            new_path="$p/$path"
18872            break
18873          fi
18874        done
18875        IFS="$IFS_save"
18876      else
18877        # This is an absolute path, we can use it without further modifications.
18878        new_path="$path"
18879      fi
18880
18881      if test "x$new_path" = x; then
18882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18883$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18884        has_space=`$ECHO "$complete" | $GREP " "`
18885        if test "x$has_space" != x; then
18886          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18887$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18888        fi
18889        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18890      fi
18891    fi
18892
18893    # Now join together the path and the arguments once again
18894    if test "x$arguments" != xEOL; then
18895      new_complete="$new_path ${arguments% *}"
18896    else
18897      new_complete="$new_path"
18898    fi
18899
18900    if test "x$complete" != "x$new_complete"; then
18901      FOUND_MAKE="$new_complete"
18902      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18903$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18904    fi
18905  fi
18906
18907        fi
18908      fi
18909    fi
18910  fi
18911
18912        if test "x$FOUND_MAKE" = x; then
18913          for ac_prog in make
18914do
18915  # Extract the first word of "$ac_prog", so it can be a program name with args.
18916set dummy $ac_prog; ac_word=$2
18917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18918$as_echo_n "checking for $ac_word... " >&6; }
18919if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18920  $as_echo_n "(cached) " >&6
18921else
18922  case $CHECK_TOOLSDIR_MAKE in
18923  [\\/]* | ?:[\\/]*)
18924  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18925  ;;
18926  *)
18927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18928for as_dir in $PATH
18929do
18930  IFS=$as_save_IFS
18931  test -z "$as_dir" && as_dir=.
18932    for ac_exec_ext in '' $ac_executable_extensions; do
18933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18934    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18936    break 2
18937  fi
18938done
18939  done
18940IFS=$as_save_IFS
18941
18942  ;;
18943esac
18944fi
18945CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18946if test -n "$CHECK_TOOLSDIR_MAKE"; then
18947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18948$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18949else
18950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18951$as_echo "no" >&6; }
18952fi
18953
18954
18955  test -n "$CHECK_TOOLSDIR_MAKE" && break
18956done
18957
18958
18959  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18960  DESCRIPTION="make in tools-dir"
18961
18962  # On Cygwin, we require a newer version of make than on other platforms
18963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18964    MAKE_VERSION_EXPR="-e 4\."
18965    MAKE_REQUIRED_VERSION="4.0"
18966   else
18967    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18968    MAKE_REQUIRED_VERSION="3.81"
18969  fi
18970
18971  if test "x$MAKE_CANDIDATE" != x; then
18972    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18973$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18974    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18975    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18976    if test "x$IS_GNU_MAKE" = x; then
18977      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18978$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18979    else
18980      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18981      if test "x$IS_MODERN_MAKE" = x; then
18982        { $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
18983$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;}
18984      else
18985        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18986          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18987            MAKE_EXPECTED_ENV='cygwin'
18988          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18989            MAKE_EXPECTED_ENV='msys'
18990          else
18991            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18992          fi
18993          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18994          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18995        else
18996          # Not relevant for non-Windows
18997          IS_MAKE_CORRECT_ENV=true
18998        fi
18999        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19000          { $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
19001$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;}
19002        else
19003          FOUND_MAKE=$MAKE_CANDIDATE
19004
19005  # Only process if variable expands to non-empty
19006
19007  if test "x$FOUND_MAKE" != x; then
19008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19009
19010  # First separate the path from the arguments. This will split at the first
19011  # space.
19012  complete="$FOUND_MAKE"
19013  path="${complete%% *}"
19014  tmp="$complete EOL"
19015  arguments="${tmp#* }"
19016
19017  # Input might be given as Windows format, start by converting to
19018  # unix format.
19019  new_path=`$CYGPATH -u "$path"`
19020
19021  # Now try to locate executable using which
19022  new_path=`$WHICH "$new_path" 2> /dev/null`
19023  # bat and cmd files are not always considered executable in cygwin causing which
19024  # to not find them
19025  if test "x$new_path" = x \
19026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19028    new_path=`$CYGPATH -u "$path"`
19029  fi
19030  if test "x$new_path" = x; then
19031    # Oops. Which didn't find the executable.
19032    # The splitting of arguments from the executable at a space might have been incorrect,
19033    # since paths with space are more likely in Windows. Give it another try with the whole
19034    # argument.
19035    path="$complete"
19036    arguments="EOL"
19037    new_path=`$CYGPATH -u "$path"`
19038    new_path=`$WHICH "$new_path" 2> /dev/null`
19039    # bat and cmd files are not always considered executable in cygwin causing which
19040    # to not find them
19041    if test "x$new_path" = x \
19042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19044      new_path=`$CYGPATH -u "$path"`
19045    fi
19046    if test "x$new_path" = x; then
19047      # It's still not found. Now this is an unrecoverable error.
19048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19049$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19050      has_space=`$ECHO "$complete" | $GREP " "`
19051      if test "x$has_space" != x; then
19052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19054      fi
19055      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19056    fi
19057  fi
19058
19059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19062  # "foo.exe" is OK but "foo" is an error.
19063  #
19064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19065  # It is also a way to make sure we got the proper file name for the real test later on.
19066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19067  if test "x$test_shortpath" = x; then
19068    # Short path failed, file does not exist as specified.
19069    # Try adding .exe or .cmd
19070    if test -f "${new_path}.exe"; then
19071      input_to_shortpath="${new_path}.exe"
19072    elif test -f "${new_path}.cmd"; then
19073      input_to_shortpath="${new_path}.cmd"
19074    else
19075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19079      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19080    fi
19081  else
19082    input_to_shortpath="$new_path"
19083  fi
19084
19085  # Call helper function which possibly converts this using DOS-style short mode.
19086  # If so, the updated path is stored in $new_path.
19087  new_path="$input_to_shortpath"
19088
19089  input_path="$input_to_shortpath"
19090  # Check if we need to convert this using DOS-style short mode. If the path
19091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19092  # take no chances and rewrite it.
19093  # Note: m4 eats our [], so we need to use [ and ] instead.
19094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19095  if test "x$has_forbidden_chars" != x; then
19096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19100      # Going to short mode and back again did indeed matter. Since short mode is
19101      # case insensitive, let's make it lowercase to improve readability.
19102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19103      # Now convert it back to Unix-style (cygpath)
19104      input_path=`$CYGPATH -u "$shortmode_path"`
19105      new_path="$input_path"
19106    fi
19107  fi
19108
19109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19110  if test "x$test_cygdrive_prefix" = x; then
19111    # As a simple fix, exclude /usr/bin since it's not a real path.
19112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19114      # a path prefixed by /cygdrive for fixpath to work.
19115      new_path="$CYGWIN_ROOT_PATH$input_path"
19116    fi
19117  fi
19118
19119  # remove trailing .exe if any
19120  new_path="${new_path/%.exe/}"
19121
19122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19123
19124  # First separate the path from the arguments. This will split at the first
19125  # space.
19126  complete="$FOUND_MAKE"
19127  path="${complete%% *}"
19128  tmp="$complete EOL"
19129  arguments="${tmp#* }"
19130
19131  # Input might be given as Windows format, start by converting to
19132  # unix format.
19133  new_path="$path"
19134
19135  windows_path="$new_path"
19136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19137    unix_path=`$CYGPATH -u "$windows_path"`
19138    new_path="$unix_path"
19139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19141    new_path="$unix_path"
19142  fi
19143
19144
19145  # Now try to locate executable using which
19146  new_path=`$WHICH "$new_path" 2> /dev/null`
19147
19148  if test "x$new_path" = x; then
19149    # Oops. Which didn't find the executable.
19150    # The splitting of arguments from the executable at a space might have been incorrect,
19151    # since paths with space are more likely in Windows. Give it another try with the whole
19152    # argument.
19153    path="$complete"
19154    arguments="EOL"
19155    new_path="$path"
19156
19157  windows_path="$new_path"
19158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19159    unix_path=`$CYGPATH -u "$windows_path"`
19160    new_path="$unix_path"
19161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19163    new_path="$unix_path"
19164  fi
19165
19166
19167    new_path=`$WHICH "$new_path" 2> /dev/null`
19168    # bat and cmd files are not always considered executable in MSYS causing which
19169    # to not find them
19170    if test "x$new_path" = x \
19171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19173      new_path="$path"
19174
19175  windows_path="$new_path"
19176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19177    unix_path=`$CYGPATH -u "$windows_path"`
19178    new_path="$unix_path"
19179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19181    new_path="$unix_path"
19182  fi
19183
19184    fi
19185
19186    if test "x$new_path" = x; then
19187      # It's still not found. Now this is an unrecoverable error.
19188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19189$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19190      has_space=`$ECHO "$complete" | $GREP " "`
19191      if test "x$has_space" != x; then
19192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19194      fi
19195      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19196    fi
19197  fi
19198
19199  # Now new_path has a complete unix path to the binary
19200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19201    # Keep paths in /bin as-is, but remove trailing .exe if any
19202    new_path="${new_path/%.exe/}"
19203    # Do not save /bin paths to all_fixpath_prefixes!
19204  else
19205    # Not in mixed or Windows style, start by that.
19206    new_path=`cmd //c echo $new_path`
19207
19208  input_path="$new_path"
19209  # Check if we need to convert this using DOS-style short mode. If the path
19210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19211  # take no chances and rewrite it.
19212  # Note: m4 eats our [], so we need to use [ and ] instead.
19213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19214  if test "x$has_forbidden_chars" != x; then
19215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19217  fi
19218
19219    # Output is in $new_path
19220
19221  windows_path="$new_path"
19222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19223    unix_path=`$CYGPATH -u "$windows_path"`
19224    new_path="$unix_path"
19225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19227    new_path="$unix_path"
19228  fi
19229
19230    # remove trailing .exe if any
19231    new_path="${new_path/%.exe/}"
19232
19233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19235  fi
19236
19237    else
19238      # We're on a unix platform. Hooray! :)
19239      # First separate the path from the arguments. This will split at the first
19240      # space.
19241      complete="$FOUND_MAKE"
19242      path="${complete%% *}"
19243      tmp="$complete EOL"
19244      arguments="${tmp#* }"
19245
19246      # Cannot rely on the command "which" here since it doesn't always work.
19247      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19248      if test -z "$is_absolute_path"; then
19249        # Path to executable is not absolute. Find it.
19250        IFS_save="$IFS"
19251        IFS=:
19252        for p in $PATH; do
19253          if test -f "$p/$path" && test -x "$p/$path"; then
19254            new_path="$p/$path"
19255            break
19256          fi
19257        done
19258        IFS="$IFS_save"
19259      else
19260        # This is an absolute path, we can use it without further modifications.
19261        new_path="$path"
19262      fi
19263
19264      if test "x$new_path" = x; then
19265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19267        has_space=`$ECHO "$complete" | $GREP " "`
19268        if test "x$has_space" != x; then
19269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19271        fi
19272        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19273      fi
19274    fi
19275
19276    # Now join together the path and the arguments once again
19277    if test "x$arguments" != xEOL; then
19278      new_complete="$new_path ${arguments% *}"
19279    else
19280      new_complete="$new_path"
19281    fi
19282
19283    if test "x$complete" != "x$new_complete"; then
19284      FOUND_MAKE="$new_complete"
19285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19286$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19287    fi
19288  fi
19289
19290        fi
19291      fi
19292    fi
19293  fi
19294
19295        fi
19296        PATH=$OLD_PATH
19297      fi
19298    fi
19299
19300    if test "x$FOUND_MAKE" = x; then
19301      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
19302    fi
19303
19304  else
19305    # The variable is set, but is it from the command line or the environment?
19306
19307    # Try to remove the string !MAKE! from our list.
19308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19310      # If it failed, the variable was not from the command line. Ignore it,
19311      # but warn the user (except for BASH, which is always set by the calling BASH).
19312      if test "xMAKE" != xBASH; then
19313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19314$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19315      fi
19316      # Try to locate tool using the code snippet
19317
19318    # Try our hardest to locate a correct version of GNU make
19319    for ac_prog in gmake
19320do
19321  # Extract the first word of "$ac_prog", so it can be a program name with args.
19322set dummy $ac_prog; ac_word=$2
19323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19324$as_echo_n "checking for $ac_word... " >&6; }
19325if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19326  $as_echo_n "(cached) " >&6
19327else
19328  case $CHECK_GMAKE in
19329  [\\/]* | ?:[\\/]*)
19330  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19331  ;;
19332  *)
19333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19334for as_dir in $PATH
19335do
19336  IFS=$as_save_IFS
19337  test -z "$as_dir" && as_dir=.
19338    for ac_exec_ext in '' $ac_executable_extensions; do
19339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19340    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19342    break 2
19343  fi
19344done
19345  done
19346IFS=$as_save_IFS
19347
19348  ;;
19349esac
19350fi
19351CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19352if test -n "$CHECK_GMAKE"; then
19353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19354$as_echo "$CHECK_GMAKE" >&6; }
19355else
19356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19357$as_echo "no" >&6; }
19358fi
19359
19360
19361  test -n "$CHECK_GMAKE" && break
19362done
19363
19364
19365  MAKE_CANDIDATE=""$CHECK_GMAKE""
19366  DESCRIPTION="gmake in PATH"
19367
19368  # On Cygwin, we require a newer version of make than on other platforms
19369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19370    MAKE_VERSION_EXPR="-e 4\."
19371    MAKE_REQUIRED_VERSION="4.0"
19372   else
19373    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19374    MAKE_REQUIRED_VERSION="3.81"
19375  fi
19376
19377  if test "x$MAKE_CANDIDATE" != x; then
19378    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19379$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19380    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19381    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19382    if test "x$IS_GNU_MAKE" = x; then
19383      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19384$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19385    else
19386      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19387      if test "x$IS_MODERN_MAKE" = x; then
19388        { $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
19389$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;}
19390      else
19391        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19392          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19393            MAKE_EXPECTED_ENV='cygwin'
19394          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19395            MAKE_EXPECTED_ENV='msys'
19396          else
19397            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19398          fi
19399          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19400          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19401        else
19402          # Not relevant for non-Windows
19403          IS_MAKE_CORRECT_ENV=true
19404        fi
19405        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19406          { $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
19407$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;}
19408        else
19409          FOUND_MAKE=$MAKE_CANDIDATE
19410
19411  # Only process if variable expands to non-empty
19412
19413  if test "x$FOUND_MAKE" != x; then
19414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19415
19416  # First separate the path from the arguments. This will split at the first
19417  # space.
19418  complete="$FOUND_MAKE"
19419  path="${complete%% *}"
19420  tmp="$complete EOL"
19421  arguments="${tmp#* }"
19422
19423  # Input might be given as Windows format, start by converting to
19424  # unix format.
19425  new_path=`$CYGPATH -u "$path"`
19426
19427  # Now try to locate executable using which
19428  new_path=`$WHICH "$new_path" 2> /dev/null`
19429  # bat and cmd files are not always considered executable in cygwin causing which
19430  # to not find them
19431  if test "x$new_path" = x \
19432      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19433      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19434    new_path=`$CYGPATH -u "$path"`
19435  fi
19436  if test "x$new_path" = x; then
19437    # Oops. Which didn't find the executable.
19438    # The splitting of arguments from the executable at a space might have been incorrect,
19439    # since paths with space are more likely in Windows. Give it another try with the whole
19440    # argument.
19441    path="$complete"
19442    arguments="EOL"
19443    new_path=`$CYGPATH -u "$path"`
19444    new_path=`$WHICH "$new_path" 2> /dev/null`
19445    # bat and cmd files are not always considered executable in cygwin causing which
19446    # to not find them
19447    if test "x$new_path" = x \
19448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19450      new_path=`$CYGPATH -u "$path"`
19451    fi
19452    if test "x$new_path" = x; then
19453      # It's still not found. Now this is an unrecoverable error.
19454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19455$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19456      has_space=`$ECHO "$complete" | $GREP " "`
19457      if test "x$has_space" != x; then
19458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19460      fi
19461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19462    fi
19463  fi
19464
19465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19468  # "foo.exe" is OK but "foo" is an error.
19469  #
19470  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19471  # It is also a way to make sure we got the proper file name for the real test later on.
19472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19473  if test "x$test_shortpath" = x; then
19474    # Short path failed, file does not exist as specified.
19475    # Try adding .exe or .cmd
19476    if test -f "${new_path}.exe"; then
19477      input_to_shortpath="${new_path}.exe"
19478    elif test -f "${new_path}.cmd"; then
19479      input_to_shortpath="${new_path}.cmd"
19480    else
19481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19482$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19483      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19484$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19485      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19486    fi
19487  else
19488    input_to_shortpath="$new_path"
19489  fi
19490
19491  # Call helper function which possibly converts this using DOS-style short mode.
19492  # If so, the updated path is stored in $new_path.
19493  new_path="$input_to_shortpath"
19494
19495  input_path="$input_to_shortpath"
19496  # Check if we need to convert this using DOS-style short mode. If the path
19497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19498  # take no chances and rewrite it.
19499  # Note: m4 eats our [], so we need to use [ and ] instead.
19500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19501  if test "x$has_forbidden_chars" != x; then
19502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19506      # Going to short mode and back again did indeed matter. Since short mode is
19507      # case insensitive, let's make it lowercase to improve readability.
19508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19509      # Now convert it back to Unix-style (cygpath)
19510      input_path=`$CYGPATH -u "$shortmode_path"`
19511      new_path="$input_path"
19512    fi
19513  fi
19514
19515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19516  if test "x$test_cygdrive_prefix" = x; then
19517    # As a simple fix, exclude /usr/bin since it's not a real path.
19518    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19520      # a path prefixed by /cygdrive for fixpath to work.
19521      new_path="$CYGWIN_ROOT_PATH$input_path"
19522    fi
19523  fi
19524
19525  # remove trailing .exe if any
19526  new_path="${new_path/%.exe/}"
19527
19528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19529
19530  # First separate the path from the arguments. This will split at the first
19531  # space.
19532  complete="$FOUND_MAKE"
19533  path="${complete%% *}"
19534  tmp="$complete EOL"
19535  arguments="${tmp#* }"
19536
19537  # Input might be given as Windows format, start by converting to
19538  # unix format.
19539  new_path="$path"
19540
19541  windows_path="$new_path"
19542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19543    unix_path=`$CYGPATH -u "$windows_path"`
19544    new_path="$unix_path"
19545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19547    new_path="$unix_path"
19548  fi
19549
19550
19551  # Now try to locate executable using which
19552  new_path=`$WHICH "$new_path" 2> /dev/null`
19553
19554  if test "x$new_path" = x; then
19555    # Oops. Which didn't find the executable.
19556    # The splitting of arguments from the executable at a space might have been incorrect,
19557    # since paths with space are more likely in Windows. Give it another try with the whole
19558    # argument.
19559    path="$complete"
19560    arguments="EOL"
19561    new_path="$path"
19562
19563  windows_path="$new_path"
19564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19565    unix_path=`$CYGPATH -u "$windows_path"`
19566    new_path="$unix_path"
19567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19569    new_path="$unix_path"
19570  fi
19571
19572
19573    new_path=`$WHICH "$new_path" 2> /dev/null`
19574    # bat and cmd files are not always considered executable in MSYS causing which
19575    # to not find them
19576    if test "x$new_path" = x \
19577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19579      new_path="$path"
19580
19581  windows_path="$new_path"
19582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19583    unix_path=`$CYGPATH -u "$windows_path"`
19584    new_path="$unix_path"
19585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19587    new_path="$unix_path"
19588  fi
19589
19590    fi
19591
19592    if test "x$new_path" = x; then
19593      # It's still not found. Now this is an unrecoverable error.
19594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19596      has_space=`$ECHO "$complete" | $GREP " "`
19597      if test "x$has_space" != x; then
19598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19600      fi
19601      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19602    fi
19603  fi
19604
19605  # Now new_path has a complete unix path to the binary
19606  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19607    # Keep paths in /bin as-is, but remove trailing .exe if any
19608    new_path="${new_path/%.exe/}"
19609    # Do not save /bin paths to all_fixpath_prefixes!
19610  else
19611    # Not in mixed or Windows style, start by that.
19612    new_path=`cmd //c echo $new_path`
19613
19614  input_path="$new_path"
19615  # Check if we need to convert this using DOS-style short mode. If the path
19616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19617  # take no chances and rewrite it.
19618  # Note: m4 eats our [], so we need to use [ and ] instead.
19619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19620  if test "x$has_forbidden_chars" != x; then
19621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19623  fi
19624
19625    # Output is in $new_path
19626
19627  windows_path="$new_path"
19628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19629    unix_path=`$CYGPATH -u "$windows_path"`
19630    new_path="$unix_path"
19631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19633    new_path="$unix_path"
19634  fi
19635
19636    # remove trailing .exe if any
19637    new_path="${new_path/%.exe/}"
19638
19639    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19640    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19641  fi
19642
19643    else
19644      # We're on a unix platform. Hooray! :)
19645      # First separate the path from the arguments. This will split at the first
19646      # space.
19647      complete="$FOUND_MAKE"
19648      path="${complete%% *}"
19649      tmp="$complete EOL"
19650      arguments="${tmp#* }"
19651
19652      # Cannot rely on the command "which" here since it doesn't always work.
19653      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19654      if test -z "$is_absolute_path"; then
19655        # Path to executable is not absolute. Find it.
19656        IFS_save="$IFS"
19657        IFS=:
19658        for p in $PATH; do
19659          if test -f "$p/$path" && test -x "$p/$path"; then
19660            new_path="$p/$path"
19661            break
19662          fi
19663        done
19664        IFS="$IFS_save"
19665      else
19666        # This is an absolute path, we can use it without further modifications.
19667        new_path="$path"
19668      fi
19669
19670      if test "x$new_path" = x; then
19671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19673        has_space=`$ECHO "$complete" | $GREP " "`
19674        if test "x$has_space" != x; then
19675          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19676$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19677        fi
19678        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19679      fi
19680    fi
19681
19682    # Now join together the path and the arguments once again
19683    if test "x$arguments" != xEOL; then
19684      new_complete="$new_path ${arguments% *}"
19685    else
19686      new_complete="$new_path"
19687    fi
19688
19689    if test "x$complete" != "x$new_complete"; then
19690      FOUND_MAKE="$new_complete"
19691      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19692$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19693    fi
19694  fi
19695
19696        fi
19697      fi
19698    fi
19699  fi
19700
19701
19702    if test "x$FOUND_MAKE" = x; then
19703      for ac_prog in make
19704do
19705  # Extract the first word of "$ac_prog", so it can be a program name with args.
19706set dummy $ac_prog; ac_word=$2
19707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19708$as_echo_n "checking for $ac_word... " >&6; }
19709if ${ac_cv_path_CHECK_MAKE+:} false; then :
19710  $as_echo_n "(cached) " >&6
19711else
19712  case $CHECK_MAKE in
19713  [\\/]* | ?:[\\/]*)
19714  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19715  ;;
19716  *)
19717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19718for as_dir in $PATH
19719do
19720  IFS=$as_save_IFS
19721  test -z "$as_dir" && as_dir=.
19722    for ac_exec_ext in '' $ac_executable_extensions; do
19723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19724    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19726    break 2
19727  fi
19728done
19729  done
19730IFS=$as_save_IFS
19731
19732  ;;
19733esac
19734fi
19735CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19736if test -n "$CHECK_MAKE"; then
19737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19738$as_echo "$CHECK_MAKE" >&6; }
19739else
19740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19741$as_echo "no" >&6; }
19742fi
19743
19744
19745  test -n "$CHECK_MAKE" && break
19746done
19747
19748
19749  MAKE_CANDIDATE=""$CHECK_MAKE""
19750  DESCRIPTION="make in PATH"
19751
19752  # On Cygwin, we require a newer version of make than on other platforms
19753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19754    MAKE_VERSION_EXPR="-e 4\."
19755    MAKE_REQUIRED_VERSION="4.0"
19756   else
19757    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19758    MAKE_REQUIRED_VERSION="3.81"
19759  fi
19760
19761  if test "x$MAKE_CANDIDATE" != x; then
19762    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19763$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19764    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19765    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19766    if test "x$IS_GNU_MAKE" = x; then
19767      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19768$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19769    else
19770      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19771      if test "x$IS_MODERN_MAKE" = x; then
19772        { $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
19773$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;}
19774      else
19775        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19776          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19777            MAKE_EXPECTED_ENV='cygwin'
19778          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19779            MAKE_EXPECTED_ENV='msys'
19780          else
19781            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19782          fi
19783          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19784          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19785        else
19786          # Not relevant for non-Windows
19787          IS_MAKE_CORRECT_ENV=true
19788        fi
19789        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19790          { $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
19791$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;}
19792        else
19793          FOUND_MAKE=$MAKE_CANDIDATE
19794
19795  # Only process if variable expands to non-empty
19796
19797  if test "x$FOUND_MAKE" != x; then
19798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19799
19800  # First separate the path from the arguments. This will split at the first
19801  # space.
19802  complete="$FOUND_MAKE"
19803  path="${complete%% *}"
19804  tmp="$complete EOL"
19805  arguments="${tmp#* }"
19806
19807  # Input might be given as Windows format, start by converting to
19808  # unix format.
19809  new_path=`$CYGPATH -u "$path"`
19810
19811  # Now try to locate executable using which
19812  new_path=`$WHICH "$new_path" 2> /dev/null`
19813  # bat and cmd files are not always considered executable in cygwin causing which
19814  # to not find them
19815  if test "x$new_path" = x \
19816      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19817      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19818    new_path=`$CYGPATH -u "$path"`
19819  fi
19820  if test "x$new_path" = x; then
19821    # Oops. Which didn't find the executable.
19822    # The splitting of arguments from the executable at a space might have been incorrect,
19823    # since paths with space are more likely in Windows. Give it another try with the whole
19824    # argument.
19825    path="$complete"
19826    arguments="EOL"
19827    new_path=`$CYGPATH -u "$path"`
19828    new_path=`$WHICH "$new_path" 2> /dev/null`
19829    # bat and cmd files are not always considered executable in cygwin causing which
19830    # to not find them
19831    if test "x$new_path" = x \
19832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19834      new_path=`$CYGPATH -u "$path"`
19835    fi
19836    if test "x$new_path" = x; then
19837      # It's still not found. Now this is an unrecoverable error.
19838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19839$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19840      has_space=`$ECHO "$complete" | $GREP " "`
19841      if test "x$has_space" != x; then
19842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19844      fi
19845      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19846    fi
19847  fi
19848
19849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19852  # "foo.exe" is OK but "foo" is an error.
19853  #
19854  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19855  # It is also a way to make sure we got the proper file name for the real test later on.
19856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19857  if test "x$test_shortpath" = x; then
19858    # Short path failed, file does not exist as specified.
19859    # Try adding .exe or .cmd
19860    if test -f "${new_path}.exe"; then
19861      input_to_shortpath="${new_path}.exe"
19862    elif test -f "${new_path}.cmd"; then
19863      input_to_shortpath="${new_path}.cmd"
19864    else
19865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19869      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19870    fi
19871  else
19872    input_to_shortpath="$new_path"
19873  fi
19874
19875  # Call helper function which possibly converts this using DOS-style short mode.
19876  # If so, the updated path is stored in $new_path.
19877  new_path="$input_to_shortpath"
19878
19879  input_path="$input_to_shortpath"
19880  # Check if we need to convert this using DOS-style short mode. If the path
19881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19882  # take no chances and rewrite it.
19883  # Note: m4 eats our [], so we need to use [ and ] instead.
19884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19885  if test "x$has_forbidden_chars" != x; then
19886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19890      # Going to short mode and back again did indeed matter. Since short mode is
19891      # case insensitive, let's make it lowercase to improve readability.
19892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19893      # Now convert it back to Unix-style (cygpath)
19894      input_path=`$CYGPATH -u "$shortmode_path"`
19895      new_path="$input_path"
19896    fi
19897  fi
19898
19899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19900  if test "x$test_cygdrive_prefix" = x; then
19901    # As a simple fix, exclude /usr/bin since it's not a real path.
19902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19904      # a path prefixed by /cygdrive for fixpath to work.
19905      new_path="$CYGWIN_ROOT_PATH$input_path"
19906    fi
19907  fi
19908
19909  # remove trailing .exe if any
19910  new_path="${new_path/%.exe/}"
19911
19912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19913
19914  # First separate the path from the arguments. This will split at the first
19915  # space.
19916  complete="$FOUND_MAKE"
19917  path="${complete%% *}"
19918  tmp="$complete EOL"
19919  arguments="${tmp#* }"
19920
19921  # Input might be given as Windows format, start by converting to
19922  # unix format.
19923  new_path="$path"
19924
19925  windows_path="$new_path"
19926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19927    unix_path=`$CYGPATH -u "$windows_path"`
19928    new_path="$unix_path"
19929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19931    new_path="$unix_path"
19932  fi
19933
19934
19935  # Now try to locate executable using which
19936  new_path=`$WHICH "$new_path" 2> /dev/null`
19937
19938  if test "x$new_path" = x; then
19939    # Oops. Which didn't find the executable.
19940    # The splitting of arguments from the executable at a space might have been incorrect,
19941    # since paths with space are more likely in Windows. Give it another try with the whole
19942    # argument.
19943    path="$complete"
19944    arguments="EOL"
19945    new_path="$path"
19946
19947  windows_path="$new_path"
19948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19949    unix_path=`$CYGPATH -u "$windows_path"`
19950    new_path="$unix_path"
19951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19953    new_path="$unix_path"
19954  fi
19955
19956
19957    new_path=`$WHICH "$new_path" 2> /dev/null`
19958    # bat and cmd files are not always considered executable in MSYS causing which
19959    # to not find them
19960    if test "x$new_path" = x \
19961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19963      new_path="$path"
19964
19965  windows_path="$new_path"
19966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19967    unix_path=`$CYGPATH -u "$windows_path"`
19968    new_path="$unix_path"
19969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19971    new_path="$unix_path"
19972  fi
19973
19974    fi
19975
19976    if test "x$new_path" = x; then
19977      # It's still not found. Now this is an unrecoverable error.
19978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19979$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19980      has_space=`$ECHO "$complete" | $GREP " "`
19981      if test "x$has_space" != x; then
19982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19984      fi
19985      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19986    fi
19987  fi
19988
19989  # Now new_path has a complete unix path to the binary
19990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19991    # Keep paths in /bin as-is, but remove trailing .exe if any
19992    new_path="${new_path/%.exe/}"
19993    # Do not save /bin paths to all_fixpath_prefixes!
19994  else
19995    # Not in mixed or Windows style, start by that.
19996    new_path=`cmd //c echo $new_path`
19997
19998  input_path="$new_path"
19999  # Check if we need to convert this using DOS-style short mode. If the path
20000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20001  # take no chances and rewrite it.
20002  # Note: m4 eats our [], so we need to use [ and ] instead.
20003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20004  if test "x$has_forbidden_chars" != x; then
20005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20007  fi
20008
20009    # Output is in $new_path
20010
20011  windows_path="$new_path"
20012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20013    unix_path=`$CYGPATH -u "$windows_path"`
20014    new_path="$unix_path"
20015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20017    new_path="$unix_path"
20018  fi
20019
20020    # remove trailing .exe if any
20021    new_path="${new_path/%.exe/}"
20022
20023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20025  fi
20026
20027    else
20028      # We're on a unix platform. Hooray! :)
20029      # First separate the path from the arguments. This will split at the first
20030      # space.
20031      complete="$FOUND_MAKE"
20032      path="${complete%% *}"
20033      tmp="$complete EOL"
20034      arguments="${tmp#* }"
20035
20036      # Cannot rely on the command "which" here since it doesn't always work.
20037      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20038      if test -z "$is_absolute_path"; then
20039        # Path to executable is not absolute. Find it.
20040        IFS_save="$IFS"
20041        IFS=:
20042        for p in $PATH; do
20043          if test -f "$p/$path" && test -x "$p/$path"; then
20044            new_path="$p/$path"
20045            break
20046          fi
20047        done
20048        IFS="$IFS_save"
20049      else
20050        # This is an absolute path, we can use it without further modifications.
20051        new_path="$path"
20052      fi
20053
20054      if test "x$new_path" = x; then
20055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20057        has_space=`$ECHO "$complete" | $GREP " "`
20058        if test "x$has_space" != x; then
20059          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20061        fi
20062        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20063      fi
20064    fi
20065
20066    # Now join together the path and the arguments once again
20067    if test "x$arguments" != xEOL; then
20068      new_complete="$new_path ${arguments% *}"
20069    else
20070      new_complete="$new_path"
20071    fi
20072
20073    if test "x$complete" != "x$new_complete"; then
20074      FOUND_MAKE="$new_complete"
20075      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20076$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20077    fi
20078  fi
20079
20080        fi
20081      fi
20082    fi
20083  fi
20084
20085    fi
20086
20087    if test "x$FOUND_MAKE" = x; then
20088      if test "x$TOOLCHAIN_PATH" != x; then
20089        # We have a toolchain path, check that as well before giving up.
20090        OLD_PATH=$PATH
20091        PATH=$TOOLCHAIN_PATH:$PATH
20092        for ac_prog in gmake
20093do
20094  # Extract the first word of "$ac_prog", so it can be a program name with args.
20095set dummy $ac_prog; ac_word=$2
20096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20097$as_echo_n "checking for $ac_word... " >&6; }
20098if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20099  $as_echo_n "(cached) " >&6
20100else
20101  case $CHECK_TOOLSDIR_GMAKE in
20102  [\\/]* | ?:[\\/]*)
20103  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20104  ;;
20105  *)
20106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20107for as_dir in $PATH
20108do
20109  IFS=$as_save_IFS
20110  test -z "$as_dir" && as_dir=.
20111    for ac_exec_ext in '' $ac_executable_extensions; do
20112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20113    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20115    break 2
20116  fi
20117done
20118  done
20119IFS=$as_save_IFS
20120
20121  ;;
20122esac
20123fi
20124CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20125if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20127$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20128else
20129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20130$as_echo "no" >&6; }
20131fi
20132
20133
20134  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20135done
20136
20137
20138  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20139  DESCRIPTION="gmake in tools-dir"
20140
20141  # On Cygwin, we require a newer version of make than on other platforms
20142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20143    MAKE_VERSION_EXPR="-e 4\."
20144    MAKE_REQUIRED_VERSION="4.0"
20145   else
20146    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20147    MAKE_REQUIRED_VERSION="3.81"
20148  fi
20149
20150  if test "x$MAKE_CANDIDATE" != x; then
20151    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20152$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20153    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20154    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20155    if test "x$IS_GNU_MAKE" = x; then
20156      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20157$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20158    else
20159      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20160      if test "x$IS_MODERN_MAKE" = x; then
20161        { $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
20162$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;}
20163      else
20164        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20165          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20166            MAKE_EXPECTED_ENV='cygwin'
20167          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168            MAKE_EXPECTED_ENV='msys'
20169          else
20170            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20171          fi
20172          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20173          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20174        else
20175          # Not relevant for non-Windows
20176          IS_MAKE_CORRECT_ENV=true
20177        fi
20178        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20179          { $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
20180$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;}
20181        else
20182          FOUND_MAKE=$MAKE_CANDIDATE
20183
20184  # Only process if variable expands to non-empty
20185
20186  if test "x$FOUND_MAKE" != x; then
20187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20188
20189  # First separate the path from the arguments. This will split at the first
20190  # space.
20191  complete="$FOUND_MAKE"
20192  path="${complete%% *}"
20193  tmp="$complete EOL"
20194  arguments="${tmp#* }"
20195
20196  # Input might be given as Windows format, start by converting to
20197  # unix format.
20198  new_path=`$CYGPATH -u "$path"`
20199
20200  # Now try to locate executable using which
20201  new_path=`$WHICH "$new_path" 2> /dev/null`
20202  # bat and cmd files are not always considered executable in cygwin causing which
20203  # to not find them
20204  if test "x$new_path" = x \
20205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20207    new_path=`$CYGPATH -u "$path"`
20208  fi
20209  if test "x$new_path" = x; then
20210    # Oops. Which didn't find the executable.
20211    # The splitting of arguments from the executable at a space might have been incorrect,
20212    # since paths with space are more likely in Windows. Give it another try with the whole
20213    # argument.
20214    path="$complete"
20215    arguments="EOL"
20216    new_path=`$CYGPATH -u "$path"`
20217    new_path=`$WHICH "$new_path" 2> /dev/null`
20218    # bat and cmd files are not always considered executable in cygwin causing which
20219    # to not find them
20220    if test "x$new_path" = x \
20221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20223      new_path=`$CYGPATH -u "$path"`
20224    fi
20225    if test "x$new_path" = x; then
20226      # It's still not found. Now this is an unrecoverable error.
20227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20228$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20229      has_space=`$ECHO "$complete" | $GREP " "`
20230      if test "x$has_space" != x; then
20231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20233      fi
20234      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20235    fi
20236  fi
20237
20238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20241  # "foo.exe" is OK but "foo" is an error.
20242  #
20243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20244  # It is also a way to make sure we got the proper file name for the real test later on.
20245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20246  if test "x$test_shortpath" = x; then
20247    # Short path failed, file does not exist as specified.
20248    # Try adding .exe or .cmd
20249    if test -f "${new_path}.exe"; then
20250      input_to_shortpath="${new_path}.exe"
20251    elif test -f "${new_path}.cmd"; then
20252      input_to_shortpath="${new_path}.cmd"
20253    else
20254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20255$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20258      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20259    fi
20260  else
20261    input_to_shortpath="$new_path"
20262  fi
20263
20264  # Call helper function which possibly converts this using DOS-style short mode.
20265  # If so, the updated path is stored in $new_path.
20266  new_path="$input_to_shortpath"
20267
20268  input_path="$input_to_shortpath"
20269  # Check if we need to convert this using DOS-style short mode. If the path
20270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20271  # take no chances and rewrite it.
20272  # Note: m4 eats our [], so we need to use [ and ] instead.
20273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20274  if test "x$has_forbidden_chars" != x; then
20275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20279      # Going to short mode and back again did indeed matter. Since short mode is
20280      # case insensitive, let's make it lowercase to improve readability.
20281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20282      # Now convert it back to Unix-style (cygpath)
20283      input_path=`$CYGPATH -u "$shortmode_path"`
20284      new_path="$input_path"
20285    fi
20286  fi
20287
20288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20289  if test "x$test_cygdrive_prefix" = x; then
20290    # As a simple fix, exclude /usr/bin since it's not a real path.
20291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20293      # a path prefixed by /cygdrive for fixpath to work.
20294      new_path="$CYGWIN_ROOT_PATH$input_path"
20295    fi
20296  fi
20297
20298  # remove trailing .exe if any
20299  new_path="${new_path/%.exe/}"
20300
20301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20302
20303  # First separate the path from the arguments. This will split at the first
20304  # space.
20305  complete="$FOUND_MAKE"
20306  path="${complete%% *}"
20307  tmp="$complete EOL"
20308  arguments="${tmp#* }"
20309
20310  # Input might be given as Windows format, start by converting to
20311  # unix format.
20312  new_path="$path"
20313
20314  windows_path="$new_path"
20315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316    unix_path=`$CYGPATH -u "$windows_path"`
20317    new_path="$unix_path"
20318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20320    new_path="$unix_path"
20321  fi
20322
20323
20324  # Now try to locate executable using which
20325  new_path=`$WHICH "$new_path" 2> /dev/null`
20326
20327  if test "x$new_path" = x; then
20328    # Oops. Which didn't find the executable.
20329    # The splitting of arguments from the executable at a space might have been incorrect,
20330    # since paths with space are more likely in Windows. Give it another try with the whole
20331    # argument.
20332    path="$complete"
20333    arguments="EOL"
20334    new_path="$path"
20335
20336  windows_path="$new_path"
20337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338    unix_path=`$CYGPATH -u "$windows_path"`
20339    new_path="$unix_path"
20340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20342    new_path="$unix_path"
20343  fi
20344
20345
20346    new_path=`$WHICH "$new_path" 2> /dev/null`
20347    # bat and cmd files are not always considered executable in MSYS causing which
20348    # to not find them
20349    if test "x$new_path" = x \
20350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20352      new_path="$path"
20353
20354  windows_path="$new_path"
20355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20356    unix_path=`$CYGPATH -u "$windows_path"`
20357    new_path="$unix_path"
20358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20360    new_path="$unix_path"
20361  fi
20362
20363    fi
20364
20365    if test "x$new_path" = x; then
20366      # It's still not found. Now this is an unrecoverable error.
20367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20369      has_space=`$ECHO "$complete" | $GREP " "`
20370      if test "x$has_space" != x; then
20371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20373      fi
20374      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20375    fi
20376  fi
20377
20378  # Now new_path has a complete unix path to the binary
20379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20380    # Keep paths in /bin as-is, but remove trailing .exe if any
20381    new_path="${new_path/%.exe/}"
20382    # Do not save /bin paths to all_fixpath_prefixes!
20383  else
20384    # Not in mixed or Windows style, start by that.
20385    new_path=`cmd //c echo $new_path`
20386
20387  input_path="$new_path"
20388  # Check if we need to convert this using DOS-style short mode. If the path
20389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20390  # take no chances and rewrite it.
20391  # Note: m4 eats our [], so we need to use [ and ] instead.
20392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20393  if test "x$has_forbidden_chars" != x; then
20394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20396  fi
20397
20398    # Output is in $new_path
20399
20400  windows_path="$new_path"
20401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20402    unix_path=`$CYGPATH -u "$windows_path"`
20403    new_path="$unix_path"
20404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20406    new_path="$unix_path"
20407  fi
20408
20409    # remove trailing .exe if any
20410    new_path="${new_path/%.exe/}"
20411
20412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20414  fi
20415
20416    else
20417      # We're on a unix platform. Hooray! :)
20418      # First separate the path from the arguments. This will split at the first
20419      # space.
20420      complete="$FOUND_MAKE"
20421      path="${complete%% *}"
20422      tmp="$complete EOL"
20423      arguments="${tmp#* }"
20424
20425      # Cannot rely on the command "which" here since it doesn't always work.
20426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20427      if test -z "$is_absolute_path"; then
20428        # Path to executable is not absolute. Find it.
20429        IFS_save="$IFS"
20430        IFS=:
20431        for p in $PATH; do
20432          if test -f "$p/$path" && test -x "$p/$path"; then
20433            new_path="$p/$path"
20434            break
20435          fi
20436        done
20437        IFS="$IFS_save"
20438      else
20439        # This is an absolute path, we can use it without further modifications.
20440        new_path="$path"
20441      fi
20442
20443      if test "x$new_path" = x; then
20444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20445$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20446        has_space=`$ECHO "$complete" | $GREP " "`
20447        if test "x$has_space" != x; then
20448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20450        fi
20451        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20452      fi
20453    fi
20454
20455    # Now join together the path and the arguments once again
20456    if test "x$arguments" != xEOL; then
20457      new_complete="$new_path ${arguments% *}"
20458    else
20459      new_complete="$new_path"
20460    fi
20461
20462    if test "x$complete" != "x$new_complete"; then
20463      FOUND_MAKE="$new_complete"
20464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20465$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20466    fi
20467  fi
20468
20469        fi
20470      fi
20471    fi
20472  fi
20473
20474        if test "x$FOUND_MAKE" = x; then
20475          for ac_prog in make
20476do
20477  # Extract the first word of "$ac_prog", so it can be a program name with args.
20478set dummy $ac_prog; ac_word=$2
20479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20480$as_echo_n "checking for $ac_word... " >&6; }
20481if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20482  $as_echo_n "(cached) " >&6
20483else
20484  case $CHECK_TOOLSDIR_MAKE in
20485  [\\/]* | ?:[\\/]*)
20486  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20487  ;;
20488  *)
20489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20490for as_dir in $PATH
20491do
20492  IFS=$as_save_IFS
20493  test -z "$as_dir" && as_dir=.
20494    for ac_exec_ext in '' $ac_executable_extensions; do
20495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20496    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20498    break 2
20499  fi
20500done
20501  done
20502IFS=$as_save_IFS
20503
20504  ;;
20505esac
20506fi
20507CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20508if test -n "$CHECK_TOOLSDIR_MAKE"; then
20509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20510$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20511else
20512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20513$as_echo "no" >&6; }
20514fi
20515
20516
20517  test -n "$CHECK_TOOLSDIR_MAKE" && break
20518done
20519
20520
20521  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20522  DESCRIPTION="make in tools-dir"
20523
20524  # On Cygwin, we require a newer version of make than on other platforms
20525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20526    MAKE_VERSION_EXPR="-e 4\."
20527    MAKE_REQUIRED_VERSION="4.0"
20528   else
20529    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20530    MAKE_REQUIRED_VERSION="3.81"
20531  fi
20532
20533  if test "x$MAKE_CANDIDATE" != x; then
20534    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20535$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20536    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20537    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20538    if test "x$IS_GNU_MAKE" = x; then
20539      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20540$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20541    else
20542      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20543      if test "x$IS_MODERN_MAKE" = x; then
20544        { $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
20545$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;}
20546      else
20547        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20548          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20549            MAKE_EXPECTED_ENV='cygwin'
20550          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20551            MAKE_EXPECTED_ENV='msys'
20552          else
20553            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20554          fi
20555          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20556          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20557        else
20558          # Not relevant for non-Windows
20559          IS_MAKE_CORRECT_ENV=true
20560        fi
20561        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20562          { $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
20563$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;}
20564        else
20565          FOUND_MAKE=$MAKE_CANDIDATE
20566
20567  # Only process if variable expands to non-empty
20568
20569  if test "x$FOUND_MAKE" != x; then
20570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20571
20572  # First separate the path from the arguments. This will split at the first
20573  # space.
20574  complete="$FOUND_MAKE"
20575  path="${complete%% *}"
20576  tmp="$complete EOL"
20577  arguments="${tmp#* }"
20578
20579  # Input might be given as Windows format, start by converting to
20580  # unix format.
20581  new_path=`$CYGPATH -u "$path"`
20582
20583  # Now try to locate executable using which
20584  new_path=`$WHICH "$new_path" 2> /dev/null`
20585  # bat and cmd files are not always considered executable in cygwin causing which
20586  # to not find them
20587  if test "x$new_path" = x \
20588      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20589      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20590    new_path=`$CYGPATH -u "$path"`
20591  fi
20592  if test "x$new_path" = x; then
20593    # Oops. Which didn't find the executable.
20594    # The splitting of arguments from the executable at a space might have been incorrect,
20595    # since paths with space are more likely in Windows. Give it another try with the whole
20596    # argument.
20597    path="$complete"
20598    arguments="EOL"
20599    new_path=`$CYGPATH -u "$path"`
20600    new_path=`$WHICH "$new_path" 2> /dev/null`
20601    # bat and cmd files are not always considered executable in cygwin causing which
20602    # to not find them
20603    if test "x$new_path" = x \
20604        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20605        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20606      new_path=`$CYGPATH -u "$path"`
20607    fi
20608    if test "x$new_path" = x; then
20609      # It's still not found. Now this is an unrecoverable error.
20610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20612      has_space=`$ECHO "$complete" | $GREP " "`
20613      if test "x$has_space" != x; then
20614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20616      fi
20617      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20618    fi
20619  fi
20620
20621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20624  # "foo.exe" is OK but "foo" is an error.
20625  #
20626  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20627  # It is also a way to make sure we got the proper file name for the real test later on.
20628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20629  if test "x$test_shortpath" = x; then
20630    # Short path failed, file does not exist as specified.
20631    # Try adding .exe or .cmd
20632    if test -f "${new_path}.exe"; then
20633      input_to_shortpath="${new_path}.exe"
20634    elif test -f "${new_path}.cmd"; then
20635      input_to_shortpath="${new_path}.cmd"
20636    else
20637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20639      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20640$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20641      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20642    fi
20643  else
20644    input_to_shortpath="$new_path"
20645  fi
20646
20647  # Call helper function which possibly converts this using DOS-style short mode.
20648  # If so, the updated path is stored in $new_path.
20649  new_path="$input_to_shortpath"
20650
20651  input_path="$input_to_shortpath"
20652  # Check if we need to convert this using DOS-style short mode. If the path
20653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20654  # take no chances and rewrite it.
20655  # Note: m4 eats our [], so we need to use [ and ] instead.
20656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20657  if test "x$has_forbidden_chars" != x; then
20658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20662      # Going to short mode and back again did indeed matter. Since short mode is
20663      # case insensitive, let's make it lowercase to improve readability.
20664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20665      # Now convert it back to Unix-style (cygpath)
20666      input_path=`$CYGPATH -u "$shortmode_path"`
20667      new_path="$input_path"
20668    fi
20669  fi
20670
20671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20672  if test "x$test_cygdrive_prefix" = x; then
20673    # As a simple fix, exclude /usr/bin since it's not a real path.
20674    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20676      # a path prefixed by /cygdrive for fixpath to work.
20677      new_path="$CYGWIN_ROOT_PATH$input_path"
20678    fi
20679  fi
20680
20681  # remove trailing .exe if any
20682  new_path="${new_path/%.exe/}"
20683
20684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20685
20686  # First separate the path from the arguments. This will split at the first
20687  # space.
20688  complete="$FOUND_MAKE"
20689  path="${complete%% *}"
20690  tmp="$complete EOL"
20691  arguments="${tmp#* }"
20692
20693  # Input might be given as Windows format, start by converting to
20694  # unix format.
20695  new_path="$path"
20696
20697  windows_path="$new_path"
20698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20699    unix_path=`$CYGPATH -u "$windows_path"`
20700    new_path="$unix_path"
20701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20703    new_path="$unix_path"
20704  fi
20705
20706
20707  # Now try to locate executable using which
20708  new_path=`$WHICH "$new_path" 2> /dev/null`
20709
20710  if test "x$new_path" = x; then
20711    # Oops. Which didn't find the executable.
20712    # The splitting of arguments from the executable at a space might have been incorrect,
20713    # since paths with space are more likely in Windows. Give it another try with the whole
20714    # argument.
20715    path="$complete"
20716    arguments="EOL"
20717    new_path="$path"
20718
20719  windows_path="$new_path"
20720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20721    unix_path=`$CYGPATH -u "$windows_path"`
20722    new_path="$unix_path"
20723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20725    new_path="$unix_path"
20726  fi
20727
20728
20729    new_path=`$WHICH "$new_path" 2> /dev/null`
20730    # bat and cmd files are not always considered executable in MSYS causing which
20731    # to not find them
20732    if test "x$new_path" = x \
20733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20735      new_path="$path"
20736
20737  windows_path="$new_path"
20738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739    unix_path=`$CYGPATH -u "$windows_path"`
20740    new_path="$unix_path"
20741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20743    new_path="$unix_path"
20744  fi
20745
20746    fi
20747
20748    if test "x$new_path" = x; then
20749      # It's still not found. Now this is an unrecoverable error.
20750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20752      has_space=`$ECHO "$complete" | $GREP " "`
20753      if test "x$has_space" != x; then
20754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20756      fi
20757      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20758    fi
20759  fi
20760
20761  # Now new_path has a complete unix path to the binary
20762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20763    # Keep paths in /bin as-is, but remove trailing .exe if any
20764    new_path="${new_path/%.exe/}"
20765    # Do not save /bin paths to all_fixpath_prefixes!
20766  else
20767    # Not in mixed or Windows style, start by that.
20768    new_path=`cmd //c echo $new_path`
20769
20770  input_path="$new_path"
20771  # Check if we need to convert this using DOS-style short mode. If the path
20772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20773  # take no chances and rewrite it.
20774  # Note: m4 eats our [], so we need to use [ and ] instead.
20775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20776  if test "x$has_forbidden_chars" != x; then
20777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20779  fi
20780
20781    # Output is in $new_path
20782
20783  windows_path="$new_path"
20784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20785    unix_path=`$CYGPATH -u "$windows_path"`
20786    new_path="$unix_path"
20787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20789    new_path="$unix_path"
20790  fi
20791
20792    # remove trailing .exe if any
20793    new_path="${new_path/%.exe/}"
20794
20795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20797  fi
20798
20799    else
20800      # We're on a unix platform. Hooray! :)
20801      # First separate the path from the arguments. This will split at the first
20802      # space.
20803      complete="$FOUND_MAKE"
20804      path="${complete%% *}"
20805      tmp="$complete EOL"
20806      arguments="${tmp#* }"
20807
20808      # Cannot rely on the command "which" here since it doesn't always work.
20809      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20810      if test -z "$is_absolute_path"; then
20811        # Path to executable is not absolute. Find it.
20812        IFS_save="$IFS"
20813        IFS=:
20814        for p in $PATH; do
20815          if test -f "$p/$path" && test -x "$p/$path"; then
20816            new_path="$p/$path"
20817            break
20818          fi
20819        done
20820        IFS="$IFS_save"
20821      else
20822        # This is an absolute path, we can use it without further modifications.
20823        new_path="$path"
20824      fi
20825
20826      if test "x$new_path" = x; then
20827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20829        has_space=`$ECHO "$complete" | $GREP " "`
20830        if test "x$has_space" != x; then
20831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20833        fi
20834        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20835      fi
20836    fi
20837
20838    # Now join together the path and the arguments once again
20839    if test "x$arguments" != xEOL; then
20840      new_complete="$new_path ${arguments% *}"
20841    else
20842      new_complete="$new_path"
20843    fi
20844
20845    if test "x$complete" != "x$new_complete"; then
20846      FOUND_MAKE="$new_complete"
20847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20848$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20849    fi
20850  fi
20851
20852        fi
20853      fi
20854    fi
20855  fi
20856
20857        fi
20858        PATH=$OLD_PATH
20859      fi
20860    fi
20861
20862    if test "x$FOUND_MAKE" = x; then
20863      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
20864    fi
20865
20866    else
20867      # If it succeeded, then it was overridden by the user. We will use it
20868      # for the tool.
20869
20870      # First remove it from the list of overridden variables, so we can test
20871      # for unknown variables in the end.
20872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20873
20874      # Check if we try to supply an empty value
20875      if test "x$MAKE" = x; then
20876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20877$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20879$as_echo_n "checking for MAKE... " >&6; }
20880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20881$as_echo "disabled" >&6; }
20882      else
20883        # Check if the provided tool contains a complete path.
20884        tool_specified="$MAKE"
20885        tool_basename="${tool_specified##*/}"
20886        if test "x$tool_basename" = "x$tool_specified"; then
20887          # A command without a complete path is provided, search $PATH.
20888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20889$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20890          # Extract the first word of "$tool_basename", so it can be a program name with args.
20891set dummy $tool_basename; ac_word=$2
20892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20893$as_echo_n "checking for $ac_word... " >&6; }
20894if ${ac_cv_path_MAKE+:} false; then :
20895  $as_echo_n "(cached) " >&6
20896else
20897  case $MAKE in
20898  [\\/]* | ?:[\\/]*)
20899  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20900  ;;
20901  *)
20902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20903for as_dir in $PATH
20904do
20905  IFS=$as_save_IFS
20906  test -z "$as_dir" && as_dir=.
20907    for ac_exec_ext in '' $ac_executable_extensions; do
20908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20909    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20911    break 2
20912  fi
20913done
20914  done
20915IFS=$as_save_IFS
20916
20917  ;;
20918esac
20919fi
20920MAKE=$ac_cv_path_MAKE
20921if test -n "$MAKE"; then
20922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20923$as_echo "$MAKE" >&6; }
20924else
20925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20926$as_echo "no" >&6; }
20927fi
20928
20929
20930          if test "x$MAKE" = x; then
20931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20932          fi
20933        else
20934          # Otherwise we believe it is a complete path. Use it as it is.
20935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20936$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20938$as_echo_n "checking for MAKE... " >&6; }
20939          if test ! -x "$tool_specified"; then
20940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20941$as_echo "not found" >&6; }
20942            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20943          fi
20944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20945$as_echo "$tool_specified" >&6; }
20946        fi
20947      fi
20948    fi
20949
20950    # If MAKE was set by user, verify the version
20951
20952  MAKE_CANDIDATE=""$MAKE""
20953  DESCRIPTION="user supplied MAKE=$MAKE"
20954
20955  # On Cygwin, we require a newer version of make than on other platforms
20956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20957    MAKE_VERSION_EXPR="-e 4\."
20958    MAKE_REQUIRED_VERSION="4.0"
20959   else
20960    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20961    MAKE_REQUIRED_VERSION="3.81"
20962  fi
20963
20964  if test "x$MAKE_CANDIDATE" != x; then
20965    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20966$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20967    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20968    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20969    if test "x$IS_GNU_MAKE" = x; then
20970      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20971$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20972    else
20973      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20974      if test "x$IS_MODERN_MAKE" = x; then
20975        { $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
20976$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;}
20977      else
20978        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20979          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20980            MAKE_EXPECTED_ENV='cygwin'
20981          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20982            MAKE_EXPECTED_ENV='msys'
20983          else
20984            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20985          fi
20986          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20987          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20988        else
20989          # Not relevant for non-Windows
20990          IS_MAKE_CORRECT_ENV=true
20991        fi
20992        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20993          { $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
20994$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;}
20995        else
20996          FOUND_MAKE=$MAKE_CANDIDATE
20997
20998  # Only process if variable expands to non-empty
20999
21000  if test "x$FOUND_MAKE" != x; then
21001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002
21003  # First separate the path from the arguments. This will split at the first
21004  # space.
21005  complete="$FOUND_MAKE"
21006  path="${complete%% *}"
21007  tmp="$complete EOL"
21008  arguments="${tmp#* }"
21009
21010  # Input might be given as Windows format, start by converting to
21011  # unix format.
21012  new_path=`$CYGPATH -u "$path"`
21013
21014  # Now try to locate executable using which
21015  new_path=`$WHICH "$new_path" 2> /dev/null`
21016  # bat and cmd files are not always considered executable in cygwin causing which
21017  # to not find them
21018  if test "x$new_path" = x \
21019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21021    new_path=`$CYGPATH -u "$path"`
21022  fi
21023  if test "x$new_path" = x; then
21024    # Oops. Which didn't find the executable.
21025    # The splitting of arguments from the executable at a space might have been incorrect,
21026    # since paths with space are more likely in Windows. Give it another try with the whole
21027    # argument.
21028    path="$complete"
21029    arguments="EOL"
21030    new_path=`$CYGPATH -u "$path"`
21031    new_path=`$WHICH "$new_path" 2> /dev/null`
21032    # bat and cmd files are not always considered executable in cygwin causing which
21033    # to not find them
21034    if test "x$new_path" = x \
21035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21037      new_path=`$CYGPATH -u "$path"`
21038    fi
21039    if test "x$new_path" = x; then
21040      # It's still not found. Now this is an unrecoverable error.
21041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21043      has_space=`$ECHO "$complete" | $GREP " "`
21044      if test "x$has_space" != x; then
21045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21047      fi
21048      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21049    fi
21050  fi
21051
21052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21055  # "foo.exe" is OK but "foo" is an error.
21056  #
21057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21058  # It is also a way to make sure we got the proper file name for the real test later on.
21059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21060  if test "x$test_shortpath" = x; then
21061    # Short path failed, file does not exist as specified.
21062    # Try adding .exe or .cmd
21063    if test -f "${new_path}.exe"; then
21064      input_to_shortpath="${new_path}.exe"
21065    elif test -f "${new_path}.cmd"; then
21066      input_to_shortpath="${new_path}.cmd"
21067    else
21068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21069$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21072      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21073    fi
21074  else
21075    input_to_shortpath="$new_path"
21076  fi
21077
21078  # Call helper function which possibly converts this using DOS-style short mode.
21079  # If so, the updated path is stored in $new_path.
21080  new_path="$input_to_shortpath"
21081
21082  input_path="$input_to_shortpath"
21083  # Check if we need to convert this using DOS-style short mode. If the path
21084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21085  # take no chances and rewrite it.
21086  # Note: m4 eats our [], so we need to use [ and ] instead.
21087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21088  if test "x$has_forbidden_chars" != x; then
21089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21093      # Going to short mode and back again did indeed matter. Since short mode is
21094      # case insensitive, let's make it lowercase to improve readability.
21095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21096      # Now convert it back to Unix-style (cygpath)
21097      input_path=`$CYGPATH -u "$shortmode_path"`
21098      new_path="$input_path"
21099    fi
21100  fi
21101
21102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21103  if test "x$test_cygdrive_prefix" = x; then
21104    # As a simple fix, exclude /usr/bin since it's not a real path.
21105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21107      # a path prefixed by /cygdrive for fixpath to work.
21108      new_path="$CYGWIN_ROOT_PATH$input_path"
21109    fi
21110  fi
21111
21112  # remove trailing .exe if any
21113  new_path="${new_path/%.exe/}"
21114
21115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21116
21117  # First separate the path from the arguments. This will split at the first
21118  # space.
21119  complete="$FOUND_MAKE"
21120  path="${complete%% *}"
21121  tmp="$complete EOL"
21122  arguments="${tmp#* }"
21123
21124  # Input might be given as Windows format, start by converting to
21125  # unix format.
21126  new_path="$path"
21127
21128  windows_path="$new_path"
21129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21130    unix_path=`$CYGPATH -u "$windows_path"`
21131    new_path="$unix_path"
21132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21134    new_path="$unix_path"
21135  fi
21136
21137
21138  # Now try to locate executable using which
21139  new_path=`$WHICH "$new_path" 2> /dev/null`
21140
21141  if test "x$new_path" = x; then
21142    # Oops. Which didn't find the executable.
21143    # The splitting of arguments from the executable at a space might have been incorrect,
21144    # since paths with space are more likely in Windows. Give it another try with the whole
21145    # argument.
21146    path="$complete"
21147    arguments="EOL"
21148    new_path="$path"
21149
21150  windows_path="$new_path"
21151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21152    unix_path=`$CYGPATH -u "$windows_path"`
21153    new_path="$unix_path"
21154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21156    new_path="$unix_path"
21157  fi
21158
21159
21160    new_path=`$WHICH "$new_path" 2> /dev/null`
21161    # bat and cmd files are not always considered executable in MSYS causing which
21162    # to not find them
21163    if test "x$new_path" = x \
21164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21166      new_path="$path"
21167
21168  windows_path="$new_path"
21169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21170    unix_path=`$CYGPATH -u "$windows_path"`
21171    new_path="$unix_path"
21172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21174    new_path="$unix_path"
21175  fi
21176
21177    fi
21178
21179    if test "x$new_path" = x; then
21180      # It's still not found. Now this is an unrecoverable error.
21181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21182$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21183      has_space=`$ECHO "$complete" | $GREP " "`
21184      if test "x$has_space" != x; then
21185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21187      fi
21188      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21189    fi
21190  fi
21191
21192  # Now new_path has a complete unix path to the binary
21193  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21194    # Keep paths in /bin as-is, but remove trailing .exe if any
21195    new_path="${new_path/%.exe/}"
21196    # Do not save /bin paths to all_fixpath_prefixes!
21197  else
21198    # Not in mixed or Windows style, start by that.
21199    new_path=`cmd //c echo $new_path`
21200
21201  input_path="$new_path"
21202  # Check if we need to convert this using DOS-style short mode. If the path
21203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21204  # take no chances and rewrite it.
21205  # Note: m4 eats our [], so we need to use [ and ] instead.
21206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21207  if test "x$has_forbidden_chars" != x; then
21208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21210  fi
21211
21212    # Output is in $new_path
21213
21214  windows_path="$new_path"
21215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21216    unix_path=`$CYGPATH -u "$windows_path"`
21217    new_path="$unix_path"
21218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21220    new_path="$unix_path"
21221  fi
21222
21223    # remove trailing .exe if any
21224    new_path="${new_path/%.exe/}"
21225
21226    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21227    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21228  fi
21229
21230    else
21231      # We're on a unix platform. Hooray! :)
21232      # First separate the path from the arguments. This will split at the first
21233      # space.
21234      complete="$FOUND_MAKE"
21235      path="${complete%% *}"
21236      tmp="$complete EOL"
21237      arguments="${tmp#* }"
21238
21239      # Cannot rely on the command "which" here since it doesn't always work.
21240      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21241      if test -z "$is_absolute_path"; then
21242        # Path to executable is not absolute. Find it.
21243        IFS_save="$IFS"
21244        IFS=:
21245        for p in $PATH; do
21246          if test -f "$p/$path" && test -x "$p/$path"; then
21247            new_path="$p/$path"
21248            break
21249          fi
21250        done
21251        IFS="$IFS_save"
21252      else
21253        # This is an absolute path, we can use it without further modifications.
21254        new_path="$path"
21255      fi
21256
21257      if test "x$new_path" = x; then
21258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21259$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21260        has_space=`$ECHO "$complete" | $GREP " "`
21261        if test "x$has_space" != x; then
21262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21264        fi
21265        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21266      fi
21267    fi
21268
21269    # Now join together the path and the arguments once again
21270    if test "x$arguments" != xEOL; then
21271      new_complete="$new_path ${arguments% *}"
21272    else
21273      new_complete="$new_path"
21274    fi
21275
21276    if test "x$complete" != "x$new_complete"; then
21277      FOUND_MAKE="$new_complete"
21278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21279$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21280    fi
21281  fi
21282
21283        fi
21284      fi
21285    fi
21286  fi
21287
21288    if test "x$FOUND_MAKE" = x; then
21289      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21290    fi
21291
21292  fi
21293
21294
21295  MAKE=$FOUND_MAKE
21296
21297  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21298$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21299
21300
21301  # Check if make supports the output sync option and if so, setup using it.
21302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21303$as_echo_n "checking if make --output-sync is supported... " >&6; }
21304  if $MAKE --version -O > /dev/null 2>&1; then
21305    OUTPUT_SYNC_SUPPORTED=true
21306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21307$as_echo "yes" >&6; }
21308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21309$as_echo_n "checking for output-sync value... " >&6; }
21310
21311# Check whether --with-output-sync was given.
21312if test "${with_output_sync+set}" = set; then :
21313  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21314fi
21315
21316    if test "x$OUTPUT_SYNC" = "x"; then
21317      OUTPUT_SYNC=none
21318    fi
21319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21320$as_echo "$OUTPUT_SYNC" >&6; }
21321    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21322      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21323    fi
21324  else
21325    OUTPUT_SYNC_SUPPORTED=false
21326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21327$as_echo "no" >&6; }
21328  fi
21329
21330
21331
21332
21333
21334
21335  # Test if find supports -delete
21336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21337$as_echo_n "checking if find supports -delete... " >&6; }
21338  FIND_DELETE="-delete"
21339
21340  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21341
21342  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21343
21344  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21345  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21346    # No, it does not.
21347    $RM $DELETEDIR/TestIfFindSupportsDelete
21348    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21349      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21350      FIND_DELETE="-print | $XARGS $RM"
21351    else
21352      FIND_DELETE="-exec $RM \{\} \+"
21353    fi
21354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21355$as_echo "no" >&6; }
21356  else
21357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21358$as_echo "yes" >&6; }
21359  fi
21360  $RMDIR $DELETEDIR
21361
21362
21363
21364  # Test which kind of tar was found
21365  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21366    TAR_TYPE="gnu"
21367  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21368    TAR_TYPE="bsd"
21369  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21370    TAR_TYPE="bsd"
21371  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21372    TAR_TYPE="solaris"
21373  fi
21374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21375$as_echo_n "checking what type of tar was found... " >&6; }
21376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21377$as_echo "$TAR_TYPE" >&6; }
21378
21379  TAR_CREATE_FILE_PARAM=""
21380
21381  if test "x$TAR_TYPE" = "xgnu"; then
21382    TAR_INCLUDE_PARAM="T"
21383    TAR_SUPPORTS_TRANSFORM="true"
21384    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21385      # When using gnu tar for Solaris targets, need to use compatibility mode
21386      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21387    fi
21388  else
21389    TAR_INCLUDE_PARAM="I"
21390    TAR_SUPPORTS_TRANSFORM="false"
21391  fi
21392
21393
21394
21395
21396
21397
21398  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21399  # This is a problem for the grep resident on AIX.
21400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21401$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21402  # Multiple subsequent spaces..
21403  STACK_SPACES='aaa   bbb   ccc'
21404  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21405  # patterns in it.
21406  STACK_LIST=${STACK_SPACES// /$'\n'}
21407  NEEDLE_SPACES='ccc bbb aaa'
21408  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21409  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21410  if test "x$RESULT" == "x"; then
21411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21412$as_echo "yes" >&6; }
21413  else
21414    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21415      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21416    fi
21417    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21418  fi
21419
21420
21421  # These tools might not be installed by default,
21422  # need hint on how to install them.
21423
21424
21425
21426  # Publish this variable in the help.
21427
21428
21429  if [ -z "${UNZIP+x}" ]; then
21430    # The variable is not set by user, try to locate tool using the code snippet
21431    for ac_prog in unzip
21432do
21433  # Extract the first word of "$ac_prog", so it can be a program name with args.
21434set dummy $ac_prog; ac_word=$2
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21436$as_echo_n "checking for $ac_word... " >&6; }
21437if ${ac_cv_path_UNZIP+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440  case $UNZIP in
21441  [\\/]* | ?:[\\/]*)
21442  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21443  ;;
21444  *)
21445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21446for as_dir in $PATH
21447do
21448  IFS=$as_save_IFS
21449  test -z "$as_dir" && as_dir=.
21450    for ac_exec_ext in '' $ac_executable_extensions; do
21451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21452    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21454    break 2
21455  fi
21456done
21457  done
21458IFS=$as_save_IFS
21459
21460  ;;
21461esac
21462fi
21463UNZIP=$ac_cv_path_UNZIP
21464if test -n "$UNZIP"; then
21465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21466$as_echo "$UNZIP" >&6; }
21467else
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21469$as_echo "no" >&6; }
21470fi
21471
21472
21473  test -n "$UNZIP" && break
21474done
21475
21476  else
21477    # The variable is set, but is it from the command line or the environment?
21478
21479    # Try to remove the string !UNZIP! from our list.
21480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21482      # If it failed, the variable was not from the command line. Ignore it,
21483      # but warn the user (except for BASH, which is always set by the calling BASH).
21484      if test "xUNZIP" != xBASH; then
21485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21486$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21487      fi
21488      # Try to locate tool using the code snippet
21489      for ac_prog in unzip
21490do
21491  # Extract the first word of "$ac_prog", so it can be a program name with args.
21492set dummy $ac_prog; ac_word=$2
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21494$as_echo_n "checking for $ac_word... " >&6; }
21495if ${ac_cv_path_UNZIP+:} false; then :
21496  $as_echo_n "(cached) " >&6
21497else
21498  case $UNZIP in
21499  [\\/]* | ?:[\\/]*)
21500  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21501  ;;
21502  *)
21503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21504for as_dir in $PATH
21505do
21506  IFS=$as_save_IFS
21507  test -z "$as_dir" && as_dir=.
21508    for ac_exec_ext in '' $ac_executable_extensions; do
21509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21510    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21512    break 2
21513  fi
21514done
21515  done
21516IFS=$as_save_IFS
21517
21518  ;;
21519esac
21520fi
21521UNZIP=$ac_cv_path_UNZIP
21522if test -n "$UNZIP"; then
21523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21524$as_echo "$UNZIP" >&6; }
21525else
21526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21527$as_echo "no" >&6; }
21528fi
21529
21530
21531  test -n "$UNZIP" && break
21532done
21533
21534    else
21535      # If it succeeded, then it was overridden by the user. We will use it
21536      # for the tool.
21537
21538      # First remove it from the list of overridden variables, so we can test
21539      # for unknown variables in the end.
21540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21541
21542      # Check if we try to supply an empty value
21543      if test "x$UNZIP" = x; then
21544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21545$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21547$as_echo_n "checking for UNZIP... " >&6; }
21548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21549$as_echo "disabled" >&6; }
21550      else
21551        # Check if the provided tool contains a complete path.
21552        tool_specified="$UNZIP"
21553        tool_basename="${tool_specified##*/}"
21554        if test "x$tool_basename" = "x$tool_specified"; then
21555          # A command without a complete path is provided, search $PATH.
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21557$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21558          # Extract the first word of "$tool_basename", so it can be a program name with args.
21559set dummy $tool_basename; ac_word=$2
21560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21561$as_echo_n "checking for $ac_word... " >&6; }
21562if ${ac_cv_path_UNZIP+:} false; then :
21563  $as_echo_n "(cached) " >&6
21564else
21565  case $UNZIP in
21566  [\\/]* | ?:[\\/]*)
21567  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21568  ;;
21569  *)
21570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21571for as_dir in $PATH
21572do
21573  IFS=$as_save_IFS
21574  test -z "$as_dir" && as_dir=.
21575    for ac_exec_ext in '' $ac_executable_extensions; do
21576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21577    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21579    break 2
21580  fi
21581done
21582  done
21583IFS=$as_save_IFS
21584
21585  ;;
21586esac
21587fi
21588UNZIP=$ac_cv_path_UNZIP
21589if test -n "$UNZIP"; then
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21591$as_echo "$UNZIP" >&6; }
21592else
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21594$as_echo "no" >&6; }
21595fi
21596
21597
21598          if test "x$UNZIP" = x; then
21599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21600          fi
21601        else
21602          # Otherwise we believe it is a complete path. Use it as it is.
21603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21604$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21606$as_echo_n "checking for UNZIP... " >&6; }
21607          if test ! -x "$tool_specified"; then
21608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21609$as_echo "not found" >&6; }
21610            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21611          fi
21612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21613$as_echo "$tool_specified" >&6; }
21614        fi
21615      fi
21616    fi
21617
21618  fi
21619
21620
21621
21622  if test "x$UNZIP" = x; then
21623    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21624  fi
21625
21626
21627  # Since zip uses "ZIP" as a environment variable for passing options, we need
21628  # to name our variable differently, hence ZIPEXE.
21629
21630
21631
21632  # Publish this variable in the help.
21633
21634
21635  if [ -z "${ZIPEXE+x}" ]; then
21636    # The variable is not set by user, try to locate tool using the code snippet
21637    for ac_prog in zip
21638do
21639  # Extract the first word of "$ac_prog", so it can be a program name with args.
21640set dummy $ac_prog; ac_word=$2
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21642$as_echo_n "checking for $ac_word... " >&6; }
21643if ${ac_cv_path_ZIPEXE+:} false; then :
21644  $as_echo_n "(cached) " >&6
21645else
21646  case $ZIPEXE in
21647  [\\/]* | ?:[\\/]*)
21648  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21649  ;;
21650  *)
21651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21652for as_dir in $PATH
21653do
21654  IFS=$as_save_IFS
21655  test -z "$as_dir" && as_dir=.
21656    for ac_exec_ext in '' $ac_executable_extensions; do
21657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21658    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21660    break 2
21661  fi
21662done
21663  done
21664IFS=$as_save_IFS
21665
21666  ;;
21667esac
21668fi
21669ZIPEXE=$ac_cv_path_ZIPEXE
21670if test -n "$ZIPEXE"; then
21671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21672$as_echo "$ZIPEXE" >&6; }
21673else
21674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21675$as_echo "no" >&6; }
21676fi
21677
21678
21679  test -n "$ZIPEXE" && break
21680done
21681
21682  else
21683    # The variable is set, but is it from the command line or the environment?
21684
21685    # Try to remove the string !ZIPEXE! from our list.
21686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21688      # If it failed, the variable was not from the command line. Ignore it,
21689      # but warn the user (except for BASH, which is always set by the calling BASH).
21690      if test "xZIPEXE" != xBASH; then
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21692$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21693      fi
21694      # Try to locate tool using the code snippet
21695      for ac_prog in zip
21696do
21697  # Extract the first word of "$ac_prog", so it can be a program name with args.
21698set dummy $ac_prog; ac_word=$2
21699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21700$as_echo_n "checking for $ac_word... " >&6; }
21701if ${ac_cv_path_ZIPEXE+:} false; then :
21702  $as_echo_n "(cached) " >&6
21703else
21704  case $ZIPEXE in
21705  [\\/]* | ?:[\\/]*)
21706  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21707  ;;
21708  *)
21709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21710for as_dir in $PATH
21711do
21712  IFS=$as_save_IFS
21713  test -z "$as_dir" && as_dir=.
21714    for ac_exec_ext in '' $ac_executable_extensions; do
21715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21716    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21718    break 2
21719  fi
21720done
21721  done
21722IFS=$as_save_IFS
21723
21724  ;;
21725esac
21726fi
21727ZIPEXE=$ac_cv_path_ZIPEXE
21728if test -n "$ZIPEXE"; then
21729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21730$as_echo "$ZIPEXE" >&6; }
21731else
21732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21733$as_echo "no" >&6; }
21734fi
21735
21736
21737  test -n "$ZIPEXE" && break
21738done
21739
21740    else
21741      # If it succeeded, then it was overridden by the user. We will use it
21742      # for the tool.
21743
21744      # First remove it from the list of overridden variables, so we can test
21745      # for unknown variables in the end.
21746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21747
21748      # Check if we try to supply an empty value
21749      if test "x$ZIPEXE" = x; then
21750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21751$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21753$as_echo_n "checking for ZIPEXE... " >&6; }
21754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21755$as_echo "disabled" >&6; }
21756      else
21757        # Check if the provided tool contains a complete path.
21758        tool_specified="$ZIPEXE"
21759        tool_basename="${tool_specified##*/}"
21760        if test "x$tool_basename" = "x$tool_specified"; then
21761          # A command without a complete path is provided, search $PATH.
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21763$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21764          # Extract the first word of "$tool_basename", so it can be a program name with args.
21765set dummy $tool_basename; ac_word=$2
21766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21767$as_echo_n "checking for $ac_word... " >&6; }
21768if ${ac_cv_path_ZIPEXE+:} false; then :
21769  $as_echo_n "(cached) " >&6
21770else
21771  case $ZIPEXE in
21772  [\\/]* | ?:[\\/]*)
21773  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21774  ;;
21775  *)
21776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21777for as_dir in $PATH
21778do
21779  IFS=$as_save_IFS
21780  test -z "$as_dir" && as_dir=.
21781    for ac_exec_ext in '' $ac_executable_extensions; do
21782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21783    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21785    break 2
21786  fi
21787done
21788  done
21789IFS=$as_save_IFS
21790
21791  ;;
21792esac
21793fi
21794ZIPEXE=$ac_cv_path_ZIPEXE
21795if test -n "$ZIPEXE"; then
21796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21797$as_echo "$ZIPEXE" >&6; }
21798else
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21800$as_echo "no" >&6; }
21801fi
21802
21803
21804          if test "x$ZIPEXE" = x; then
21805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21806          fi
21807        else
21808          # Otherwise we believe it is a complete path. Use it as it is.
21809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21810$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21812$as_echo_n "checking for ZIPEXE... " >&6; }
21813          if test ! -x "$tool_specified"; then
21814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21815$as_echo "not found" >&6; }
21816            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21817          fi
21818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21819$as_echo "$tool_specified" >&6; }
21820        fi
21821      fi
21822    fi
21823
21824  fi
21825
21826
21827
21828  if test "x$ZIPEXE" = x; then
21829    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21830  fi
21831
21832
21833
21834  # Non-required basic tools
21835
21836
21837
21838  # Publish this variable in the help.
21839
21840
21841  if [ -z "${LDD+x}" ]; then
21842    # The variable is not set by user, try to locate tool using the code snippet
21843    for ac_prog in ldd
21844do
21845  # Extract the first word of "$ac_prog", so it can be a program name with args.
21846set dummy $ac_prog; ac_word=$2
21847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21848$as_echo_n "checking for $ac_word... " >&6; }
21849if ${ac_cv_path_LDD+:} false; then :
21850  $as_echo_n "(cached) " >&6
21851else
21852  case $LDD in
21853  [\\/]* | ?:[\\/]*)
21854  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21855  ;;
21856  *)
21857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21858for as_dir in $PATH
21859do
21860  IFS=$as_save_IFS
21861  test -z "$as_dir" && as_dir=.
21862    for ac_exec_ext in '' $ac_executable_extensions; do
21863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21864    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21866    break 2
21867  fi
21868done
21869  done
21870IFS=$as_save_IFS
21871
21872  ;;
21873esac
21874fi
21875LDD=$ac_cv_path_LDD
21876if test -n "$LDD"; then
21877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21878$as_echo "$LDD" >&6; }
21879else
21880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21881$as_echo "no" >&6; }
21882fi
21883
21884
21885  test -n "$LDD" && break
21886done
21887
21888  else
21889    # The variable is set, but is it from the command line or the environment?
21890
21891    # Try to remove the string !LDD! from our list.
21892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21894      # If it failed, the variable was not from the command line. Ignore it,
21895      # but warn the user (except for BASH, which is always set by the calling BASH).
21896      if test "xLDD" != xBASH; then
21897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21898$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21899      fi
21900      # Try to locate tool using the code snippet
21901      for ac_prog in ldd
21902do
21903  # Extract the first word of "$ac_prog", so it can be a program name with args.
21904set dummy $ac_prog; ac_word=$2
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21906$as_echo_n "checking for $ac_word... " >&6; }
21907if ${ac_cv_path_LDD+:} false; then :
21908  $as_echo_n "(cached) " >&6
21909else
21910  case $LDD in
21911  [\\/]* | ?:[\\/]*)
21912  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21913  ;;
21914  *)
21915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21916for as_dir in $PATH
21917do
21918  IFS=$as_save_IFS
21919  test -z "$as_dir" && as_dir=.
21920    for ac_exec_ext in '' $ac_executable_extensions; do
21921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21922    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21924    break 2
21925  fi
21926done
21927  done
21928IFS=$as_save_IFS
21929
21930  ;;
21931esac
21932fi
21933LDD=$ac_cv_path_LDD
21934if test -n "$LDD"; then
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21936$as_echo "$LDD" >&6; }
21937else
21938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21939$as_echo "no" >&6; }
21940fi
21941
21942
21943  test -n "$LDD" && break
21944done
21945
21946    else
21947      # If it succeeded, then it was overridden by the user. We will use it
21948      # for the tool.
21949
21950      # First remove it from the list of overridden variables, so we can test
21951      # for unknown variables in the end.
21952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21953
21954      # Check if we try to supply an empty value
21955      if test "x$LDD" = x; then
21956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21957$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21959$as_echo_n "checking for LDD... " >&6; }
21960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21961$as_echo "disabled" >&6; }
21962      else
21963        # Check if the provided tool contains a complete path.
21964        tool_specified="$LDD"
21965        tool_basename="${tool_specified##*/}"
21966        if test "x$tool_basename" = "x$tool_specified"; then
21967          # A command without a complete path is provided, search $PATH.
21968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21969$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21970          # Extract the first word of "$tool_basename", so it can be a program name with args.
21971set dummy $tool_basename; ac_word=$2
21972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21973$as_echo_n "checking for $ac_word... " >&6; }
21974if ${ac_cv_path_LDD+:} false; then :
21975  $as_echo_n "(cached) " >&6
21976else
21977  case $LDD in
21978  [\\/]* | ?:[\\/]*)
21979  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21980  ;;
21981  *)
21982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21983for as_dir in $PATH
21984do
21985  IFS=$as_save_IFS
21986  test -z "$as_dir" && as_dir=.
21987    for ac_exec_ext in '' $ac_executable_extensions; do
21988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21989    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21991    break 2
21992  fi
21993done
21994  done
21995IFS=$as_save_IFS
21996
21997  ;;
21998esac
21999fi
22000LDD=$ac_cv_path_LDD
22001if test -n "$LDD"; then
22002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22003$as_echo "$LDD" >&6; }
22004else
22005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22006$as_echo "no" >&6; }
22007fi
22008
22009
22010          if test "x$LDD" = x; then
22011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22012          fi
22013        else
22014          # Otherwise we believe it is a complete path. Use it as it is.
22015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22016$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22018$as_echo_n "checking for LDD... " >&6; }
22019          if test ! -x "$tool_specified"; then
22020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22021$as_echo "not found" >&6; }
22022            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22023          fi
22024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22025$as_echo "$tool_specified" >&6; }
22026        fi
22027      fi
22028    fi
22029
22030  fi
22031
22032
22033  if test "x$LDD" = "x"; then
22034    # List shared lib dependencies is used for
22035    # debug output and checking for forbidden dependencies.
22036    # We can build without it.
22037    LDD="true"
22038  fi
22039
22040
22041  # Publish this variable in the help.
22042
22043
22044  if [ -z "${OTOOL+x}" ]; then
22045    # The variable is not set by user, try to locate tool using the code snippet
22046    for ac_prog in otool
22047do
22048  # Extract the first word of "$ac_prog", so it can be a program name with args.
22049set dummy $ac_prog; ac_word=$2
22050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22051$as_echo_n "checking for $ac_word... " >&6; }
22052if ${ac_cv_path_OTOOL+:} false; then :
22053  $as_echo_n "(cached) " >&6
22054else
22055  case $OTOOL in
22056  [\\/]* | ?:[\\/]*)
22057  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22058  ;;
22059  *)
22060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22061for as_dir in $PATH
22062do
22063  IFS=$as_save_IFS
22064  test -z "$as_dir" && as_dir=.
22065    for ac_exec_ext in '' $ac_executable_extensions; do
22066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22067    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22069    break 2
22070  fi
22071done
22072  done
22073IFS=$as_save_IFS
22074
22075  ;;
22076esac
22077fi
22078OTOOL=$ac_cv_path_OTOOL
22079if test -n "$OTOOL"; then
22080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22081$as_echo "$OTOOL" >&6; }
22082else
22083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22084$as_echo "no" >&6; }
22085fi
22086
22087
22088  test -n "$OTOOL" && break
22089done
22090
22091  else
22092    # The variable is set, but is it from the command line or the environment?
22093
22094    # Try to remove the string !OTOOL! from our list.
22095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22097      # If it failed, the variable was not from the command line. Ignore it,
22098      # but warn the user (except for BASH, which is always set by the calling BASH).
22099      if test "xOTOOL" != xBASH; then
22100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22101$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22102      fi
22103      # Try to locate tool using the code snippet
22104      for ac_prog in otool
22105do
22106  # Extract the first word of "$ac_prog", so it can be a program name with args.
22107set dummy $ac_prog; ac_word=$2
22108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22109$as_echo_n "checking for $ac_word... " >&6; }
22110if ${ac_cv_path_OTOOL+:} false; then :
22111  $as_echo_n "(cached) " >&6
22112else
22113  case $OTOOL in
22114  [\\/]* | ?:[\\/]*)
22115  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22116  ;;
22117  *)
22118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22119for as_dir in $PATH
22120do
22121  IFS=$as_save_IFS
22122  test -z "$as_dir" && as_dir=.
22123    for ac_exec_ext in '' $ac_executable_extensions; do
22124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22125    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22127    break 2
22128  fi
22129done
22130  done
22131IFS=$as_save_IFS
22132
22133  ;;
22134esac
22135fi
22136OTOOL=$ac_cv_path_OTOOL
22137if test -n "$OTOOL"; then
22138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22139$as_echo "$OTOOL" >&6; }
22140else
22141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22142$as_echo "no" >&6; }
22143fi
22144
22145
22146  test -n "$OTOOL" && break
22147done
22148
22149    else
22150      # If it succeeded, then it was overridden by the user. We will use it
22151      # for the tool.
22152
22153      # First remove it from the list of overridden variables, so we can test
22154      # for unknown variables in the end.
22155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22156
22157      # Check if we try to supply an empty value
22158      if test "x$OTOOL" = x; then
22159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22160$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22162$as_echo_n "checking for OTOOL... " >&6; }
22163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22164$as_echo "disabled" >&6; }
22165      else
22166        # Check if the provided tool contains a complete path.
22167        tool_specified="$OTOOL"
22168        tool_basename="${tool_specified##*/}"
22169        if test "x$tool_basename" = "x$tool_specified"; then
22170          # A command without a complete path is provided, search $PATH.
22171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22172$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22173          # Extract the first word of "$tool_basename", so it can be a program name with args.
22174set dummy $tool_basename; ac_word=$2
22175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22176$as_echo_n "checking for $ac_word... " >&6; }
22177if ${ac_cv_path_OTOOL+:} false; then :
22178  $as_echo_n "(cached) " >&6
22179else
22180  case $OTOOL in
22181  [\\/]* | ?:[\\/]*)
22182  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22183  ;;
22184  *)
22185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22186for as_dir in $PATH
22187do
22188  IFS=$as_save_IFS
22189  test -z "$as_dir" && as_dir=.
22190    for ac_exec_ext in '' $ac_executable_extensions; do
22191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22192    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22194    break 2
22195  fi
22196done
22197  done
22198IFS=$as_save_IFS
22199
22200  ;;
22201esac
22202fi
22203OTOOL=$ac_cv_path_OTOOL
22204if test -n "$OTOOL"; then
22205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22206$as_echo "$OTOOL" >&6; }
22207else
22208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22209$as_echo "no" >&6; }
22210fi
22211
22212
22213          if test "x$OTOOL" = x; then
22214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22215          fi
22216        else
22217          # Otherwise we believe it is a complete path. Use it as it is.
22218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22219$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22221$as_echo_n "checking for OTOOL... " >&6; }
22222          if test ! -x "$tool_specified"; then
22223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22224$as_echo "not found" >&6; }
22225            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22226          fi
22227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22228$as_echo "$tool_specified" >&6; }
22229        fi
22230      fi
22231    fi
22232
22233  fi
22234
22235
22236  if test "x$OTOOL" = "x"; then
22237    OTOOL="true"
22238  fi
22239
22240
22241  # Publish this variable in the help.
22242
22243
22244  if [ -z "${READELF+x}" ]; then
22245    # The variable is not set by user, try to locate tool using the code snippet
22246    for ac_prog in greadelf readelf
22247do
22248  # Extract the first word of "$ac_prog", so it can be a program name with args.
22249set dummy $ac_prog; ac_word=$2
22250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22251$as_echo_n "checking for $ac_word... " >&6; }
22252if ${ac_cv_path_READELF+:} false; then :
22253  $as_echo_n "(cached) " >&6
22254else
22255  case $READELF in
22256  [\\/]* | ?:[\\/]*)
22257  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22258  ;;
22259  *)
22260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22261for as_dir in $PATH
22262do
22263  IFS=$as_save_IFS
22264  test -z "$as_dir" && as_dir=.
22265    for ac_exec_ext in '' $ac_executable_extensions; do
22266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22267    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22269    break 2
22270  fi
22271done
22272  done
22273IFS=$as_save_IFS
22274
22275  ;;
22276esac
22277fi
22278READELF=$ac_cv_path_READELF
22279if test -n "$READELF"; then
22280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22281$as_echo "$READELF" >&6; }
22282else
22283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22284$as_echo "no" >&6; }
22285fi
22286
22287
22288  test -n "$READELF" && break
22289done
22290
22291  else
22292    # The variable is set, but is it from the command line or the environment?
22293
22294    # Try to remove the string !READELF! from our list.
22295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22297      # If it failed, the variable was not from the command line. Ignore it,
22298      # but warn the user (except for BASH, which is always set by the calling BASH).
22299      if test "xREADELF" != xBASH; then
22300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22301$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22302      fi
22303      # Try to locate tool using the code snippet
22304      for ac_prog in greadelf readelf
22305do
22306  # Extract the first word of "$ac_prog", so it can be a program name with args.
22307set dummy $ac_prog; ac_word=$2
22308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22309$as_echo_n "checking for $ac_word... " >&6; }
22310if ${ac_cv_path_READELF+:} false; then :
22311  $as_echo_n "(cached) " >&6
22312else
22313  case $READELF in
22314  [\\/]* | ?:[\\/]*)
22315  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22316  ;;
22317  *)
22318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22319for as_dir in $PATH
22320do
22321  IFS=$as_save_IFS
22322  test -z "$as_dir" && as_dir=.
22323    for ac_exec_ext in '' $ac_executable_extensions; do
22324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22325    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22327    break 2
22328  fi
22329done
22330  done
22331IFS=$as_save_IFS
22332
22333  ;;
22334esac
22335fi
22336READELF=$ac_cv_path_READELF
22337if test -n "$READELF"; then
22338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22339$as_echo "$READELF" >&6; }
22340else
22341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22342$as_echo "no" >&6; }
22343fi
22344
22345
22346  test -n "$READELF" && break
22347done
22348
22349    else
22350      # If it succeeded, then it was overridden by the user. We will use it
22351      # for the tool.
22352
22353      # First remove it from the list of overridden variables, so we can test
22354      # for unknown variables in the end.
22355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22356
22357      # Check if we try to supply an empty value
22358      if test "x$READELF" = x; then
22359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22360$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22362$as_echo_n "checking for READELF... " >&6; }
22363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22364$as_echo "disabled" >&6; }
22365      else
22366        # Check if the provided tool contains a complete path.
22367        tool_specified="$READELF"
22368        tool_basename="${tool_specified##*/}"
22369        if test "x$tool_basename" = "x$tool_specified"; then
22370          # A command without a complete path is provided, search $PATH.
22371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22372$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22373          # Extract the first word of "$tool_basename", so it can be a program name with args.
22374set dummy $tool_basename; ac_word=$2
22375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22376$as_echo_n "checking for $ac_word... " >&6; }
22377if ${ac_cv_path_READELF+:} false; then :
22378  $as_echo_n "(cached) " >&6
22379else
22380  case $READELF in
22381  [\\/]* | ?:[\\/]*)
22382  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22383  ;;
22384  *)
22385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22386for as_dir in $PATH
22387do
22388  IFS=$as_save_IFS
22389  test -z "$as_dir" && as_dir=.
22390    for ac_exec_ext in '' $ac_executable_extensions; do
22391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22392    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22394    break 2
22395  fi
22396done
22397  done
22398IFS=$as_save_IFS
22399
22400  ;;
22401esac
22402fi
22403READELF=$ac_cv_path_READELF
22404if test -n "$READELF"; then
22405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22406$as_echo "$READELF" >&6; }
22407else
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22409$as_echo "no" >&6; }
22410fi
22411
22412
22413          if test "x$READELF" = x; then
22414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22415          fi
22416        else
22417          # Otherwise we believe it is a complete path. Use it as it is.
22418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22419$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22421$as_echo_n "checking for READELF... " >&6; }
22422          if test ! -x "$tool_specified"; then
22423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22424$as_echo "not found" >&6; }
22425            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22426          fi
22427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22428$as_echo "$tool_specified" >&6; }
22429        fi
22430      fi
22431    fi
22432
22433  fi
22434
22435
22436
22437
22438  # Publish this variable in the help.
22439
22440
22441  if [ -z "${HG+x}" ]; then
22442    # The variable is not set by user, try to locate tool using the code snippet
22443    for ac_prog in hg
22444do
22445  # Extract the first word of "$ac_prog", so it can be a program name with args.
22446set dummy $ac_prog; ac_word=$2
22447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22448$as_echo_n "checking for $ac_word... " >&6; }
22449if ${ac_cv_path_HG+:} false; then :
22450  $as_echo_n "(cached) " >&6
22451else
22452  case $HG in
22453  [\\/]* | ?:[\\/]*)
22454  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22455  ;;
22456  *)
22457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22458for as_dir in $PATH
22459do
22460  IFS=$as_save_IFS
22461  test -z "$as_dir" && as_dir=.
22462    for ac_exec_ext in '' $ac_executable_extensions; do
22463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22464    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22466    break 2
22467  fi
22468done
22469  done
22470IFS=$as_save_IFS
22471
22472  ;;
22473esac
22474fi
22475HG=$ac_cv_path_HG
22476if test -n "$HG"; then
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22478$as_echo "$HG" >&6; }
22479else
22480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22481$as_echo "no" >&6; }
22482fi
22483
22484
22485  test -n "$HG" && break
22486done
22487
22488  else
22489    # The variable is set, but is it from the command line or the environment?
22490
22491    # Try to remove the string !HG! from our list.
22492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22494      # If it failed, the variable was not from the command line. Ignore it,
22495      # but warn the user (except for BASH, which is always set by the calling BASH).
22496      if test "xHG" != xBASH; then
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22498$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22499      fi
22500      # Try to locate tool using the code snippet
22501      for ac_prog in hg
22502do
22503  # Extract the first word of "$ac_prog", so it can be a program name with args.
22504set dummy $ac_prog; ac_word=$2
22505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22506$as_echo_n "checking for $ac_word... " >&6; }
22507if ${ac_cv_path_HG+:} false; then :
22508  $as_echo_n "(cached) " >&6
22509else
22510  case $HG in
22511  [\\/]* | ?:[\\/]*)
22512  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22513  ;;
22514  *)
22515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22516for as_dir in $PATH
22517do
22518  IFS=$as_save_IFS
22519  test -z "$as_dir" && as_dir=.
22520    for ac_exec_ext in '' $ac_executable_extensions; do
22521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22522    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22524    break 2
22525  fi
22526done
22527  done
22528IFS=$as_save_IFS
22529
22530  ;;
22531esac
22532fi
22533HG=$ac_cv_path_HG
22534if test -n "$HG"; then
22535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22536$as_echo "$HG" >&6; }
22537else
22538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22539$as_echo "no" >&6; }
22540fi
22541
22542
22543  test -n "$HG" && break
22544done
22545
22546    else
22547      # If it succeeded, then it was overridden by the user. We will use it
22548      # for the tool.
22549
22550      # First remove it from the list of overridden variables, so we can test
22551      # for unknown variables in the end.
22552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22553
22554      # Check if we try to supply an empty value
22555      if test "x$HG" = x; then
22556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22557$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22559$as_echo_n "checking for HG... " >&6; }
22560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22561$as_echo "disabled" >&6; }
22562      else
22563        # Check if the provided tool contains a complete path.
22564        tool_specified="$HG"
22565        tool_basename="${tool_specified##*/}"
22566        if test "x$tool_basename" = "x$tool_specified"; then
22567          # A command without a complete path is provided, search $PATH.
22568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22569$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22570          # Extract the first word of "$tool_basename", so it can be a program name with args.
22571set dummy $tool_basename; ac_word=$2
22572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22573$as_echo_n "checking for $ac_word... " >&6; }
22574if ${ac_cv_path_HG+:} false; then :
22575  $as_echo_n "(cached) " >&6
22576else
22577  case $HG in
22578  [\\/]* | ?:[\\/]*)
22579  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22580  ;;
22581  *)
22582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22583for as_dir in $PATH
22584do
22585  IFS=$as_save_IFS
22586  test -z "$as_dir" && as_dir=.
22587    for ac_exec_ext in '' $ac_executable_extensions; do
22588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22589    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22591    break 2
22592  fi
22593done
22594  done
22595IFS=$as_save_IFS
22596
22597  ;;
22598esac
22599fi
22600HG=$ac_cv_path_HG
22601if test -n "$HG"; then
22602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22603$as_echo "$HG" >&6; }
22604else
22605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22606$as_echo "no" >&6; }
22607fi
22608
22609
22610          if test "x$HG" = x; then
22611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22612          fi
22613        else
22614          # Otherwise we believe it is a complete path. Use it as it is.
22615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22616$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22618$as_echo_n "checking for HG... " >&6; }
22619          if test ! -x "$tool_specified"; then
22620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22621$as_echo "not found" >&6; }
22622            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22623          fi
22624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22625$as_echo "$tool_specified" >&6; }
22626        fi
22627      fi
22628    fi
22629
22630  fi
22631
22632
22633
22634
22635  # Publish this variable in the help.
22636
22637
22638  if [ -z "${STAT+x}" ]; then
22639    # The variable is not set by user, try to locate tool using the code snippet
22640    for ac_prog in stat
22641do
22642  # Extract the first word of "$ac_prog", so it can be a program name with args.
22643set dummy $ac_prog; ac_word=$2
22644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22645$as_echo_n "checking for $ac_word... " >&6; }
22646if ${ac_cv_path_STAT+:} false; then :
22647  $as_echo_n "(cached) " >&6
22648else
22649  case $STAT in
22650  [\\/]* | ?:[\\/]*)
22651  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22652  ;;
22653  *)
22654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22655for as_dir in $PATH
22656do
22657  IFS=$as_save_IFS
22658  test -z "$as_dir" && as_dir=.
22659    for ac_exec_ext in '' $ac_executable_extensions; do
22660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22661    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22663    break 2
22664  fi
22665done
22666  done
22667IFS=$as_save_IFS
22668
22669  ;;
22670esac
22671fi
22672STAT=$ac_cv_path_STAT
22673if test -n "$STAT"; then
22674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22675$as_echo "$STAT" >&6; }
22676else
22677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22678$as_echo "no" >&6; }
22679fi
22680
22681
22682  test -n "$STAT" && break
22683done
22684
22685  else
22686    # The variable is set, but is it from the command line or the environment?
22687
22688    # Try to remove the string !STAT! from our list.
22689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22691      # If it failed, the variable was not from the command line. Ignore it,
22692      # but warn the user (except for BASH, which is always set by the calling BASH).
22693      if test "xSTAT" != xBASH; then
22694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22695$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22696      fi
22697      # Try to locate tool using the code snippet
22698      for ac_prog in stat
22699do
22700  # Extract the first word of "$ac_prog", so it can be a program name with args.
22701set dummy $ac_prog; ac_word=$2
22702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22703$as_echo_n "checking for $ac_word... " >&6; }
22704if ${ac_cv_path_STAT+:} false; then :
22705  $as_echo_n "(cached) " >&6
22706else
22707  case $STAT in
22708  [\\/]* | ?:[\\/]*)
22709  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22710  ;;
22711  *)
22712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22713for as_dir in $PATH
22714do
22715  IFS=$as_save_IFS
22716  test -z "$as_dir" && as_dir=.
22717    for ac_exec_ext in '' $ac_executable_extensions; do
22718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22719    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22721    break 2
22722  fi
22723done
22724  done
22725IFS=$as_save_IFS
22726
22727  ;;
22728esac
22729fi
22730STAT=$ac_cv_path_STAT
22731if test -n "$STAT"; then
22732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22733$as_echo "$STAT" >&6; }
22734else
22735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22736$as_echo "no" >&6; }
22737fi
22738
22739
22740  test -n "$STAT" && break
22741done
22742
22743    else
22744      # If it succeeded, then it was overridden by the user. We will use it
22745      # for the tool.
22746
22747      # First remove it from the list of overridden variables, so we can test
22748      # for unknown variables in the end.
22749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22750
22751      # Check if we try to supply an empty value
22752      if test "x$STAT" = x; then
22753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22754$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22756$as_echo_n "checking for STAT... " >&6; }
22757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22758$as_echo "disabled" >&6; }
22759      else
22760        # Check if the provided tool contains a complete path.
22761        tool_specified="$STAT"
22762        tool_basename="${tool_specified##*/}"
22763        if test "x$tool_basename" = "x$tool_specified"; then
22764          # A command without a complete path is provided, search $PATH.
22765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22766$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22767          # Extract the first word of "$tool_basename", so it can be a program name with args.
22768set dummy $tool_basename; ac_word=$2
22769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22770$as_echo_n "checking for $ac_word... " >&6; }
22771if ${ac_cv_path_STAT+:} false; then :
22772  $as_echo_n "(cached) " >&6
22773else
22774  case $STAT in
22775  [\\/]* | ?:[\\/]*)
22776  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22777  ;;
22778  *)
22779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22780for as_dir in $PATH
22781do
22782  IFS=$as_save_IFS
22783  test -z "$as_dir" && as_dir=.
22784    for ac_exec_ext in '' $ac_executable_extensions; do
22785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22786    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22788    break 2
22789  fi
22790done
22791  done
22792IFS=$as_save_IFS
22793
22794  ;;
22795esac
22796fi
22797STAT=$ac_cv_path_STAT
22798if test -n "$STAT"; then
22799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22800$as_echo "$STAT" >&6; }
22801else
22802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22803$as_echo "no" >&6; }
22804fi
22805
22806
22807          if test "x$STAT" = x; then
22808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22809          fi
22810        else
22811          # Otherwise we believe it is a complete path. Use it as it is.
22812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22813$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22815$as_echo_n "checking for STAT... " >&6; }
22816          if test ! -x "$tool_specified"; then
22817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22818$as_echo "not found" >&6; }
22819            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22820          fi
22821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22822$as_echo "$tool_specified" >&6; }
22823        fi
22824      fi
22825    fi
22826
22827  fi
22828
22829
22830
22831
22832  # Publish this variable in the help.
22833
22834
22835  if [ -z "${TIME+x}" ]; then
22836    # The variable is not set by user, try to locate tool using the code snippet
22837    for ac_prog in time
22838do
22839  # Extract the first word of "$ac_prog", so it can be a program name with args.
22840set dummy $ac_prog; ac_word=$2
22841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22842$as_echo_n "checking for $ac_word... " >&6; }
22843if ${ac_cv_path_TIME+:} false; then :
22844  $as_echo_n "(cached) " >&6
22845else
22846  case $TIME in
22847  [\\/]* | ?:[\\/]*)
22848  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22849  ;;
22850  *)
22851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22852for as_dir in $PATH
22853do
22854  IFS=$as_save_IFS
22855  test -z "$as_dir" && as_dir=.
22856    for ac_exec_ext in '' $ac_executable_extensions; do
22857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22858    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22860    break 2
22861  fi
22862done
22863  done
22864IFS=$as_save_IFS
22865
22866  ;;
22867esac
22868fi
22869TIME=$ac_cv_path_TIME
22870if test -n "$TIME"; then
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22872$as_echo "$TIME" >&6; }
22873else
22874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22875$as_echo "no" >&6; }
22876fi
22877
22878
22879  test -n "$TIME" && break
22880done
22881
22882  else
22883    # The variable is set, but is it from the command line or the environment?
22884
22885    # Try to remove the string !TIME! from our list.
22886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22888      # If it failed, the variable was not from the command line. Ignore it,
22889      # but warn the user (except for BASH, which is always set by the calling BASH).
22890      if test "xTIME" != xBASH; then
22891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22892$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22893      fi
22894      # Try to locate tool using the code snippet
22895      for ac_prog in time
22896do
22897  # Extract the first word of "$ac_prog", so it can be a program name with args.
22898set dummy $ac_prog; ac_word=$2
22899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22900$as_echo_n "checking for $ac_word... " >&6; }
22901if ${ac_cv_path_TIME+:} false; then :
22902  $as_echo_n "(cached) " >&6
22903else
22904  case $TIME in
22905  [\\/]* | ?:[\\/]*)
22906  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22907  ;;
22908  *)
22909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22910for as_dir in $PATH
22911do
22912  IFS=$as_save_IFS
22913  test -z "$as_dir" && as_dir=.
22914    for ac_exec_ext in '' $ac_executable_extensions; do
22915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22916    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22918    break 2
22919  fi
22920done
22921  done
22922IFS=$as_save_IFS
22923
22924  ;;
22925esac
22926fi
22927TIME=$ac_cv_path_TIME
22928if test -n "$TIME"; then
22929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22930$as_echo "$TIME" >&6; }
22931else
22932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22933$as_echo "no" >&6; }
22934fi
22935
22936
22937  test -n "$TIME" && break
22938done
22939
22940    else
22941      # If it succeeded, then it was overridden by the user. We will use it
22942      # for the tool.
22943
22944      # First remove it from the list of overridden variables, so we can test
22945      # for unknown variables in the end.
22946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22947
22948      # Check if we try to supply an empty value
22949      if test "x$TIME" = x; then
22950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22951$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22953$as_echo_n "checking for TIME... " >&6; }
22954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22955$as_echo "disabled" >&6; }
22956      else
22957        # Check if the provided tool contains a complete path.
22958        tool_specified="$TIME"
22959        tool_basename="${tool_specified##*/}"
22960        if test "x$tool_basename" = "x$tool_specified"; then
22961          # A command without a complete path is provided, search $PATH.
22962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22963$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22964          # Extract the first word of "$tool_basename", so it can be a program name with args.
22965set dummy $tool_basename; ac_word=$2
22966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22967$as_echo_n "checking for $ac_word... " >&6; }
22968if ${ac_cv_path_TIME+:} false; then :
22969  $as_echo_n "(cached) " >&6
22970else
22971  case $TIME in
22972  [\\/]* | ?:[\\/]*)
22973  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22974  ;;
22975  *)
22976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22977for as_dir in $PATH
22978do
22979  IFS=$as_save_IFS
22980  test -z "$as_dir" && as_dir=.
22981    for ac_exec_ext in '' $ac_executable_extensions; do
22982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22983    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22985    break 2
22986  fi
22987done
22988  done
22989IFS=$as_save_IFS
22990
22991  ;;
22992esac
22993fi
22994TIME=$ac_cv_path_TIME
22995if test -n "$TIME"; then
22996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22997$as_echo "$TIME" >&6; }
22998else
22999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23000$as_echo "no" >&6; }
23001fi
23002
23003
23004          if test "x$TIME" = x; then
23005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23006          fi
23007        else
23008          # Otherwise we believe it is a complete path. Use it as it is.
23009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23010$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23012$as_echo_n "checking for TIME... " >&6; }
23013          if test ! -x "$tool_specified"; then
23014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23015$as_echo "not found" >&6; }
23016            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23017          fi
23018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23019$as_echo "$tool_specified" >&6; }
23020        fi
23021      fi
23022    fi
23023
23024  fi
23025
23026
23027
23028
23029  # Publish this variable in the help.
23030
23031
23032  if [ -z "${FLOCK+x}" ]; then
23033    # The variable is not set by user, try to locate tool using the code snippet
23034    for ac_prog in flock
23035do
23036  # Extract the first word of "$ac_prog", so it can be a program name with args.
23037set dummy $ac_prog; ac_word=$2
23038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23039$as_echo_n "checking for $ac_word... " >&6; }
23040if ${ac_cv_path_FLOCK+:} false; then :
23041  $as_echo_n "(cached) " >&6
23042else
23043  case $FLOCK in
23044  [\\/]* | ?:[\\/]*)
23045  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23046  ;;
23047  *)
23048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23049for as_dir in $PATH
23050do
23051  IFS=$as_save_IFS
23052  test -z "$as_dir" && as_dir=.
23053    for ac_exec_ext in '' $ac_executable_extensions; do
23054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23055    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23057    break 2
23058  fi
23059done
23060  done
23061IFS=$as_save_IFS
23062
23063  ;;
23064esac
23065fi
23066FLOCK=$ac_cv_path_FLOCK
23067if test -n "$FLOCK"; then
23068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23069$as_echo "$FLOCK" >&6; }
23070else
23071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23072$as_echo "no" >&6; }
23073fi
23074
23075
23076  test -n "$FLOCK" && break
23077done
23078
23079  else
23080    # The variable is set, but is it from the command line or the environment?
23081
23082    # Try to remove the string !FLOCK! from our list.
23083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23085      # If it failed, the variable was not from the command line. Ignore it,
23086      # but warn the user (except for BASH, which is always set by the calling BASH).
23087      if test "xFLOCK" != xBASH; then
23088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23089$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23090      fi
23091      # Try to locate tool using the code snippet
23092      for ac_prog in flock
23093do
23094  # Extract the first word of "$ac_prog", so it can be a program name with args.
23095set dummy $ac_prog; ac_word=$2
23096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23097$as_echo_n "checking for $ac_word... " >&6; }
23098if ${ac_cv_path_FLOCK+:} false; then :
23099  $as_echo_n "(cached) " >&6
23100else
23101  case $FLOCK in
23102  [\\/]* | ?:[\\/]*)
23103  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23104  ;;
23105  *)
23106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23107for as_dir in $PATH
23108do
23109  IFS=$as_save_IFS
23110  test -z "$as_dir" && as_dir=.
23111    for ac_exec_ext in '' $ac_executable_extensions; do
23112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23113    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23115    break 2
23116  fi
23117done
23118  done
23119IFS=$as_save_IFS
23120
23121  ;;
23122esac
23123fi
23124FLOCK=$ac_cv_path_FLOCK
23125if test -n "$FLOCK"; then
23126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23127$as_echo "$FLOCK" >&6; }
23128else
23129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23130$as_echo "no" >&6; }
23131fi
23132
23133
23134  test -n "$FLOCK" && break
23135done
23136
23137    else
23138      # If it succeeded, then it was overridden by the user. We will use it
23139      # for the tool.
23140
23141      # First remove it from the list of overridden variables, so we can test
23142      # for unknown variables in the end.
23143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23144
23145      # Check if we try to supply an empty value
23146      if test "x$FLOCK" = x; then
23147        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23148$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23150$as_echo_n "checking for FLOCK... " >&6; }
23151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23152$as_echo "disabled" >&6; }
23153      else
23154        # Check if the provided tool contains a complete path.
23155        tool_specified="$FLOCK"
23156        tool_basename="${tool_specified##*/}"
23157        if test "x$tool_basename" = "x$tool_specified"; then
23158          # A command without a complete path is provided, search $PATH.
23159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23160$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23161          # Extract the first word of "$tool_basename", so it can be a program name with args.
23162set dummy $tool_basename; ac_word=$2
23163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23164$as_echo_n "checking for $ac_word... " >&6; }
23165if ${ac_cv_path_FLOCK+:} false; then :
23166  $as_echo_n "(cached) " >&6
23167else
23168  case $FLOCK in
23169  [\\/]* | ?:[\\/]*)
23170  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23171  ;;
23172  *)
23173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23174for as_dir in $PATH
23175do
23176  IFS=$as_save_IFS
23177  test -z "$as_dir" && as_dir=.
23178    for ac_exec_ext in '' $ac_executable_extensions; do
23179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23180    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23182    break 2
23183  fi
23184done
23185  done
23186IFS=$as_save_IFS
23187
23188  ;;
23189esac
23190fi
23191FLOCK=$ac_cv_path_FLOCK
23192if test -n "$FLOCK"; then
23193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23194$as_echo "$FLOCK" >&6; }
23195else
23196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23197$as_echo "no" >&6; }
23198fi
23199
23200
23201          if test "x$FLOCK" = x; then
23202            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23203          fi
23204        else
23205          # Otherwise we believe it is a complete path. Use it as it is.
23206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23207$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23208          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23209$as_echo_n "checking for FLOCK... " >&6; }
23210          if test ! -x "$tool_specified"; then
23211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23212$as_echo "not found" >&6; }
23213            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23214          fi
23215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23216$as_echo "$tool_specified" >&6; }
23217        fi
23218      fi
23219    fi
23220
23221  fi
23222
23223
23224  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23225  # be in the user path.
23226
23227
23228  # Publish this variable in the help.
23229
23230
23231  if [ -z "${DTRACE+x}" ]; then
23232    # The variable is not set by user, try to locate tool using the code snippet
23233    for ac_prog in dtrace
23234do
23235  # Extract the first word of "$ac_prog", so it can be a program name with args.
23236set dummy $ac_prog; ac_word=$2
23237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23238$as_echo_n "checking for $ac_word... " >&6; }
23239if ${ac_cv_path_DTRACE+:} false; then :
23240  $as_echo_n "(cached) " >&6
23241else
23242  case $DTRACE in
23243  [\\/]* | ?:[\\/]*)
23244  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23245  ;;
23246  *)
23247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23248as_dummy="$PATH:/usr/sbin"
23249for as_dir in $as_dummy
23250do
23251  IFS=$as_save_IFS
23252  test -z "$as_dir" && as_dir=.
23253    for ac_exec_ext in '' $ac_executable_extensions; do
23254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23255    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23257    break 2
23258  fi
23259done
23260  done
23261IFS=$as_save_IFS
23262
23263  ;;
23264esac
23265fi
23266DTRACE=$ac_cv_path_DTRACE
23267if test -n "$DTRACE"; then
23268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23269$as_echo "$DTRACE" >&6; }
23270else
23271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23272$as_echo "no" >&6; }
23273fi
23274
23275
23276  test -n "$DTRACE" && break
23277done
23278
23279  else
23280    # The variable is set, but is it from the command line or the environment?
23281
23282    # Try to remove the string !DTRACE! from our list.
23283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23285      # If it failed, the variable was not from the command line. Ignore it,
23286      # but warn the user (except for BASH, which is always set by the calling BASH).
23287      if test "xDTRACE" != xBASH; then
23288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23289$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23290      fi
23291      # Try to locate tool using the code snippet
23292      for ac_prog in dtrace
23293do
23294  # Extract the first word of "$ac_prog", so it can be a program name with args.
23295set dummy $ac_prog; ac_word=$2
23296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23297$as_echo_n "checking for $ac_word... " >&6; }
23298if ${ac_cv_path_DTRACE+:} false; then :
23299  $as_echo_n "(cached) " >&6
23300else
23301  case $DTRACE in
23302  [\\/]* | ?:[\\/]*)
23303  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23304  ;;
23305  *)
23306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23307as_dummy="$PATH:/usr/sbin"
23308for as_dir in $as_dummy
23309do
23310  IFS=$as_save_IFS
23311  test -z "$as_dir" && as_dir=.
23312    for ac_exec_ext in '' $ac_executable_extensions; do
23313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23314    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23316    break 2
23317  fi
23318done
23319  done
23320IFS=$as_save_IFS
23321
23322  ;;
23323esac
23324fi
23325DTRACE=$ac_cv_path_DTRACE
23326if test -n "$DTRACE"; then
23327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23328$as_echo "$DTRACE" >&6; }
23329else
23330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23331$as_echo "no" >&6; }
23332fi
23333
23334
23335  test -n "$DTRACE" && break
23336done
23337
23338    else
23339      # If it succeeded, then it was overridden by the user. We will use it
23340      # for the tool.
23341
23342      # First remove it from the list of overridden variables, so we can test
23343      # for unknown variables in the end.
23344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23345
23346      # Check if we try to supply an empty value
23347      if test "x$DTRACE" = x; then
23348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23349$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23351$as_echo_n "checking for DTRACE... " >&6; }
23352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23353$as_echo "disabled" >&6; }
23354      else
23355        # Check if the provided tool contains a complete path.
23356        tool_specified="$DTRACE"
23357        tool_basename="${tool_specified##*/}"
23358        if test "x$tool_basename" = "x$tool_specified"; then
23359          # A command without a complete path is provided, search $PATH.
23360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23361$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23362          # Extract the first word of "$tool_basename", so it can be a program name with args.
23363set dummy $tool_basename; ac_word=$2
23364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23365$as_echo_n "checking for $ac_word... " >&6; }
23366if ${ac_cv_path_DTRACE+:} false; then :
23367  $as_echo_n "(cached) " >&6
23368else
23369  case $DTRACE in
23370  [\\/]* | ?:[\\/]*)
23371  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23372  ;;
23373  *)
23374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23375for as_dir in $PATH
23376do
23377  IFS=$as_save_IFS
23378  test -z "$as_dir" && as_dir=.
23379    for ac_exec_ext in '' $ac_executable_extensions; do
23380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23381    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23383    break 2
23384  fi
23385done
23386  done
23387IFS=$as_save_IFS
23388
23389  ;;
23390esac
23391fi
23392DTRACE=$ac_cv_path_DTRACE
23393if test -n "$DTRACE"; then
23394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23395$as_echo "$DTRACE" >&6; }
23396else
23397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23398$as_echo "no" >&6; }
23399fi
23400
23401
23402          if test "x$DTRACE" = x; then
23403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23404          fi
23405        else
23406          # Otherwise we believe it is a complete path. Use it as it is.
23407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23408$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23410$as_echo_n "checking for DTRACE... " >&6; }
23411          if test ! -x "$tool_specified"; then
23412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23413$as_echo "not found" >&6; }
23414            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23415          fi
23416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23417$as_echo "$tool_specified" >&6; }
23418        fi
23419      fi
23420    fi
23421
23422  fi
23423
23424
23425
23426
23427  # Publish this variable in the help.
23428
23429
23430  if [ -z "${PATCH+x}" ]; then
23431    # The variable is not set by user, try to locate tool using the code snippet
23432    for ac_prog in gpatch patch
23433do
23434  # Extract the first word of "$ac_prog", so it can be a program name with args.
23435set dummy $ac_prog; ac_word=$2
23436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23437$as_echo_n "checking for $ac_word... " >&6; }
23438if ${ac_cv_path_PATCH+:} false; then :
23439  $as_echo_n "(cached) " >&6
23440else
23441  case $PATCH in
23442  [\\/]* | ?:[\\/]*)
23443  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23444  ;;
23445  *)
23446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23447for as_dir in $PATH
23448do
23449  IFS=$as_save_IFS
23450  test -z "$as_dir" && as_dir=.
23451    for ac_exec_ext in '' $ac_executable_extensions; do
23452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23453    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23455    break 2
23456  fi
23457done
23458  done
23459IFS=$as_save_IFS
23460
23461  ;;
23462esac
23463fi
23464PATCH=$ac_cv_path_PATCH
23465if test -n "$PATCH"; then
23466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23467$as_echo "$PATCH" >&6; }
23468else
23469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23470$as_echo "no" >&6; }
23471fi
23472
23473
23474  test -n "$PATCH" && break
23475done
23476
23477  else
23478    # The variable is set, but is it from the command line or the environment?
23479
23480    # Try to remove the string !PATCH! from our list.
23481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23483      # If it failed, the variable was not from the command line. Ignore it,
23484      # but warn the user (except for BASH, which is always set by the calling BASH).
23485      if test "xPATCH" != xBASH; then
23486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23487$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23488      fi
23489      # Try to locate tool using the code snippet
23490      for ac_prog in gpatch patch
23491do
23492  # Extract the first word of "$ac_prog", so it can be a program name with args.
23493set dummy $ac_prog; ac_word=$2
23494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23495$as_echo_n "checking for $ac_word... " >&6; }
23496if ${ac_cv_path_PATCH+:} false; then :
23497  $as_echo_n "(cached) " >&6
23498else
23499  case $PATCH in
23500  [\\/]* | ?:[\\/]*)
23501  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23502  ;;
23503  *)
23504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23505for as_dir in $PATH
23506do
23507  IFS=$as_save_IFS
23508  test -z "$as_dir" && as_dir=.
23509    for ac_exec_ext in '' $ac_executable_extensions; do
23510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23511    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23513    break 2
23514  fi
23515done
23516  done
23517IFS=$as_save_IFS
23518
23519  ;;
23520esac
23521fi
23522PATCH=$ac_cv_path_PATCH
23523if test -n "$PATCH"; then
23524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23525$as_echo "$PATCH" >&6; }
23526else
23527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23528$as_echo "no" >&6; }
23529fi
23530
23531
23532  test -n "$PATCH" && break
23533done
23534
23535    else
23536      # If it succeeded, then it was overridden by the user. We will use it
23537      # for the tool.
23538
23539      # First remove it from the list of overridden variables, so we can test
23540      # for unknown variables in the end.
23541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23542
23543      # Check if we try to supply an empty value
23544      if test "x$PATCH" = x; then
23545        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23546$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23548$as_echo_n "checking for PATCH... " >&6; }
23549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23550$as_echo "disabled" >&6; }
23551      else
23552        # Check if the provided tool contains a complete path.
23553        tool_specified="$PATCH"
23554        tool_basename="${tool_specified##*/}"
23555        if test "x$tool_basename" = "x$tool_specified"; then
23556          # A command without a complete path is provided, search $PATH.
23557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23558$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23559          # Extract the first word of "$tool_basename", so it can be a program name with args.
23560set dummy $tool_basename; ac_word=$2
23561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23562$as_echo_n "checking for $ac_word... " >&6; }
23563if ${ac_cv_path_PATCH+:} false; then :
23564  $as_echo_n "(cached) " >&6
23565else
23566  case $PATCH in
23567  [\\/]* | ?:[\\/]*)
23568  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23569  ;;
23570  *)
23571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23572for as_dir in $PATH
23573do
23574  IFS=$as_save_IFS
23575  test -z "$as_dir" && as_dir=.
23576    for ac_exec_ext in '' $ac_executable_extensions; do
23577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23578    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23580    break 2
23581  fi
23582done
23583  done
23584IFS=$as_save_IFS
23585
23586  ;;
23587esac
23588fi
23589PATCH=$ac_cv_path_PATCH
23590if test -n "$PATCH"; then
23591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23592$as_echo "$PATCH" >&6; }
23593else
23594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23595$as_echo "no" >&6; }
23596fi
23597
23598
23599          if test "x$PATCH" = x; then
23600            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23601          fi
23602        else
23603          # Otherwise we believe it is a complete path. Use it as it is.
23604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23605$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23606          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23607$as_echo_n "checking for PATCH... " >&6; }
23608          if test ! -x "$tool_specified"; then
23609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23610$as_echo "not found" >&6; }
23611            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23612          fi
23613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23614$as_echo "$tool_specified" >&6; }
23615        fi
23616      fi
23617    fi
23618
23619  fi
23620
23621
23622  # Check if it's GNU time
23623  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23624  if test "x$IS_GNU_TIME" != x; then
23625    IS_GNU_TIME=yes
23626  else
23627    IS_GNU_TIME=no
23628  fi
23629
23630
23631  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23632
23633
23634
23635  # Publish this variable in the help.
23636
23637
23638  if [ -z "${DSYMUTIL+x}" ]; then
23639    # The variable is not set by user, try to locate tool using the code snippet
23640    for ac_prog in dsymutil
23641do
23642  # Extract the first word of "$ac_prog", so it can be a program name with args.
23643set dummy $ac_prog; ac_word=$2
23644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23645$as_echo_n "checking for $ac_word... " >&6; }
23646if ${ac_cv_path_DSYMUTIL+:} false; then :
23647  $as_echo_n "(cached) " >&6
23648else
23649  case $DSYMUTIL in
23650  [\\/]* | ?:[\\/]*)
23651  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23652  ;;
23653  *)
23654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23655for as_dir in $PATH
23656do
23657  IFS=$as_save_IFS
23658  test -z "$as_dir" && as_dir=.
23659    for ac_exec_ext in '' $ac_executable_extensions; do
23660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23661    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23663    break 2
23664  fi
23665done
23666  done
23667IFS=$as_save_IFS
23668
23669  ;;
23670esac
23671fi
23672DSYMUTIL=$ac_cv_path_DSYMUTIL
23673if test -n "$DSYMUTIL"; then
23674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23675$as_echo "$DSYMUTIL" >&6; }
23676else
23677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23678$as_echo "no" >&6; }
23679fi
23680
23681
23682  test -n "$DSYMUTIL" && break
23683done
23684
23685  else
23686    # The variable is set, but is it from the command line or the environment?
23687
23688    # Try to remove the string !DSYMUTIL! from our list.
23689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23691      # If it failed, the variable was not from the command line. Ignore it,
23692      # but warn the user (except for BASH, which is always set by the calling BASH).
23693      if test "xDSYMUTIL" != xBASH; then
23694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23695$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23696      fi
23697      # Try to locate tool using the code snippet
23698      for ac_prog in dsymutil
23699do
23700  # Extract the first word of "$ac_prog", so it can be a program name with args.
23701set dummy $ac_prog; ac_word=$2
23702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23703$as_echo_n "checking for $ac_word... " >&6; }
23704if ${ac_cv_path_DSYMUTIL+:} false; then :
23705  $as_echo_n "(cached) " >&6
23706else
23707  case $DSYMUTIL in
23708  [\\/]* | ?:[\\/]*)
23709  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23710  ;;
23711  *)
23712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23713for as_dir in $PATH
23714do
23715  IFS=$as_save_IFS
23716  test -z "$as_dir" && as_dir=.
23717    for ac_exec_ext in '' $ac_executable_extensions; do
23718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23719    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23721    break 2
23722  fi
23723done
23724  done
23725IFS=$as_save_IFS
23726
23727  ;;
23728esac
23729fi
23730DSYMUTIL=$ac_cv_path_DSYMUTIL
23731if test -n "$DSYMUTIL"; then
23732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23733$as_echo "$DSYMUTIL" >&6; }
23734else
23735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23736$as_echo "no" >&6; }
23737fi
23738
23739
23740  test -n "$DSYMUTIL" && break
23741done
23742
23743    else
23744      # If it succeeded, then it was overridden by the user. We will use it
23745      # for the tool.
23746
23747      # First remove it from the list of overridden variables, so we can test
23748      # for unknown variables in the end.
23749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23750
23751      # Check if we try to supply an empty value
23752      if test "x$DSYMUTIL" = x; then
23753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23754$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23756$as_echo_n "checking for DSYMUTIL... " >&6; }
23757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23758$as_echo "disabled" >&6; }
23759      else
23760        # Check if the provided tool contains a complete path.
23761        tool_specified="$DSYMUTIL"
23762        tool_basename="${tool_specified##*/}"
23763        if test "x$tool_basename" = "x$tool_specified"; then
23764          # A command without a complete path is provided, search $PATH.
23765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23766$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23767          # Extract the first word of "$tool_basename", so it can be a program name with args.
23768set dummy $tool_basename; ac_word=$2
23769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23770$as_echo_n "checking for $ac_word... " >&6; }
23771if ${ac_cv_path_DSYMUTIL+:} false; then :
23772  $as_echo_n "(cached) " >&6
23773else
23774  case $DSYMUTIL in
23775  [\\/]* | ?:[\\/]*)
23776  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23777  ;;
23778  *)
23779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23780for as_dir in $PATH
23781do
23782  IFS=$as_save_IFS
23783  test -z "$as_dir" && as_dir=.
23784    for ac_exec_ext in '' $ac_executable_extensions; do
23785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23786    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23788    break 2
23789  fi
23790done
23791  done
23792IFS=$as_save_IFS
23793
23794  ;;
23795esac
23796fi
23797DSYMUTIL=$ac_cv_path_DSYMUTIL
23798if test -n "$DSYMUTIL"; then
23799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23800$as_echo "$DSYMUTIL" >&6; }
23801else
23802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23803$as_echo "no" >&6; }
23804fi
23805
23806
23807          if test "x$DSYMUTIL" = x; then
23808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23809          fi
23810        else
23811          # Otherwise we believe it is a complete path. Use it as it is.
23812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23813$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23815$as_echo_n "checking for DSYMUTIL... " >&6; }
23816          if test ! -x "$tool_specified"; then
23817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23818$as_echo "not found" >&6; }
23819            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23820          fi
23821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23822$as_echo "$tool_specified" >&6; }
23823        fi
23824      fi
23825    fi
23826
23827  fi
23828
23829
23830
23831  if test "x$DSYMUTIL" = x; then
23832    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23833  fi
23834
23835
23836
23837
23838
23839  # Publish this variable in the help.
23840
23841
23842  if [ -z "${XATTR+x}" ]; then
23843    # The variable is not set by user, try to locate tool using the code snippet
23844    for ac_prog in xattr
23845do
23846  # Extract the first word of "$ac_prog", so it can be a program name with args.
23847set dummy $ac_prog; ac_word=$2
23848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23849$as_echo_n "checking for $ac_word... " >&6; }
23850if ${ac_cv_path_XATTR+:} false; then :
23851  $as_echo_n "(cached) " >&6
23852else
23853  case $XATTR in
23854  [\\/]* | ?:[\\/]*)
23855  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23856  ;;
23857  *)
23858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23859for as_dir in $PATH
23860do
23861  IFS=$as_save_IFS
23862  test -z "$as_dir" && as_dir=.
23863    for ac_exec_ext in '' $ac_executable_extensions; do
23864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23865    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23867    break 2
23868  fi
23869done
23870  done
23871IFS=$as_save_IFS
23872
23873  ;;
23874esac
23875fi
23876XATTR=$ac_cv_path_XATTR
23877if test -n "$XATTR"; then
23878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23879$as_echo "$XATTR" >&6; }
23880else
23881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23882$as_echo "no" >&6; }
23883fi
23884
23885
23886  test -n "$XATTR" && break
23887done
23888
23889  else
23890    # The variable is set, but is it from the command line or the environment?
23891
23892    # Try to remove the string !XATTR! from our list.
23893    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23894    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23895      # If it failed, the variable was not from the command line. Ignore it,
23896      # but warn the user (except for BASH, which is always set by the calling BASH).
23897      if test "xXATTR" != xBASH; then
23898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23899$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23900      fi
23901      # Try to locate tool using the code snippet
23902      for ac_prog in xattr
23903do
23904  # Extract the first word of "$ac_prog", so it can be a program name with args.
23905set dummy $ac_prog; ac_word=$2
23906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23907$as_echo_n "checking for $ac_word... " >&6; }
23908if ${ac_cv_path_XATTR+:} false; then :
23909  $as_echo_n "(cached) " >&6
23910else
23911  case $XATTR in
23912  [\\/]* | ?:[\\/]*)
23913  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23914  ;;
23915  *)
23916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23917for as_dir in $PATH
23918do
23919  IFS=$as_save_IFS
23920  test -z "$as_dir" && as_dir=.
23921    for ac_exec_ext in '' $ac_executable_extensions; do
23922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23923    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23925    break 2
23926  fi
23927done
23928  done
23929IFS=$as_save_IFS
23930
23931  ;;
23932esac
23933fi
23934XATTR=$ac_cv_path_XATTR
23935if test -n "$XATTR"; then
23936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23937$as_echo "$XATTR" >&6; }
23938else
23939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23940$as_echo "no" >&6; }
23941fi
23942
23943
23944  test -n "$XATTR" && break
23945done
23946
23947    else
23948      # If it succeeded, then it was overridden by the user. We will use it
23949      # for the tool.
23950
23951      # First remove it from the list of overridden variables, so we can test
23952      # for unknown variables in the end.
23953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23954
23955      # Check if we try to supply an empty value
23956      if test "x$XATTR" = x; then
23957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23958$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23960$as_echo_n "checking for XATTR... " >&6; }
23961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23962$as_echo "disabled" >&6; }
23963      else
23964        # Check if the provided tool contains a complete path.
23965        tool_specified="$XATTR"
23966        tool_basename="${tool_specified##*/}"
23967        if test "x$tool_basename" = "x$tool_specified"; then
23968          # A command without a complete path is provided, search $PATH.
23969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23970$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23971          # Extract the first word of "$tool_basename", so it can be a program name with args.
23972set dummy $tool_basename; ac_word=$2
23973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23974$as_echo_n "checking for $ac_word... " >&6; }
23975if ${ac_cv_path_XATTR+:} false; then :
23976  $as_echo_n "(cached) " >&6
23977else
23978  case $XATTR in
23979  [\\/]* | ?:[\\/]*)
23980  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23981  ;;
23982  *)
23983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23984for as_dir in $PATH
23985do
23986  IFS=$as_save_IFS
23987  test -z "$as_dir" && as_dir=.
23988    for ac_exec_ext in '' $ac_executable_extensions; do
23989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23990    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23992    break 2
23993  fi
23994done
23995  done
23996IFS=$as_save_IFS
23997
23998  ;;
23999esac
24000fi
24001XATTR=$ac_cv_path_XATTR
24002if test -n "$XATTR"; then
24003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24004$as_echo "$XATTR" >&6; }
24005else
24006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24007$as_echo "no" >&6; }
24008fi
24009
24010
24011          if test "x$XATTR" = x; then
24012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24013          fi
24014        else
24015          # Otherwise we believe it is a complete path. Use it as it is.
24016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24017$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24019$as_echo_n "checking for XATTR... " >&6; }
24020          if test ! -x "$tool_specified"; then
24021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24022$as_echo "not found" >&6; }
24023            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24024          fi
24025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24026$as_echo "$tool_specified" >&6; }
24027        fi
24028      fi
24029    fi
24030
24031  fi
24032
24033
24034
24035  if test "x$XATTR" = x; then
24036    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24037  fi
24038
24039
24040
24041
24042  # Publish this variable in the help.
24043
24044
24045  if [ -z "${CODESIGN+x}" ]; then
24046    # The variable is not set by user, try to locate tool using the code snippet
24047    for ac_prog in codesign
24048do
24049  # Extract the first word of "$ac_prog", so it can be a program name with args.
24050set dummy $ac_prog; ac_word=$2
24051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24052$as_echo_n "checking for $ac_word... " >&6; }
24053if ${ac_cv_path_CODESIGN+:} false; then :
24054  $as_echo_n "(cached) " >&6
24055else
24056  case $CODESIGN in
24057  [\\/]* | ?:[\\/]*)
24058  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24059  ;;
24060  *)
24061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24062for as_dir in $PATH
24063do
24064  IFS=$as_save_IFS
24065  test -z "$as_dir" && as_dir=.
24066    for ac_exec_ext in '' $ac_executable_extensions; do
24067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24068    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24070    break 2
24071  fi
24072done
24073  done
24074IFS=$as_save_IFS
24075
24076  ;;
24077esac
24078fi
24079CODESIGN=$ac_cv_path_CODESIGN
24080if test -n "$CODESIGN"; then
24081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24082$as_echo "$CODESIGN" >&6; }
24083else
24084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24085$as_echo "no" >&6; }
24086fi
24087
24088
24089  test -n "$CODESIGN" && break
24090done
24091
24092  else
24093    # The variable is set, but is it from the command line or the environment?
24094
24095    # Try to remove the string !CODESIGN! from our list.
24096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24098      # If it failed, the variable was not from the command line. Ignore it,
24099      # but warn the user (except for BASH, which is always set by the calling BASH).
24100      if test "xCODESIGN" != xBASH; then
24101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24102$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24103      fi
24104      # Try to locate tool using the code snippet
24105      for ac_prog in codesign
24106do
24107  # Extract the first word of "$ac_prog", so it can be a program name with args.
24108set dummy $ac_prog; ac_word=$2
24109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24110$as_echo_n "checking for $ac_word... " >&6; }
24111if ${ac_cv_path_CODESIGN+:} false; then :
24112  $as_echo_n "(cached) " >&6
24113else
24114  case $CODESIGN in
24115  [\\/]* | ?:[\\/]*)
24116  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24117  ;;
24118  *)
24119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24120for as_dir in $PATH
24121do
24122  IFS=$as_save_IFS
24123  test -z "$as_dir" && as_dir=.
24124    for ac_exec_ext in '' $ac_executable_extensions; do
24125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24126    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24128    break 2
24129  fi
24130done
24131  done
24132IFS=$as_save_IFS
24133
24134  ;;
24135esac
24136fi
24137CODESIGN=$ac_cv_path_CODESIGN
24138if test -n "$CODESIGN"; then
24139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24140$as_echo "$CODESIGN" >&6; }
24141else
24142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24143$as_echo "no" >&6; }
24144fi
24145
24146
24147  test -n "$CODESIGN" && break
24148done
24149
24150    else
24151      # If it succeeded, then it was overridden by the user. We will use it
24152      # for the tool.
24153
24154      # First remove it from the list of overridden variables, so we can test
24155      # for unknown variables in the end.
24156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24157
24158      # Check if we try to supply an empty value
24159      if test "x$CODESIGN" = x; then
24160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24161$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24163$as_echo_n "checking for CODESIGN... " >&6; }
24164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24165$as_echo "disabled" >&6; }
24166      else
24167        # Check if the provided tool contains a complete path.
24168        tool_specified="$CODESIGN"
24169        tool_basename="${tool_specified##*/}"
24170        if test "x$tool_basename" = "x$tool_specified"; then
24171          # A command without a complete path is provided, search $PATH.
24172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24173$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24174          # Extract the first word of "$tool_basename", so it can be a program name with args.
24175set dummy $tool_basename; ac_word=$2
24176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24177$as_echo_n "checking for $ac_word... " >&6; }
24178if ${ac_cv_path_CODESIGN+:} false; then :
24179  $as_echo_n "(cached) " >&6
24180else
24181  case $CODESIGN in
24182  [\\/]* | ?:[\\/]*)
24183  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24184  ;;
24185  *)
24186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24187for as_dir in $PATH
24188do
24189  IFS=$as_save_IFS
24190  test -z "$as_dir" && as_dir=.
24191    for ac_exec_ext in '' $ac_executable_extensions; do
24192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24193    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24195    break 2
24196  fi
24197done
24198  done
24199IFS=$as_save_IFS
24200
24201  ;;
24202esac
24203fi
24204CODESIGN=$ac_cv_path_CODESIGN
24205if test -n "$CODESIGN"; then
24206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24207$as_echo "$CODESIGN" >&6; }
24208else
24209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24210$as_echo "no" >&6; }
24211fi
24212
24213
24214          if test "x$CODESIGN" = x; then
24215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24216          fi
24217        else
24218          # Otherwise we believe it is a complete path. Use it as it is.
24219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24220$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24222$as_echo_n "checking for CODESIGN... " >&6; }
24223          if test ! -x "$tool_specified"; then
24224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24225$as_echo "not found" >&6; }
24226            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24227          fi
24228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24229$as_echo "$tool_specified" >&6; }
24230        fi
24231      fi
24232    fi
24233
24234  fi
24235
24236
24237    if test "x$CODESIGN" != "x"; then
24238      # Verify that the openjdk_codesign certificate is present
24239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24240$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24241      $RM codesign-testfile
24242      $TOUCH codesign-testfile
24243      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24244      $RM codesign-testfile
24245      if test "x$CODESIGN" = x; then
24246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24247$as_echo "no" >&6; }
24248      else
24249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24250$as_echo "yes" >&6; }
24251      fi
24252    fi
24253
24254
24255
24256  # Publish this variable in the help.
24257
24258
24259  if [ -z "${SETFILE+x}" ]; then
24260    # The variable is not set by user, try to locate tool using the code snippet
24261    for ac_prog in SetFile
24262do
24263  # Extract the first word of "$ac_prog", so it can be a program name with args.
24264set dummy $ac_prog; ac_word=$2
24265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24266$as_echo_n "checking for $ac_word... " >&6; }
24267if ${ac_cv_path_SETFILE+:} false; then :
24268  $as_echo_n "(cached) " >&6
24269else
24270  case $SETFILE in
24271  [\\/]* | ?:[\\/]*)
24272  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24273  ;;
24274  *)
24275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24276for as_dir in $PATH
24277do
24278  IFS=$as_save_IFS
24279  test -z "$as_dir" && as_dir=.
24280    for ac_exec_ext in '' $ac_executable_extensions; do
24281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24282    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24284    break 2
24285  fi
24286done
24287  done
24288IFS=$as_save_IFS
24289
24290  ;;
24291esac
24292fi
24293SETFILE=$ac_cv_path_SETFILE
24294if test -n "$SETFILE"; then
24295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24296$as_echo "$SETFILE" >&6; }
24297else
24298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24299$as_echo "no" >&6; }
24300fi
24301
24302
24303  test -n "$SETFILE" && break
24304done
24305
24306  else
24307    # The variable is set, but is it from the command line or the environment?
24308
24309    # Try to remove the string !SETFILE! from our list.
24310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24312      # If it failed, the variable was not from the command line. Ignore it,
24313      # but warn the user (except for BASH, which is always set by the calling BASH).
24314      if test "xSETFILE" != xBASH; then
24315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24316$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24317      fi
24318      # Try to locate tool using the code snippet
24319      for ac_prog in SetFile
24320do
24321  # Extract the first word of "$ac_prog", so it can be a program name with args.
24322set dummy $ac_prog; ac_word=$2
24323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24324$as_echo_n "checking for $ac_word... " >&6; }
24325if ${ac_cv_path_SETFILE+:} false; then :
24326  $as_echo_n "(cached) " >&6
24327else
24328  case $SETFILE in
24329  [\\/]* | ?:[\\/]*)
24330  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24331  ;;
24332  *)
24333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24334for as_dir in $PATH
24335do
24336  IFS=$as_save_IFS
24337  test -z "$as_dir" && as_dir=.
24338    for ac_exec_ext in '' $ac_executable_extensions; do
24339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24340    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24342    break 2
24343  fi
24344done
24345  done
24346IFS=$as_save_IFS
24347
24348  ;;
24349esac
24350fi
24351SETFILE=$ac_cv_path_SETFILE
24352if test -n "$SETFILE"; then
24353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24354$as_echo "$SETFILE" >&6; }
24355else
24356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24357$as_echo "no" >&6; }
24358fi
24359
24360
24361  test -n "$SETFILE" && break
24362done
24363
24364    else
24365      # If it succeeded, then it was overridden by the user. We will use it
24366      # for the tool.
24367
24368      # First remove it from the list of overridden variables, so we can test
24369      # for unknown variables in the end.
24370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24371
24372      # Check if we try to supply an empty value
24373      if test "x$SETFILE" = x; then
24374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24375$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24377$as_echo_n "checking for SETFILE... " >&6; }
24378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24379$as_echo "disabled" >&6; }
24380      else
24381        # Check if the provided tool contains a complete path.
24382        tool_specified="$SETFILE"
24383        tool_basename="${tool_specified##*/}"
24384        if test "x$tool_basename" = "x$tool_specified"; then
24385          # A command without a complete path is provided, search $PATH.
24386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24387$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24388          # Extract the first word of "$tool_basename", so it can be a program name with args.
24389set dummy $tool_basename; ac_word=$2
24390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24391$as_echo_n "checking for $ac_word... " >&6; }
24392if ${ac_cv_path_SETFILE+:} false; then :
24393  $as_echo_n "(cached) " >&6
24394else
24395  case $SETFILE in
24396  [\\/]* | ?:[\\/]*)
24397  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24398  ;;
24399  *)
24400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24401for as_dir in $PATH
24402do
24403  IFS=$as_save_IFS
24404  test -z "$as_dir" && as_dir=.
24405    for ac_exec_ext in '' $ac_executable_extensions; do
24406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24407    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24409    break 2
24410  fi
24411done
24412  done
24413IFS=$as_save_IFS
24414
24415  ;;
24416esac
24417fi
24418SETFILE=$ac_cv_path_SETFILE
24419if test -n "$SETFILE"; then
24420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24421$as_echo "$SETFILE" >&6; }
24422else
24423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24424$as_echo "no" >&6; }
24425fi
24426
24427
24428          if test "x$SETFILE" = x; then
24429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24430          fi
24431        else
24432          # Otherwise we believe it is a complete path. Use it as it is.
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24434$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24436$as_echo_n "checking for SETFILE... " >&6; }
24437          if test ! -x "$tool_specified"; then
24438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24439$as_echo "not found" >&6; }
24440            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24441          fi
24442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24443$as_echo "$tool_specified" >&6; }
24444        fi
24445      fi
24446    fi
24447
24448  fi
24449
24450
24451
24452  if test "x$SETFILE" = x; then
24453    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24454  fi
24455
24456
24457  fi
24458
24459
24460  # Check bash version
24461  # Extra [ ] to stop m4 mangling
24462   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24464$as_echo_n "checking bash version... " >&6; }
24465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24466$as_echo "$BASH_VER" >&6; }
24467
24468  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24469  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24470  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24471    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24472  fi
24473
24474  # Test if bash supports pipefail.
24475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24476$as_echo_n "checking if bash supports pipefail... " >&6; }
24477  if ${BASH} -c 'set -o pipefail'; then
24478    BASH_ARGS="$BASH_ARGS -o pipefail"
24479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24480$as_echo "yes" >&6; }
24481  else
24482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24483$as_echo "no" >&6; }
24484  fi
24485
24486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24487$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24488  if ${BASH} -e -c 'true'; then
24489    BASH_ARGS="$BASH_ARGS -e"
24490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24491$as_echo "yes" >&6; }
24492  else
24493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24494$as_echo "no" >&6; }
24495  fi
24496
24497
24498
24499
24500# Check if pkg-config is available.
24501
24502
24503if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24504	if test -n "$ac_tool_prefix"; then
24505  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24506set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24508$as_echo_n "checking for $ac_word... " >&6; }
24509if ${ac_cv_path_PKG_CONFIG+:} false; then :
24510  $as_echo_n "(cached) " >&6
24511else
24512  case $PKG_CONFIG in
24513  [\\/]* | ?:[\\/]*)
24514  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24515  ;;
24516  *)
24517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24518for as_dir in $PATH
24519do
24520  IFS=$as_save_IFS
24521  test -z "$as_dir" && as_dir=.
24522    for ac_exec_ext in '' $ac_executable_extensions; do
24523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24524    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24526    break 2
24527  fi
24528done
24529  done
24530IFS=$as_save_IFS
24531
24532  ;;
24533esac
24534fi
24535PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24536if test -n "$PKG_CONFIG"; then
24537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24538$as_echo "$PKG_CONFIG" >&6; }
24539else
24540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24541$as_echo "no" >&6; }
24542fi
24543
24544
24545fi
24546if test -z "$ac_cv_path_PKG_CONFIG"; then
24547  ac_pt_PKG_CONFIG=$PKG_CONFIG
24548  # Extract the first word of "pkg-config", so it can be a program name with args.
24549set dummy pkg-config; ac_word=$2
24550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24551$as_echo_n "checking for $ac_word... " >&6; }
24552if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24553  $as_echo_n "(cached) " >&6
24554else
24555  case $ac_pt_PKG_CONFIG in
24556  [\\/]* | ?:[\\/]*)
24557  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24558  ;;
24559  *)
24560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24561for as_dir in $PATH
24562do
24563  IFS=$as_save_IFS
24564  test -z "$as_dir" && as_dir=.
24565    for ac_exec_ext in '' $ac_executable_extensions; do
24566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24567    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24569    break 2
24570  fi
24571done
24572  done
24573IFS=$as_save_IFS
24574
24575  ;;
24576esac
24577fi
24578ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24579if test -n "$ac_pt_PKG_CONFIG"; then
24580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24581$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24582else
24583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24584$as_echo "no" >&6; }
24585fi
24586
24587  if test "x$ac_pt_PKG_CONFIG" = x; then
24588    PKG_CONFIG=""
24589  else
24590    case $cross_compiling:$ac_tool_warned in
24591yes:)
24592{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24593$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24594ac_tool_warned=yes ;;
24595esac
24596    PKG_CONFIG=$ac_pt_PKG_CONFIG
24597  fi
24598else
24599  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24600fi
24601
24602fi
24603if test -n "$PKG_CONFIG"; then
24604	_pkg_min_version=0.9.0
24605	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24606$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24607	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24608		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24609$as_echo "yes" >&6; }
24610	else
24611		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24612$as_echo "no" >&6; }
24613		PKG_CONFIG=""
24614	fi
24615
24616fi
24617
24618# After basic tools have been setup, we can check build os specific details.
24619
24620  ###############################################################################
24621
24622  # Note that this is the build platform OS version!
24623
24624  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24625  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24626  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24627  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24628
24629
24630
24631
24632
24633# Misc basic settings
24634
24635
24636# Check whether --with-default-make-target was given.
24637if test "${with_default_make_target+set}" = set; then :
24638  withval=$with_default_make_target;
24639fi
24640
24641  if test "x$with_default_make_target" = "x" \
24642      || test "x$with_default_make_target" = "xyes"; then
24643    DEFAULT_MAKE_TARGET="exploded-image"
24644  elif test "x$with_default_make_target" = "xno"; then
24645    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24646  else
24647    DEFAULT_MAKE_TARGET="$with_default_make_target"
24648  fi
24649
24650
24651
24652
24653###############################################################################
24654#
24655# Determine OpenJDK variants, options and version numbers.
24656#
24657###############################################################################
24658
24659# We need build & target for this.
24660
24661  # Should we build a JDK without a graphical UI?
24662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24663$as_echo_n "checking headless only... " >&6; }
24664  # Check whether --enable-headless-only was given.
24665if test "${enable_headless_only+set}" = set; then :
24666  enableval=$enable_headless_only;
24667fi
24668
24669
24670  if test "x$enable_headless_only" = "xyes"; then
24671    ENABLE_HEADLESS_ONLY="true"
24672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24673$as_echo "yes" >&6; }
24674  elif test "x$enable_headless_only" = "xno"; then
24675    ENABLE_HEADLESS_ONLY="false"
24676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24677$as_echo "no" >&6; }
24678  elif test "x$enable_headless_only" = "x"; then
24679    ENABLE_HEADLESS_ONLY="false"
24680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24681$as_echo "no" >&6; }
24682  else
24683    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24684  fi
24685
24686
24687
24688  # Choose cacerts source file
24689
24690# Check whether --with-cacerts-file was given.
24691if test "${with_cacerts_file+set}" = set; then :
24692  withval=$with_cacerts_file;
24693fi
24694
24695  if test "x$with_cacerts_file" != x; then
24696    CACERTS_FILE=$with_cacerts_file
24697  fi
24698
24699
24700  # Enable or disable unlimited crypto
24701  # Check whether --enable-unlimited-crypto was given.
24702if test "${enable_unlimited_crypto+set}" = set; then :
24703  enableval=$enable_unlimited_crypto;
24704else
24705  enable_unlimited_crypto=yes
24706fi
24707
24708  if test "x$enable_unlimited_crypto" = "xyes"; then
24709    UNLIMITED_CRYPTO=true
24710  else
24711    UNLIMITED_CRYPTO=false
24712  fi
24713
24714
24715  # Should we build the serviceability agent (SA)?
24716  INCLUDE_SA=true
24717  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24718    INCLUDE_SA=false
24719  fi
24720  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24721    INCLUDE_SA=false
24722  fi
24723
24724
24725  # Compress jars
24726  COMPRESS_JARS=false
24727
24728
24729
24730  # Setup default copyright year. Mostly overridden when building close to a new year.
24731
24732# Check whether --with-copyright-year was given.
24733if test "${with_copyright_year+set}" = set; then :
24734  withval=$with_copyright_year;
24735fi
24736
24737  if test "x$with_copyright_year" = xyes; then
24738    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24739  elif test "x$with_copyright_year" != x; then
24740    COPYRIGHT_YEAR="$with_copyright_year"
24741  else
24742    COPYRIGHT_YEAR=`$DATE +'%Y'`
24743  fi
24744
24745
24746
24747  # Check whether --enable-keep-packaged-modules was given.
24748if test "${enable_keep_packaged_modules+set}" = set; then :
24749  enableval=$enable_keep_packaged_modules;
24750fi
24751
24752
24753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24754$as_echo_n "checking if packaged modules are kept... " >&6; }
24755  if test "x$enable_keep_packaged_modules" = "xyes"; then
24756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24757$as_echo "yes" >&6; }
24758    JLINK_KEEP_PACKAGED_MODULES=true
24759  elif test "x$enable_keep_packaged_modules" = "xno"; then
24760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24761$as_echo "no" >&6; }
24762    JLINK_KEEP_PACKAGED_MODULES=false
24763  elif test "x$enable_keep_packaged_modules" = "x"; then
24764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24765$as_echo "yes (default)" >&6; }
24766    JLINK_KEEP_PACKAGED_MODULES=true
24767  else
24768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24769$as_echo "error" >&6; }
24770    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24771  fi
24772
24773
24774
24775
24776  # Warn user that old version arguments are deprecated.
24777
24778
24779# Check whether --with-milestone was given.
24780if test "${with_milestone+set}" = set; then :
24781  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24782$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24783fi
24784
24785
24786
24787
24788# Check whether --with-update-version was given.
24789if test "${with_update_version+set}" = set; then :
24790  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24791$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24792fi
24793
24794
24795
24796
24797# Check whether --with-user-release-suffix was given.
24798if test "${with_user_release_suffix+set}" = set; then :
24799  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
24800$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24801fi
24802
24803
24804
24805
24806# Check whether --with-build-number was given.
24807if test "${with_build_number+set}" = set; then :
24808  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24809$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24810fi
24811
24812
24813
24814  # Source the version numbers file
24815  . $AUTOCONF_DIR/version-numbers
24816
24817  # Some non-version number information is set in that file
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827  # Override version from arguments
24828
24829  # If --with-version-string is set, process it first. It is possible to
24830  # override parts with more specific flags, since these are processed later.
24831
24832# Check whether --with-version-string was given.
24833if test "${with_version_string+set}" = set; then :
24834  withval=$with_version_string;
24835fi
24836
24837  if test "x$with_version_string" = xyes; then
24838    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24839  elif test "x$with_version_string" != x; then
24840    # Additional [] needed to keep m4 from mangling shell constructs.
24841    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24842      VERSION_MAJOR=${BASH_REMATCH[1]}
24843      VERSION_MINOR=${BASH_REMATCH[3]}
24844      VERSION_SECURITY=${BASH_REMATCH[5]}
24845      VERSION_PATCH=${BASH_REMATCH[7]}
24846      VERSION_PRE=${BASH_REMATCH[9]}
24847      version_plus_separator=${BASH_REMATCH[11]}
24848      VERSION_BUILD=${BASH_REMATCH[12]}
24849      VERSION_OPT=${BASH_REMATCH[14]}
24850      # Unspecified numerical fields are interpreted as 0.
24851      if test "x$VERSION_MINOR" = x; then
24852        VERSION_MINOR=0
24853      fi
24854      if test "x$VERSION_SECURITY" = x; then
24855        VERSION_SECURITY=0
24856      fi
24857      if test "x$VERSION_PATCH" = x; then
24858        VERSION_PATCH=0
24859      fi
24860      if test "x$version_plus_separator" != x \
24861          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24862        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24863      fi
24864      # Stop the version part process from setting default values.
24865      # We still allow them to explicitly override though.
24866      NO_DEFAULT_VERSION_PARTS=true
24867    else
24868      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24869    fi
24870  fi
24871
24872
24873# Check whether --with-version-pre was given.
24874if test "${with_version_pre+set}" = set; then :
24875  withval=$with_version_pre; with_version_pre_present=true
24876else
24877  with_version_pre_present=false
24878fi
24879
24880
24881  if test "x$with_version_pre_present" = xtrue; then
24882    if test "x$with_version_pre" = xyes; then
24883      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24884    elif test "x$with_version_pre" = xno; then
24885      # Interpret --without-* as empty string instead of the literal "no"
24886      VERSION_PRE=
24887    else
24888      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24889       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24890      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24892$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24893      fi
24894    fi
24895  else
24896    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24897      # Default is to use "internal" as pre
24898      VERSION_PRE="internal"
24899    fi
24900  fi
24901
24902
24903# Check whether --with-version-opt was given.
24904if test "${with_version_opt+set}" = set; then :
24905  withval=$with_version_opt; with_version_opt_present=true
24906else
24907  with_version_opt_present=false
24908fi
24909
24910
24911  if test "x$with_version_opt_present" = xtrue; then
24912    if test "x$with_version_opt" = xyes; then
24913      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24914    elif test "x$with_version_opt" = xno; then
24915      # Interpret --without-* as empty string instead of the literal "no"
24916      VERSION_OPT=
24917    else
24918      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24919       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24920      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24922$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24923      fi
24924    fi
24925  else
24926    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24927      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24928      # Outer [ ] to quote m4.
24929       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24930      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24931    fi
24932  fi
24933
24934
24935# Check whether --with-version-build was given.
24936if test "${with_version_build+set}" = set; then :
24937  withval=$with_version_build; with_version_build_present=true
24938else
24939  with_version_build_present=false
24940fi
24941
24942
24943  if test "x$with_version_build_present" = xtrue; then
24944    if test "x$with_version_build" = xyes; then
24945      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24946    elif test "x$with_version_build" = xno; then
24947      # Interpret --without-* as empty string instead of the literal "no"
24948      VERSION_BUILD=
24949    elif test "x$with_version_build" = x; then
24950      VERSION_BUILD=
24951    else
24952
24953  # Additional [] needed to keep m4 from mangling shell constructs.
24954  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24955    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24956  fi
24957  # Extract the version number without leading zeros.
24958  cleaned_value=${BASH_REMATCH[1]}
24959  if test "x$cleaned_value" = x; then
24960    # Special case for zero
24961    cleaned_value=${BASH_REMATCH[2]}
24962  fi
24963
24964  if test $cleaned_value -gt 255; then
24965    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24966  fi
24967  if test "x$cleaned_value" != "x$with_version_build"; then
24968    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24969$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24970  fi
24971  VERSION_BUILD=$cleaned_value
24972
24973    fi
24974  else
24975    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24976      # Default is to not have a build number.
24977      VERSION_BUILD=""
24978      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24979      VERSION_BUILD=0
24980    fi
24981  fi
24982
24983
24984# Check whether --with-version-major was given.
24985if test "${with_version_major+set}" = set; then :
24986  withval=$with_version_major; with_version_major_present=true
24987else
24988  with_version_major_present=false
24989fi
24990
24991
24992  if test "x$with_version_major_present" = xtrue; then
24993    if test "x$with_version_major" = xyes; then
24994      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24995    else
24996
24997  # Additional [] needed to keep m4 from mangling shell constructs.
24998  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24999    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25000  fi
25001  # Extract the version number without leading zeros.
25002  cleaned_value=${BASH_REMATCH[1]}
25003  if test "x$cleaned_value" = x; then
25004    # Special case for zero
25005    cleaned_value=${BASH_REMATCH[2]}
25006  fi
25007
25008  if test $cleaned_value -gt 255; then
25009    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25010  fi
25011  if test "x$cleaned_value" != "x$with_version_major"; then
25012    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25013$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25014  fi
25015  VERSION_MAJOR=$cleaned_value
25016
25017    fi
25018  else
25019    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25020      # Default is to get value from version-numbers
25021      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25022    fi
25023  fi
25024
25025
25026# Check whether --with-version-minor was given.
25027if test "${with_version_minor+set}" = set; then :
25028  withval=$with_version_minor; with_version_minor_present=true
25029else
25030  with_version_minor_present=false
25031fi
25032
25033
25034  if test "x$with_version_minor_present" = xtrue; then
25035    if test "x$with_version_minor" = xyes; then
25036      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25037    elif test "x$with_version_minor" = xno; then
25038      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25039      VERSION_MINOR=0
25040    elif test "x$with_version_minor" = x; then
25041      VERSION_MINOR=0
25042    else
25043
25044  # Additional [] needed to keep m4 from mangling shell constructs.
25045  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25046    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25047  fi
25048  # Extract the version number without leading zeros.
25049  cleaned_value=${BASH_REMATCH[1]}
25050  if test "x$cleaned_value" = x; then
25051    # Special case for zero
25052    cleaned_value=${BASH_REMATCH[2]}
25053  fi
25054
25055  if test $cleaned_value -gt 255; then
25056    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25057  fi
25058  if test "x$cleaned_value" != "x$with_version_minor"; then
25059    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25060$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25061  fi
25062  VERSION_MINOR=$cleaned_value
25063
25064    fi
25065  else
25066    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25067      # Default is 0, if unspecified
25068      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25069    fi
25070  fi
25071
25072
25073# Check whether --with-version-security was given.
25074if test "${with_version_security+set}" = set; then :
25075  withval=$with_version_security; with_version_security_present=true
25076else
25077  with_version_security_present=false
25078fi
25079
25080
25081  if test "x$with_version_security_present" = xtrue; then
25082    if test "x$with_version_security" = xyes; then
25083      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25084    elif test "x$with_version_security" = xno; then
25085      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25086      VERSION_SECURITY=0
25087    elif test "x$with_version_security" = x; then
25088      VERSION_SECURITY=0
25089    else
25090
25091  # Additional [] needed to keep m4 from mangling shell constructs.
25092  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25093    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25094  fi
25095  # Extract the version number without leading zeros.
25096  cleaned_value=${BASH_REMATCH[1]}
25097  if test "x$cleaned_value" = x; then
25098    # Special case for zero
25099    cleaned_value=${BASH_REMATCH[2]}
25100  fi
25101
25102  if test $cleaned_value -gt 255; then
25103    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25104  fi
25105  if test "x$cleaned_value" != "x$with_version_security"; then
25106    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25107$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25108  fi
25109  VERSION_SECURITY=$cleaned_value
25110
25111    fi
25112  else
25113    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25114      # Default is 0, if unspecified
25115      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25116    fi
25117  fi
25118
25119
25120# Check whether --with-version-patch was given.
25121if test "${with_version_patch+set}" = set; then :
25122  withval=$with_version_patch; with_version_patch_present=true
25123else
25124  with_version_patch_present=false
25125fi
25126
25127
25128  if test "x$with_version_patch_present" = xtrue; then
25129    if test "x$with_version_patch" = xyes; then
25130      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25131    elif test "x$with_version_patch" = xno; then
25132      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25133      VERSION_PATCH=0
25134    elif test "x$with_version_patch" = x; then
25135      VERSION_PATCH=0
25136    else
25137
25138  # Additional [] needed to keep m4 from mangling shell constructs.
25139  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25140    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25141  fi
25142  # Extract the version number without leading zeros.
25143  cleaned_value=${BASH_REMATCH[1]}
25144  if test "x$cleaned_value" = x; then
25145    # Special case for zero
25146    cleaned_value=${BASH_REMATCH[2]}
25147  fi
25148
25149  if test $cleaned_value -gt 255; then
25150    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25151  fi
25152  if test "x$cleaned_value" != "x$with_version_patch"; then
25153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25154$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25155  fi
25156  VERSION_PATCH=$cleaned_value
25157
25158    fi
25159  else
25160    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25161      # Default is 0, if unspecified
25162      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25163    fi
25164  fi
25165
25166  # Calculate derived version properties
25167
25168  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25169  if test "x$VERSION_PRE" = x; then
25170    VERSION_IS_GA=true
25171  else
25172    VERSION_IS_GA=false
25173  fi
25174
25175  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25176  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25177
25178  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25179  # Strip trailing zeroes from stripped_version_number
25180  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25181  VERSION_NUMBER=$stripped_version_number
25182
25183  # The complete version string, with additional build information
25184  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25185    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25186  else
25187    # If either build or opt is set, we need a + separator
25188    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25189  fi
25190
25191  # The short version string, just VERSION_NUMBER and PRE, if present.
25192  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25193
25194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25195$as_echo_n "checking for version string... " >&6; }
25196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25197$as_echo "$VERSION_STRING" >&6; }
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213###############################################################################
25214#
25215# Setup BootJDK, used to bootstrap the build.
25216#
25217###############################################################################
25218
25219
25220  BOOT_JDK_FOUND=no
25221
25222# Check whether --with-boot-jdk was given.
25223if test "${with_boot_jdk+set}" = set; then :
25224  withval=$with_boot_jdk;
25225fi
25226
25227
25228  # We look for the Boot JDK through various means, going from more certain to
25229  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25230  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25231  # must check if this is indeed valid; otherwise we'll continue looking.
25232
25233  # Test: Is bootjdk explicitly set by command line arguments?
25234
25235  if test "x$BOOT_JDK_FOUND" = xno; then
25236    # Now execute the test
25237
25238  if test "x$with_boot_jdk" != x; then
25239    BOOT_JDK=$with_boot_jdk
25240    BOOT_JDK_FOUND=maybe
25241    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25242$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25243  fi
25244
25245
25246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25248      # Do we have a bin/java?
25249      if test ! -x "$BOOT_JDK/bin/java"; then
25250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25252        BOOT_JDK_FOUND=no
25253      else
25254        # Do we have a bin/javac?
25255        if test ! -x "$BOOT_JDK/bin/javac"; then
25256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25260          BOOT_JDK_FOUND=no
25261        else
25262          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25263          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25264
25265          # Extra M4 quote needed to protect [] in grep expression.
25266          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25267          if test "x$FOUND_CORRECT_VERSION" = x; then
25268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25270            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25271$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25272            BOOT_JDK_FOUND=no
25273          else
25274            # We're done! :-)
25275            BOOT_JDK_FOUND=yes
25276
25277  # Only process if variable expands to non-empty
25278
25279  if test "x$BOOT_JDK" != x; then
25280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25281
25282  # Input might be given as Windows format, start by converting to
25283  # unix format.
25284  path="$BOOT_JDK"
25285  new_path=`$CYGPATH -u "$path"`
25286
25287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25290  # "foo.exe" is OK but "foo" is an error.
25291  #
25292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25293  # It is also a way to make sure we got the proper file name for the real test later on.
25294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25295  if test "x$test_shortpath" = x; then
25296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25299  fi
25300
25301  # Call helper function which possibly converts this using DOS-style short mode.
25302  # If so, the updated path is stored in $new_path.
25303
25304  input_path="$new_path"
25305  # Check if we need to convert this using DOS-style short mode. If the path
25306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25307  # take no chances and rewrite it.
25308  # Note: m4 eats our [], so we need to use [ and ] instead.
25309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25310  if test "x$has_forbidden_chars" != x; then
25311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25315      # Going to short mode and back again did indeed matter. Since short mode is
25316      # case insensitive, let's make it lowercase to improve readability.
25317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25318      # Now convert it back to Unix-style (cygpath)
25319      input_path=`$CYGPATH -u "$shortmode_path"`
25320      new_path="$input_path"
25321    fi
25322  fi
25323
25324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25325  if test "x$test_cygdrive_prefix" = x; then
25326    # As a simple fix, exclude /usr/bin since it's not a real path.
25327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25329      # a path prefixed by /cygdrive for fixpath to work.
25330      new_path="$CYGWIN_ROOT_PATH$input_path"
25331    fi
25332  fi
25333
25334
25335  if test "x$path" != "x$new_path"; then
25336    BOOT_JDK="$new_path"
25337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25339  fi
25340
25341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25342
25343  path="$BOOT_JDK"
25344  has_colon=`$ECHO $path | $GREP ^.:`
25345  new_path="$path"
25346  if test "x$has_colon" = x; then
25347    # Not in mixed or Windows style, start by that.
25348    new_path=`cmd //c echo $path`
25349  fi
25350
25351
25352  input_path="$new_path"
25353  # Check if we need to convert this using DOS-style short mode. If the path
25354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25355  # take no chances and rewrite it.
25356  # Note: m4 eats our [], so we need to use [ and ] instead.
25357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25358  if test "x$has_forbidden_chars" != x; then
25359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25361  fi
25362
25363
25364  windows_path="$new_path"
25365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25366    unix_path=`$CYGPATH -u "$windows_path"`
25367    new_path="$unix_path"
25368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25370    new_path="$unix_path"
25371  fi
25372
25373  if test "x$path" != "x$new_path"; then
25374    BOOT_JDK="$new_path"
25375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25377  fi
25378
25379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25381
25382    else
25383      # We're on a unix platform. Hooray! :)
25384      path="$BOOT_JDK"
25385      has_space=`$ECHO "$path" | $GREP " "`
25386      if test "x$has_space" != x; then
25387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25390      fi
25391
25392      # Use eval to expand a potential ~
25393      eval path="$path"
25394      if test ! -f "$path" && test ! -d "$path"; then
25395        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25396      fi
25397
25398      if test -d "$path"; then
25399        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25400      else
25401        dir="`$DIRNAME "$path"`"
25402        base="`$BASENAME "$path"`"
25403        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25404      fi
25405    fi
25406  fi
25407
25408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25409$as_echo_n "checking for Boot JDK... " >&6; }
25410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25411$as_echo "$BOOT_JDK" >&6; }
25412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25413$as_echo_n "checking Boot JDK version... " >&6; }
25414            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25416$as_echo "$BOOT_JDK_VERSION" >&6; }
25417          fi # end check jdk version
25418        fi # end check javac
25419      fi # end check java
25420    fi # end check boot jdk found
25421  fi
25422
25423  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25424    # Having specified an argument which is incorrect will produce an instant failure;
25425    # we should not go on looking
25426    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25427  fi
25428
25429  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25430
25431  if test "x$BOOT_JDK_FOUND" = xno; then
25432    # Now execute the test
25433
25434  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25435    # First check at user selected default
25436
25437  if test "x$BOOT_JDK_FOUND" = xno; then
25438    # Now execute the test
25439
25440  if test -x /usr/libexec/java_home; then
25441    BOOT_JDK=`/usr/libexec/java_home `
25442    BOOT_JDK_FOUND=maybe
25443    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25444$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25445  fi
25446
25447
25448    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25449    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25450      # Do we have a bin/java?
25451      if test ! -x "$BOOT_JDK/bin/java"; then
25452        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25454        BOOT_JDK_FOUND=no
25455      else
25456        # Do we have a bin/javac?
25457        if test ! -x "$BOOT_JDK/bin/javac"; then
25458          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25460          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25461$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25462          BOOT_JDK_FOUND=no
25463        else
25464          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25465          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25466
25467          # Extra M4 quote needed to protect [] in grep expression.
25468          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25469          if test "x$FOUND_CORRECT_VERSION" = x; then
25470            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25472            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25473$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25474            BOOT_JDK_FOUND=no
25475          else
25476            # We're done! :-)
25477            BOOT_JDK_FOUND=yes
25478
25479  # Only process if variable expands to non-empty
25480
25481  if test "x$BOOT_JDK" != x; then
25482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25483
25484  # Input might be given as Windows format, start by converting to
25485  # unix format.
25486  path="$BOOT_JDK"
25487  new_path=`$CYGPATH -u "$path"`
25488
25489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25492  # "foo.exe" is OK but "foo" is an error.
25493  #
25494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25495  # It is also a way to make sure we got the proper file name for the real test later on.
25496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25497  if test "x$test_shortpath" = x; then
25498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25500    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25501  fi
25502
25503  # Call helper function which possibly converts this using DOS-style short mode.
25504  # If so, the updated path is stored in $new_path.
25505
25506  input_path="$new_path"
25507  # Check if we need to convert this using DOS-style short mode. If the path
25508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25509  # take no chances and rewrite it.
25510  # Note: m4 eats our [], so we need to use [ and ] instead.
25511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25512  if test "x$has_forbidden_chars" != x; then
25513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25517      # Going to short mode and back again did indeed matter. Since short mode is
25518      # case insensitive, let's make it lowercase to improve readability.
25519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25520      # Now convert it back to Unix-style (cygpath)
25521      input_path=`$CYGPATH -u "$shortmode_path"`
25522      new_path="$input_path"
25523    fi
25524  fi
25525
25526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25527  if test "x$test_cygdrive_prefix" = x; then
25528    # As a simple fix, exclude /usr/bin since it's not a real path.
25529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25531      # a path prefixed by /cygdrive for fixpath to work.
25532      new_path="$CYGWIN_ROOT_PATH$input_path"
25533    fi
25534  fi
25535
25536
25537  if test "x$path" != "x$new_path"; then
25538    BOOT_JDK="$new_path"
25539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25541  fi
25542
25543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25544
25545  path="$BOOT_JDK"
25546  has_colon=`$ECHO $path | $GREP ^.:`
25547  new_path="$path"
25548  if test "x$has_colon" = x; then
25549    # Not in mixed or Windows style, start by that.
25550    new_path=`cmd //c echo $path`
25551  fi
25552
25553
25554  input_path="$new_path"
25555  # Check if we need to convert this using DOS-style short mode. If the path
25556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25557  # take no chances and rewrite it.
25558  # Note: m4 eats our [], so we need to use [ and ] instead.
25559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25560  if test "x$has_forbidden_chars" != x; then
25561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25563  fi
25564
25565
25566  windows_path="$new_path"
25567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25568    unix_path=`$CYGPATH -u "$windows_path"`
25569    new_path="$unix_path"
25570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25572    new_path="$unix_path"
25573  fi
25574
25575  if test "x$path" != "x$new_path"; then
25576    BOOT_JDK="$new_path"
25577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25579  fi
25580
25581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25583
25584    else
25585      # We're on a unix platform. Hooray! :)
25586      path="$BOOT_JDK"
25587      has_space=`$ECHO "$path" | $GREP " "`
25588      if test "x$has_space" != x; then
25589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25592      fi
25593
25594      # Use eval to expand a potential ~
25595      eval path="$path"
25596      if test ! -f "$path" && test ! -d "$path"; then
25597        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25598      fi
25599
25600      if test -d "$path"; then
25601        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25602      else
25603        dir="`$DIRNAME "$path"`"
25604        base="`$BASENAME "$path"`"
25605        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25606      fi
25607    fi
25608  fi
25609
25610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25611$as_echo_n "checking for Boot JDK... " >&6; }
25612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25613$as_echo "$BOOT_JDK" >&6; }
25614            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25615$as_echo_n "checking Boot JDK version... " >&6; }
25616            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25618$as_echo "$BOOT_JDK_VERSION" >&6; }
25619          fi # end check jdk version
25620        fi # end check javac
25621      fi # end check java
25622    fi # end check boot jdk found
25623  fi
25624
25625    # If that did not work out (e.g. too old), try explicit versions instead
25626
25627  if test "x$BOOT_JDK_FOUND" = xno; then
25628    # Now execute the test
25629
25630  if test -x /usr/libexec/java_home; then
25631    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25632    BOOT_JDK_FOUND=maybe
25633    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25634$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25635  fi
25636
25637
25638    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25639    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25640      # Do we have a bin/java?
25641      if test ! -x "$BOOT_JDK/bin/java"; then
25642        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25644        BOOT_JDK_FOUND=no
25645      else
25646        # Do we have a bin/javac?
25647        if test ! -x "$BOOT_JDK/bin/javac"; then
25648          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25650          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25651$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25652          BOOT_JDK_FOUND=no
25653        else
25654          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25655          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25656
25657          # Extra M4 quote needed to protect [] in grep expression.
25658          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25659          if test "x$FOUND_CORRECT_VERSION" = x; then
25660            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25662            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25663$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25664            BOOT_JDK_FOUND=no
25665          else
25666            # We're done! :-)
25667            BOOT_JDK_FOUND=yes
25668
25669  # Only process if variable expands to non-empty
25670
25671  if test "x$BOOT_JDK" != x; then
25672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673
25674  # Input might be given as Windows format, start by converting to
25675  # unix format.
25676  path="$BOOT_JDK"
25677  new_path=`$CYGPATH -u "$path"`
25678
25679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25682  # "foo.exe" is OK but "foo" is an error.
25683  #
25684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25685  # It is also a way to make sure we got the proper file name for the real test later on.
25686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25687  if test "x$test_shortpath" = x; then
25688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25690    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25691  fi
25692
25693  # Call helper function which possibly converts this using DOS-style short mode.
25694  # If so, the updated path is stored in $new_path.
25695
25696  input_path="$new_path"
25697  # Check if we need to convert this using DOS-style short mode. If the path
25698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25699  # take no chances and rewrite it.
25700  # Note: m4 eats our [], so we need to use [ and ] instead.
25701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25702  if test "x$has_forbidden_chars" != x; then
25703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25707      # Going to short mode and back again did indeed matter. Since short mode is
25708      # case insensitive, let's make it lowercase to improve readability.
25709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25710      # Now convert it back to Unix-style (cygpath)
25711      input_path=`$CYGPATH -u "$shortmode_path"`
25712      new_path="$input_path"
25713    fi
25714  fi
25715
25716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25717  if test "x$test_cygdrive_prefix" = x; then
25718    # As a simple fix, exclude /usr/bin since it's not a real path.
25719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25721      # a path prefixed by /cygdrive for fixpath to work.
25722      new_path="$CYGWIN_ROOT_PATH$input_path"
25723    fi
25724  fi
25725
25726
25727  if test "x$path" != "x$new_path"; then
25728    BOOT_JDK="$new_path"
25729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25731  fi
25732
25733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25734
25735  path="$BOOT_JDK"
25736  has_colon=`$ECHO $path | $GREP ^.:`
25737  new_path="$path"
25738  if test "x$has_colon" = x; then
25739    # Not in mixed or Windows style, start by that.
25740    new_path=`cmd //c echo $path`
25741  fi
25742
25743
25744  input_path="$new_path"
25745  # Check if we need to convert this using DOS-style short mode. If the path
25746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25747  # take no chances and rewrite it.
25748  # Note: m4 eats our [], so we need to use [ and ] instead.
25749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25750  if test "x$has_forbidden_chars" != x; then
25751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25753  fi
25754
25755
25756  windows_path="$new_path"
25757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25758    unix_path=`$CYGPATH -u "$windows_path"`
25759    new_path="$unix_path"
25760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25762    new_path="$unix_path"
25763  fi
25764
25765  if test "x$path" != "x$new_path"; then
25766    BOOT_JDK="$new_path"
25767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25769  fi
25770
25771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25773
25774    else
25775      # We're on a unix platform. Hooray! :)
25776      path="$BOOT_JDK"
25777      has_space=`$ECHO "$path" | $GREP " "`
25778      if test "x$has_space" != x; then
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25782      fi
25783
25784      # Use eval to expand a potential ~
25785      eval path="$path"
25786      if test ! -f "$path" && test ! -d "$path"; then
25787        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25788      fi
25789
25790      if test -d "$path"; then
25791        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25792      else
25793        dir="`$DIRNAME "$path"`"
25794        base="`$BASENAME "$path"`"
25795        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25796      fi
25797    fi
25798  fi
25799
25800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25801$as_echo_n "checking for Boot JDK... " >&6; }
25802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25803$as_echo "$BOOT_JDK" >&6; }
25804            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25805$as_echo_n "checking Boot JDK version... " >&6; }
25806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25808$as_echo "$BOOT_JDK_VERSION" >&6; }
25809          fi # end check jdk version
25810        fi # end check javac
25811      fi # end check java
25812    fi # end check boot jdk found
25813  fi
25814
25815
25816  if test "x$BOOT_JDK_FOUND" = xno; then
25817    # Now execute the test
25818
25819  if test -x /usr/libexec/java_home; then
25820    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25821    BOOT_JDK_FOUND=maybe
25822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25823$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25824  fi
25825
25826
25827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25829      # Do we have a bin/java?
25830      if test ! -x "$BOOT_JDK/bin/java"; then
25831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25833        BOOT_JDK_FOUND=no
25834      else
25835        # Do we have a bin/javac?
25836        if test ! -x "$BOOT_JDK/bin/javac"; then
25837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25841          BOOT_JDK_FOUND=no
25842        else
25843          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25844          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25845
25846          # Extra M4 quote needed to protect [] in grep expression.
25847          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25848          if test "x$FOUND_CORRECT_VERSION" = x; then
25849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25851            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25852$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25853            BOOT_JDK_FOUND=no
25854          else
25855            # We're done! :-)
25856            BOOT_JDK_FOUND=yes
25857
25858  # Only process if variable expands to non-empty
25859
25860  if test "x$BOOT_JDK" != x; then
25861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862
25863  # Input might be given as Windows format, start by converting to
25864  # unix format.
25865  path="$BOOT_JDK"
25866  new_path=`$CYGPATH -u "$path"`
25867
25868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25871  # "foo.exe" is OK but "foo" is an error.
25872  #
25873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25874  # It is also a way to make sure we got the proper file name for the real test later on.
25875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25876  if test "x$test_shortpath" = x; then
25877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25879    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25880  fi
25881
25882  # Call helper function which possibly converts this using DOS-style short mode.
25883  # If so, the updated path is stored in $new_path.
25884
25885  input_path="$new_path"
25886  # Check if we need to convert this using DOS-style short mode. If the path
25887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25888  # take no chances and rewrite it.
25889  # Note: m4 eats our [], so we need to use [ and ] instead.
25890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25891  if test "x$has_forbidden_chars" != x; then
25892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25896      # Going to short mode and back again did indeed matter. Since short mode is
25897      # case insensitive, let's make it lowercase to improve readability.
25898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25899      # Now convert it back to Unix-style (cygpath)
25900      input_path=`$CYGPATH -u "$shortmode_path"`
25901      new_path="$input_path"
25902    fi
25903  fi
25904
25905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25906  if test "x$test_cygdrive_prefix" = x; then
25907    # As a simple fix, exclude /usr/bin since it's not a real path.
25908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25910      # a path prefixed by /cygdrive for fixpath to work.
25911      new_path="$CYGWIN_ROOT_PATH$input_path"
25912    fi
25913  fi
25914
25915
25916  if test "x$path" != "x$new_path"; then
25917    BOOT_JDK="$new_path"
25918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25920  fi
25921
25922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25923
25924  path="$BOOT_JDK"
25925  has_colon=`$ECHO $path | $GREP ^.:`
25926  new_path="$path"
25927  if test "x$has_colon" = x; then
25928    # Not in mixed or Windows style, start by that.
25929    new_path=`cmd //c echo $path`
25930  fi
25931
25932
25933  input_path="$new_path"
25934  # Check if we need to convert this using DOS-style short mode. If the path
25935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25936  # take no chances and rewrite it.
25937  # Note: m4 eats our [], so we need to use [ and ] instead.
25938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25939  if test "x$has_forbidden_chars" != x; then
25940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25942  fi
25943
25944
25945  windows_path="$new_path"
25946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25947    unix_path=`$CYGPATH -u "$windows_path"`
25948    new_path="$unix_path"
25949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25951    new_path="$unix_path"
25952  fi
25953
25954  if test "x$path" != "x$new_path"; then
25955    BOOT_JDK="$new_path"
25956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25958  fi
25959
25960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25962
25963    else
25964      # We're on a unix platform. Hooray! :)
25965      path="$BOOT_JDK"
25966      has_space=`$ECHO "$path" | $GREP " "`
25967      if test "x$has_space" != x; then
25968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25969$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25971      fi
25972
25973      # Use eval to expand a potential ~
25974      eval path="$path"
25975      if test ! -f "$path" && test ! -d "$path"; then
25976        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25977      fi
25978
25979      if test -d "$path"; then
25980        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25981      else
25982        dir="`$DIRNAME "$path"`"
25983        base="`$BASENAME "$path"`"
25984        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25985      fi
25986    fi
25987  fi
25988
25989            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25990$as_echo_n "checking for Boot JDK... " >&6; }
25991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25992$as_echo "$BOOT_JDK" >&6; }
25993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25994$as_echo_n "checking Boot JDK version... " >&6; }
25995            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25997$as_echo "$BOOT_JDK_VERSION" >&6; }
25998          fi # end check jdk version
25999        fi # end check javac
26000      fi # end check java
26001    fi # end check boot jdk found
26002  fi
26003
26004
26005  if test "x$BOOT_JDK_FOUND" = xno; then
26006    # Now execute the test
26007
26008  if test -x /usr/libexec/java_home; then
26009    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26010    BOOT_JDK_FOUND=maybe
26011    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26012$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26013  fi
26014
26015
26016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26018      # Do we have a bin/java?
26019      if test ! -x "$BOOT_JDK/bin/java"; then
26020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26022        BOOT_JDK_FOUND=no
26023      else
26024        # Do we have a bin/javac?
26025        if test ! -x "$BOOT_JDK/bin/javac"; then
26026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26030          BOOT_JDK_FOUND=no
26031        else
26032          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26033          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26034
26035          # Extra M4 quote needed to protect [] in grep expression.
26036          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26037          if test "x$FOUND_CORRECT_VERSION" = x; then
26038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26040            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26041$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26042            BOOT_JDK_FOUND=no
26043          else
26044            # We're done! :-)
26045            BOOT_JDK_FOUND=yes
26046
26047  # Only process if variable expands to non-empty
26048
26049  if test "x$BOOT_JDK" != x; then
26050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26051
26052  # Input might be given as Windows format, start by converting to
26053  # unix format.
26054  path="$BOOT_JDK"
26055  new_path=`$CYGPATH -u "$path"`
26056
26057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26060  # "foo.exe" is OK but "foo" is an error.
26061  #
26062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26063  # It is also a way to make sure we got the proper file name for the real test later on.
26064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26065  if test "x$test_shortpath" = x; then
26066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26069  fi
26070
26071  # Call helper function which possibly converts this using DOS-style short mode.
26072  # If so, the updated path is stored in $new_path.
26073
26074  input_path="$new_path"
26075  # Check if we need to convert this using DOS-style short mode. If the path
26076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26077  # take no chances and rewrite it.
26078  # Note: m4 eats our [], so we need to use [ and ] instead.
26079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26080  if test "x$has_forbidden_chars" != x; then
26081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26085      # Going to short mode and back again did indeed matter. Since short mode is
26086      # case insensitive, let's make it lowercase to improve readability.
26087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26088      # Now convert it back to Unix-style (cygpath)
26089      input_path=`$CYGPATH -u "$shortmode_path"`
26090      new_path="$input_path"
26091    fi
26092  fi
26093
26094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26095  if test "x$test_cygdrive_prefix" = x; then
26096    # As a simple fix, exclude /usr/bin since it's not a real path.
26097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26099      # a path prefixed by /cygdrive for fixpath to work.
26100      new_path="$CYGWIN_ROOT_PATH$input_path"
26101    fi
26102  fi
26103
26104
26105  if test "x$path" != "x$new_path"; then
26106    BOOT_JDK="$new_path"
26107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26109  fi
26110
26111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26112
26113  path="$BOOT_JDK"
26114  has_colon=`$ECHO $path | $GREP ^.:`
26115  new_path="$path"
26116  if test "x$has_colon" = x; then
26117    # Not in mixed or Windows style, start by that.
26118    new_path=`cmd //c echo $path`
26119  fi
26120
26121
26122  input_path="$new_path"
26123  # Check if we need to convert this using DOS-style short mode. If the path
26124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26125  # take no chances and rewrite it.
26126  # Note: m4 eats our [], so we need to use [ and ] instead.
26127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26128  if test "x$has_forbidden_chars" != x; then
26129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26131  fi
26132
26133
26134  windows_path="$new_path"
26135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26136    unix_path=`$CYGPATH -u "$windows_path"`
26137    new_path="$unix_path"
26138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26140    new_path="$unix_path"
26141  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26151
26152    else
26153      # We're on a unix platform. Hooray! :)
26154      path="$BOOT_JDK"
26155      has_space=`$ECHO "$path" | $GREP " "`
26156      if test "x$has_space" != x; then
26157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26160      fi
26161
26162      # Use eval to expand a potential ~
26163      eval path="$path"
26164      if test ! -f "$path" && test ! -d "$path"; then
26165        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26166      fi
26167
26168      if test -d "$path"; then
26169        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26170      else
26171        dir="`$DIRNAME "$path"`"
26172        base="`$BASENAME "$path"`"
26173        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26174      fi
26175    fi
26176  fi
26177
26178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26179$as_echo_n "checking for Boot JDK... " >&6; }
26180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26181$as_echo "$BOOT_JDK" >&6; }
26182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26183$as_echo_n "checking Boot JDK version... " >&6; }
26184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26186$as_echo "$BOOT_JDK_VERSION" >&6; }
26187          fi # end check jdk version
26188        fi # end check javac
26189      fi # end check java
26190    fi # end check boot jdk found
26191  fi
26192
26193  fi
26194
26195
26196    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26197    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26198      # Do we have a bin/java?
26199      if test ! -x "$BOOT_JDK/bin/java"; then
26200        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26202        BOOT_JDK_FOUND=no
26203      else
26204        # Do we have a bin/javac?
26205        if test ! -x "$BOOT_JDK/bin/javac"; then
26206          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26208          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26209$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26210          BOOT_JDK_FOUND=no
26211        else
26212          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26213          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26214
26215          # Extra M4 quote needed to protect [] in grep expression.
26216          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26217          if test "x$FOUND_CORRECT_VERSION" = x; then
26218            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26220            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26221$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26222            BOOT_JDK_FOUND=no
26223          else
26224            # We're done! :-)
26225            BOOT_JDK_FOUND=yes
26226
26227  # Only process if variable expands to non-empty
26228
26229  if test "x$BOOT_JDK" != x; then
26230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26231
26232  # Input might be given as Windows format, start by converting to
26233  # unix format.
26234  path="$BOOT_JDK"
26235  new_path=`$CYGPATH -u "$path"`
26236
26237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26240  # "foo.exe" is OK but "foo" is an error.
26241  #
26242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26243  # It is also a way to make sure we got the proper file name for the real test later on.
26244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26245  if test "x$test_shortpath" = x; then
26246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26249  fi
26250
26251  # Call helper function which possibly converts this using DOS-style short mode.
26252  # If so, the updated path is stored in $new_path.
26253
26254  input_path="$new_path"
26255  # Check if we need to convert this using DOS-style short mode. If the path
26256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26257  # take no chances and rewrite it.
26258  # Note: m4 eats our [], so we need to use [ and ] instead.
26259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26260  if test "x$has_forbidden_chars" != x; then
26261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26265      # Going to short mode and back again did indeed matter. Since short mode is
26266      # case insensitive, let's make it lowercase to improve readability.
26267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26268      # Now convert it back to Unix-style (cygpath)
26269      input_path=`$CYGPATH -u "$shortmode_path"`
26270      new_path="$input_path"
26271    fi
26272  fi
26273
26274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26275  if test "x$test_cygdrive_prefix" = x; then
26276    # As a simple fix, exclude /usr/bin since it's not a real path.
26277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26279      # a path prefixed by /cygdrive for fixpath to work.
26280      new_path="$CYGWIN_ROOT_PATH$input_path"
26281    fi
26282  fi
26283
26284
26285  if test "x$path" != "x$new_path"; then
26286    BOOT_JDK="$new_path"
26287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26289  fi
26290
26291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26292
26293  path="$BOOT_JDK"
26294  has_colon=`$ECHO $path | $GREP ^.:`
26295  new_path="$path"
26296  if test "x$has_colon" = x; then
26297    # Not in mixed or Windows style, start by that.
26298    new_path=`cmd //c echo $path`
26299  fi
26300
26301
26302  input_path="$new_path"
26303  # Check if we need to convert this using DOS-style short mode. If the path
26304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26305  # take no chances and rewrite it.
26306  # Note: m4 eats our [], so we need to use [ and ] instead.
26307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26308  if test "x$has_forbidden_chars" != x; then
26309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26311  fi
26312
26313
26314  windows_path="$new_path"
26315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26316    unix_path=`$CYGPATH -u "$windows_path"`
26317    new_path="$unix_path"
26318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26320    new_path="$unix_path"
26321  fi
26322
26323  if test "x$path" != "x$new_path"; then
26324    BOOT_JDK="$new_path"
26325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26327  fi
26328
26329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26331
26332    else
26333      # We're on a unix platform. Hooray! :)
26334      path="$BOOT_JDK"
26335      has_space=`$ECHO "$path" | $GREP " "`
26336      if test "x$has_space" != x; then
26337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26340      fi
26341
26342      # Use eval to expand a potential ~
26343      eval path="$path"
26344      if test ! -f "$path" && test ! -d "$path"; then
26345        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26346      fi
26347
26348      if test -d "$path"; then
26349        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26350      else
26351        dir="`$DIRNAME "$path"`"
26352        base="`$BASENAME "$path"`"
26353        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26354      fi
26355    fi
26356  fi
26357
26358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26359$as_echo_n "checking for Boot JDK... " >&6; }
26360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26361$as_echo "$BOOT_JDK" >&6; }
26362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26363$as_echo_n "checking Boot JDK version... " >&6; }
26364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26366$as_echo "$BOOT_JDK_VERSION" >&6; }
26367          fi # end check jdk version
26368        fi # end check javac
26369      fi # end check java
26370    fi # end check boot jdk found
26371  fi
26372
26373
26374  # Test: Is $JAVA_HOME set?
26375
26376  if test "x$BOOT_JDK_FOUND" = xno; then
26377    # Now execute the test
26378
26379  if test "x$JAVA_HOME" != x; then
26380    JAVA_HOME_PROCESSED="$JAVA_HOME"
26381
26382  # Only process if variable expands to non-empty
26383
26384  if test "x$JAVA_HOME_PROCESSED" != x; then
26385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26386
26387  # Input might be given as Windows format, start by converting to
26388  # unix format.
26389  path="$JAVA_HOME_PROCESSED"
26390  new_path=`$CYGPATH -u "$path"`
26391
26392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26395  # "foo.exe" is OK but "foo" is an error.
26396  #
26397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26398  # It is also a way to make sure we got the proper file name for the real test later on.
26399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26400  if test "x$test_shortpath" = x; then
26401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26402$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26403    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26404  fi
26405
26406  # Call helper function which possibly converts this using DOS-style short mode.
26407  # If so, the updated path is stored in $new_path.
26408
26409  input_path="$new_path"
26410  # Check if we need to convert this using DOS-style short mode. If the path
26411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26412  # take no chances and rewrite it.
26413  # Note: m4 eats our [], so we need to use [ and ] instead.
26414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26415  if test "x$has_forbidden_chars" != x; then
26416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26420      # Going to short mode and back again did indeed matter. Since short mode is
26421      # case insensitive, let's make it lowercase to improve readability.
26422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26423      # Now convert it back to Unix-style (cygpath)
26424      input_path=`$CYGPATH -u "$shortmode_path"`
26425      new_path="$input_path"
26426    fi
26427  fi
26428
26429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26430  if test "x$test_cygdrive_prefix" = x; then
26431    # As a simple fix, exclude /usr/bin since it's not a real path.
26432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26434      # a path prefixed by /cygdrive for fixpath to work.
26435      new_path="$CYGWIN_ROOT_PATH$input_path"
26436    fi
26437  fi
26438
26439
26440  if test "x$path" != "x$new_path"; then
26441    JAVA_HOME_PROCESSED="$new_path"
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26443$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26444  fi
26445
26446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26447
26448  path="$JAVA_HOME_PROCESSED"
26449  has_colon=`$ECHO $path | $GREP ^.:`
26450  new_path="$path"
26451  if test "x$has_colon" = x; then
26452    # Not in mixed or Windows style, start by that.
26453    new_path=`cmd //c echo $path`
26454  fi
26455
26456
26457  input_path="$new_path"
26458  # Check if we need to convert this using DOS-style short mode. If the path
26459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26460  # take no chances and rewrite it.
26461  # Note: m4 eats our [], so we need to use [ and ] instead.
26462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26463  if test "x$has_forbidden_chars" != x; then
26464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26466  fi
26467
26468
26469  windows_path="$new_path"
26470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26471    unix_path=`$CYGPATH -u "$windows_path"`
26472    new_path="$unix_path"
26473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26475    new_path="$unix_path"
26476  fi
26477
26478  if test "x$path" != "x$new_path"; then
26479    JAVA_HOME_PROCESSED="$new_path"
26480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26481$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26482  fi
26483
26484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26486
26487    else
26488      # We're on a unix platform. Hooray! :)
26489      path="$JAVA_HOME_PROCESSED"
26490      has_space=`$ECHO "$path" | $GREP " "`
26491      if test "x$has_space" != x; then
26492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26493$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26495      fi
26496
26497      # Use eval to expand a potential ~
26498      eval path="$path"
26499      if test ! -f "$path" && test ! -d "$path"; then
26500        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26501      fi
26502
26503      if test -d "$path"; then
26504        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26505      else
26506        dir="`$DIRNAME "$path"`"
26507        base="`$BASENAME "$path"`"
26508        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26509      fi
26510    fi
26511  fi
26512
26513    if test ! -d "$JAVA_HOME_PROCESSED"; then
26514      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26515$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26516    else
26517      # Aha, the user has set a JAVA_HOME
26518      # let us use that as the Boot JDK.
26519      BOOT_JDK="$JAVA_HOME_PROCESSED"
26520      BOOT_JDK_FOUND=maybe
26521      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26522$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26523    fi
26524  fi
26525
26526
26527    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26528    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26529      # Do we have a bin/java?
26530      if test ! -x "$BOOT_JDK/bin/java"; then
26531        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26533        BOOT_JDK_FOUND=no
26534      else
26535        # Do we have a bin/javac?
26536        if test ! -x "$BOOT_JDK/bin/javac"; then
26537          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26539          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26540$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26541          BOOT_JDK_FOUND=no
26542        else
26543          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26544          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26545
26546          # Extra M4 quote needed to protect [] in grep expression.
26547          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26548          if test "x$FOUND_CORRECT_VERSION" = x; then
26549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26551            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26553            BOOT_JDK_FOUND=no
26554          else
26555            # We're done! :-)
26556            BOOT_JDK_FOUND=yes
26557
26558  # Only process if variable expands to non-empty
26559
26560  if test "x$BOOT_JDK" != x; then
26561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26562
26563  # Input might be given as Windows format, start by converting to
26564  # unix format.
26565  path="$BOOT_JDK"
26566  new_path=`$CYGPATH -u "$path"`
26567
26568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26571  # "foo.exe" is OK but "foo" is an error.
26572  #
26573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26574  # It is also a way to make sure we got the proper file name for the real test later on.
26575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26576  if test "x$test_shortpath" = x; then
26577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26580  fi
26581
26582  # Call helper function which possibly converts this using DOS-style short mode.
26583  # If so, the updated path is stored in $new_path.
26584
26585  input_path="$new_path"
26586  # Check if we need to convert this using DOS-style short mode. If the path
26587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26588  # take no chances and rewrite it.
26589  # Note: m4 eats our [], so we need to use [ and ] instead.
26590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26591  if test "x$has_forbidden_chars" != x; then
26592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26596      # Going to short mode and back again did indeed matter. Since short mode is
26597      # case insensitive, let's make it lowercase to improve readability.
26598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26599      # Now convert it back to Unix-style (cygpath)
26600      input_path=`$CYGPATH -u "$shortmode_path"`
26601      new_path="$input_path"
26602    fi
26603  fi
26604
26605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26606  if test "x$test_cygdrive_prefix" = x; then
26607    # As a simple fix, exclude /usr/bin since it's not a real path.
26608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26610      # a path prefixed by /cygdrive for fixpath to work.
26611      new_path="$CYGWIN_ROOT_PATH$input_path"
26612    fi
26613  fi
26614
26615
26616  if test "x$path" != "x$new_path"; then
26617    BOOT_JDK="$new_path"
26618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26620  fi
26621
26622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26623
26624  path="$BOOT_JDK"
26625  has_colon=`$ECHO $path | $GREP ^.:`
26626  new_path="$path"
26627  if test "x$has_colon" = x; then
26628    # Not in mixed or Windows style, start by that.
26629    new_path=`cmd //c echo $path`
26630  fi
26631
26632
26633  input_path="$new_path"
26634  # Check if we need to convert this using DOS-style short mode. If the path
26635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26636  # take no chances and rewrite it.
26637  # Note: m4 eats our [], so we need to use [ and ] instead.
26638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26639  if test "x$has_forbidden_chars" != x; then
26640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26642  fi
26643
26644
26645  windows_path="$new_path"
26646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26647    unix_path=`$CYGPATH -u "$windows_path"`
26648    new_path="$unix_path"
26649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26651    new_path="$unix_path"
26652  fi
26653
26654  if test "x$path" != "x$new_path"; then
26655    BOOT_JDK="$new_path"
26656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26658  fi
26659
26660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26662
26663    else
26664      # We're on a unix platform. Hooray! :)
26665      path="$BOOT_JDK"
26666      has_space=`$ECHO "$path" | $GREP " "`
26667      if test "x$has_space" != x; then
26668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26671      fi
26672
26673      # Use eval to expand a potential ~
26674      eval path="$path"
26675      if test ! -f "$path" && test ! -d "$path"; then
26676        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26677      fi
26678
26679      if test -d "$path"; then
26680        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26681      else
26682        dir="`$DIRNAME "$path"`"
26683        base="`$BASENAME "$path"`"
26684        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26685      fi
26686    fi
26687  fi
26688
26689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26690$as_echo_n "checking for Boot JDK... " >&6; }
26691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26692$as_echo "$BOOT_JDK" >&6; }
26693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26694$as_echo_n "checking Boot JDK version... " >&6; }
26695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26697$as_echo "$BOOT_JDK_VERSION" >&6; }
26698          fi # end check jdk version
26699        fi # end check javac
26700      fi # end check java
26701    fi # end check boot jdk found
26702  fi
26703
26704
26705  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26706
26707  if test "x$BOOT_JDK_FOUND" = xno; then
26708    # Now execute the test
26709
26710  # Extract the first word of "javac", so it can be a program name with args.
26711set dummy javac; ac_word=$2
26712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26713$as_echo_n "checking for $ac_word... " >&6; }
26714if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26715  $as_echo_n "(cached) " >&6
26716else
26717  case $JAVAC_CHECK in
26718  [\\/]* | ?:[\\/]*)
26719  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26720  ;;
26721  *)
26722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26723for as_dir in $PATH
26724do
26725  IFS=$as_save_IFS
26726  test -z "$as_dir" && as_dir=.
26727    for ac_exec_ext in '' $ac_executable_extensions; do
26728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26729    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26731    break 2
26732  fi
26733done
26734  done
26735IFS=$as_save_IFS
26736
26737  ;;
26738esac
26739fi
26740JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26741if test -n "$JAVAC_CHECK"; then
26742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26743$as_echo "$JAVAC_CHECK" >&6; }
26744else
26745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26746$as_echo "no" >&6; }
26747fi
26748
26749
26750  # Extract the first word of "java", so it can be a program name with args.
26751set dummy java; ac_word=$2
26752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26753$as_echo_n "checking for $ac_word... " >&6; }
26754if ${ac_cv_path_JAVA_CHECK+:} false; then :
26755  $as_echo_n "(cached) " >&6
26756else
26757  case $JAVA_CHECK in
26758  [\\/]* | ?:[\\/]*)
26759  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26760  ;;
26761  *)
26762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26763for as_dir in $PATH
26764do
26765  IFS=$as_save_IFS
26766  test -z "$as_dir" && as_dir=.
26767    for ac_exec_ext in '' $ac_executable_extensions; do
26768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26769    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26771    break 2
26772  fi
26773done
26774  done
26775IFS=$as_save_IFS
26776
26777  ;;
26778esac
26779fi
26780JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26781if test -n "$JAVA_CHECK"; then
26782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26783$as_echo "$JAVA_CHECK" >&6; }
26784else
26785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26786$as_echo "no" >&6; }
26787fi
26788
26789
26790  BINARY="$JAVAC_CHECK"
26791  if test "x$JAVAC_CHECK" = x; then
26792    BINARY="$JAVA_CHECK"
26793  fi
26794  if test "x$BINARY" != x; then
26795    # So there is a java(c) binary, it might be part of a JDK.
26796    # Lets find the JDK/JRE directory by following symbolic links.
26797    # Linux/GNU systems often have links from /usr/bin/java to
26798    # /etc/alternatives/java to the real JDK binary.
26799
26800  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26801    # Follow a chain of symbolic links. Use readlink
26802    # where it exists, else fall back to horribly
26803    # complicated shell code.
26804    if test "x$READLINK_TESTED" != yes; then
26805      # On MacOSX there is a readlink tool with a different
26806      # purpose than the GNU readlink tool. Check the found readlink.
26807      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26808      if test "x$ISGNU" = x; then
26809        # A readlink that we do not know how to use.
26810        # Are there other non-GNU readlinks out there?
26811        READLINK_TESTED=yes
26812        READLINK=
26813      fi
26814    fi
26815
26816    if test "x$READLINK" != x; then
26817      BINARY=`$READLINK -f $BINARY`
26818    else
26819      # Save the current directory for restoring afterwards
26820      STARTDIR=$PWD
26821      COUNTER=0
26822      sym_link_dir=`$DIRNAME $BINARY`
26823      sym_link_file=`$BASENAME $BINARY`
26824      cd $sym_link_dir
26825      # Use -P flag to resolve symlinks in directories.
26826      cd `$THEPWDCMD -P`
26827      sym_link_dir=`$THEPWDCMD -P`
26828      # Resolve file symlinks
26829      while test $COUNTER -lt 20; do
26830        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26831        if test "x$ISLINK" == x; then
26832          # This is not a symbolic link! We are done!
26833          break
26834        fi
26835        # Again resolve directory symlinks since the target of the just found
26836        # link could be in a different directory
26837        cd `$DIRNAME $ISLINK`
26838        sym_link_dir=`$THEPWDCMD -P`
26839        sym_link_file=`$BASENAME $ISLINK`
26840        let COUNTER=COUNTER+1
26841      done
26842      cd $STARTDIR
26843      BINARY=$sym_link_dir/$sym_link_file
26844    fi
26845  fi
26846
26847    BOOT_JDK=`dirname "$BINARY"`
26848    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26849    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26850      # Looks like we found ourselves an JDK
26851      BOOT_JDK_FOUND=maybe
26852      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26853$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26854    fi
26855  fi
26856
26857
26858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26860      # Do we have a bin/java?
26861      if test ! -x "$BOOT_JDK/bin/java"; then
26862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26864        BOOT_JDK_FOUND=no
26865      else
26866        # Do we have a bin/javac?
26867        if test ! -x "$BOOT_JDK/bin/javac"; then
26868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26872          BOOT_JDK_FOUND=no
26873        else
26874          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26875          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26876
26877          # Extra M4 quote needed to protect [] in grep expression.
26878          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26879          if test "x$FOUND_CORRECT_VERSION" = x; then
26880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26882            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26884            BOOT_JDK_FOUND=no
26885          else
26886            # We're done! :-)
26887            BOOT_JDK_FOUND=yes
26888
26889  # Only process if variable expands to non-empty
26890
26891  if test "x$BOOT_JDK" != x; then
26892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26893
26894  # Input might be given as Windows format, start by converting to
26895  # unix format.
26896  path="$BOOT_JDK"
26897  new_path=`$CYGPATH -u "$path"`
26898
26899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26902  # "foo.exe" is OK but "foo" is an error.
26903  #
26904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26905  # It is also a way to make sure we got the proper file name for the real test later on.
26906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26907  if test "x$test_shortpath" = x; then
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26911  fi
26912
26913  # Call helper function which possibly converts this using DOS-style short mode.
26914  # If so, the updated path is stored in $new_path.
26915
26916  input_path="$new_path"
26917  # Check if we need to convert this using DOS-style short mode. If the path
26918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26919  # take no chances and rewrite it.
26920  # Note: m4 eats our [], so we need to use [ and ] instead.
26921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26922  if test "x$has_forbidden_chars" != x; then
26923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26927      # Going to short mode and back again did indeed matter. Since short mode is
26928      # case insensitive, let's make it lowercase to improve readability.
26929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26930      # Now convert it back to Unix-style (cygpath)
26931      input_path=`$CYGPATH -u "$shortmode_path"`
26932      new_path="$input_path"
26933    fi
26934  fi
26935
26936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26937  if test "x$test_cygdrive_prefix" = x; then
26938    # As a simple fix, exclude /usr/bin since it's not a real path.
26939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26941      # a path prefixed by /cygdrive for fixpath to work.
26942      new_path="$CYGWIN_ROOT_PATH$input_path"
26943    fi
26944  fi
26945
26946
26947  if test "x$path" != "x$new_path"; then
26948    BOOT_JDK="$new_path"
26949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26951  fi
26952
26953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26954
26955  path="$BOOT_JDK"
26956  has_colon=`$ECHO $path | $GREP ^.:`
26957  new_path="$path"
26958  if test "x$has_colon" = x; then
26959    # Not in mixed or Windows style, start by that.
26960    new_path=`cmd //c echo $path`
26961  fi
26962
26963
26964  input_path="$new_path"
26965  # Check if we need to convert this using DOS-style short mode. If the path
26966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26967  # take no chances and rewrite it.
26968  # Note: m4 eats our [], so we need to use [ and ] instead.
26969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26970  if test "x$has_forbidden_chars" != x; then
26971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26973  fi
26974
26975
26976  windows_path="$new_path"
26977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26978    unix_path=`$CYGPATH -u "$windows_path"`
26979    new_path="$unix_path"
26980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26982    new_path="$unix_path"
26983  fi
26984
26985  if test "x$path" != "x$new_path"; then
26986    BOOT_JDK="$new_path"
26987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26989  fi
26990
26991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26993
26994    else
26995      # We're on a unix platform. Hooray! :)
26996      path="$BOOT_JDK"
26997      has_space=`$ECHO "$path" | $GREP " "`
26998      if test "x$has_space" != x; then
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27002      fi
27003
27004      # Use eval to expand a potential ~
27005      eval path="$path"
27006      if test ! -f "$path" && test ! -d "$path"; then
27007        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27008      fi
27009
27010      if test -d "$path"; then
27011        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27012      else
27013        dir="`$DIRNAME "$path"`"
27014        base="`$BASENAME "$path"`"
27015        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27016      fi
27017    fi
27018  fi
27019
27020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27021$as_echo_n "checking for Boot JDK... " >&6; }
27022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27023$as_echo "$BOOT_JDK" >&6; }
27024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27025$as_echo_n "checking Boot JDK version... " >&6; }
27026            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27028$as_echo "$BOOT_JDK_VERSION" >&6; }
27029          fi # end check jdk version
27030        fi # end check javac
27031      fi # end check java
27032    fi # end check boot jdk found
27033  fi
27034
27035
27036  # Test: Is there a JDK installed in default, well-known locations?
27037
27038  if test "x$BOOT_JDK_FOUND" = xno; then
27039    # Now execute the test
27040
27041  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27042
27043  if test "x$BOOT_JDK_FOUND" = xno; then
27044    # Now execute the test
27045
27046  if test "x$ProgramW6432" != x; then
27047    VIRTUAL_DIR="$ProgramW6432/Java"
27048
27049  windows_path="$VIRTUAL_DIR"
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051    unix_path=`$CYGPATH -u "$windows_path"`
27052    VIRTUAL_DIR="$unix_path"
27053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055    VIRTUAL_DIR="$unix_path"
27056  fi
27057
27058
27059  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27060  BOOT_JDK_SUFFIX=""
27061  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27062  if test "x$ALL_JDKS_FOUND" != x; then
27063    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27064
27065  if test "x$BOOT_JDK_FOUND" = xno; then
27066    # Now execute the test
27067
27068        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27069        if test -d "$BOOT_JDK"; then
27070          BOOT_JDK_FOUND=maybe
27071          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27072$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27073        fi
27074
27075
27076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27078      # Do we have a bin/java?
27079      if test ! -x "$BOOT_JDK/bin/java"; then
27080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27082        BOOT_JDK_FOUND=no
27083      else
27084        # Do we have a bin/javac?
27085        if test ! -x "$BOOT_JDK/bin/javac"; then
27086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27090          BOOT_JDK_FOUND=no
27091        else
27092          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27093          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27094
27095          # Extra M4 quote needed to protect [] in grep expression.
27096          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27097          if test "x$FOUND_CORRECT_VERSION" = x; then
27098            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27100            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27101$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27102            BOOT_JDK_FOUND=no
27103          else
27104            # We're done! :-)
27105            BOOT_JDK_FOUND=yes
27106
27107  # Only process if variable expands to non-empty
27108
27109  if test "x$BOOT_JDK" != x; then
27110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27111
27112  # Input might be given as Windows format, start by converting to
27113  # unix format.
27114  path="$BOOT_JDK"
27115  new_path=`$CYGPATH -u "$path"`
27116
27117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27120  # "foo.exe" is OK but "foo" is an error.
27121  #
27122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27123  # It is also a way to make sure we got the proper file name for the real test later on.
27124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27125  if test "x$test_shortpath" = x; then
27126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27129  fi
27130
27131  # Call helper function which possibly converts this using DOS-style short mode.
27132  # If so, the updated path is stored in $new_path.
27133
27134  input_path="$new_path"
27135  # Check if we need to convert this using DOS-style short mode. If the path
27136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27137  # take no chances and rewrite it.
27138  # Note: m4 eats our [], so we need to use [ and ] instead.
27139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27140  if test "x$has_forbidden_chars" != x; then
27141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27145      # Going to short mode and back again did indeed matter. Since short mode is
27146      # case insensitive, let's make it lowercase to improve readability.
27147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27148      # Now convert it back to Unix-style (cygpath)
27149      input_path=`$CYGPATH -u "$shortmode_path"`
27150      new_path="$input_path"
27151    fi
27152  fi
27153
27154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27155  if test "x$test_cygdrive_prefix" = x; then
27156    # As a simple fix, exclude /usr/bin since it's not a real path.
27157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27159      # a path prefixed by /cygdrive for fixpath to work.
27160      new_path="$CYGWIN_ROOT_PATH$input_path"
27161    fi
27162  fi
27163
27164
27165  if test "x$path" != "x$new_path"; then
27166    BOOT_JDK="$new_path"
27167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27169  fi
27170
27171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27172
27173  path="$BOOT_JDK"
27174  has_colon=`$ECHO $path | $GREP ^.:`
27175  new_path="$path"
27176  if test "x$has_colon" = x; then
27177    # Not in mixed or Windows style, start by that.
27178    new_path=`cmd //c echo $path`
27179  fi
27180
27181
27182  input_path="$new_path"
27183  # Check if we need to convert this using DOS-style short mode. If the path
27184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27185  # take no chances and rewrite it.
27186  # Note: m4 eats our [], so we need to use [ and ] instead.
27187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27188  if test "x$has_forbidden_chars" != x; then
27189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27191  fi
27192
27193
27194  windows_path="$new_path"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    new_path="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    new_path="$unix_path"
27201  fi
27202
27203  if test "x$path" != "x$new_path"; then
27204    BOOT_JDK="$new_path"
27205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27207  fi
27208
27209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27211
27212    else
27213      # We're on a unix platform. Hooray! :)
27214      path="$BOOT_JDK"
27215      has_space=`$ECHO "$path" | $GREP " "`
27216      if test "x$has_space" != x; then
27217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27220      fi
27221
27222      # Use eval to expand a potential ~
27223      eval path="$path"
27224      if test ! -f "$path" && test ! -d "$path"; then
27225        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27226      fi
27227
27228      if test -d "$path"; then
27229        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27230      else
27231        dir="`$DIRNAME "$path"`"
27232        base="`$BASENAME "$path"`"
27233        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27234      fi
27235    fi
27236  fi
27237
27238            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27239$as_echo_n "checking for Boot JDK... " >&6; }
27240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27241$as_echo "$BOOT_JDK" >&6; }
27242            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27243$as_echo_n "checking Boot JDK version... " >&6; }
27244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27246$as_echo "$BOOT_JDK_VERSION" >&6; }
27247          fi # end check jdk version
27248        fi # end check javac
27249      fi # end check java
27250    fi # end check boot jdk found
27251  fi
27252
27253    done
27254  fi
27255
27256  fi
27257
27258
27259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27261      # Do we have a bin/java?
27262      if test ! -x "$BOOT_JDK/bin/java"; then
27263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27265        BOOT_JDK_FOUND=no
27266      else
27267        # Do we have a bin/javac?
27268        if test ! -x "$BOOT_JDK/bin/javac"; then
27269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27273          BOOT_JDK_FOUND=no
27274        else
27275          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27276          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27277
27278          # Extra M4 quote needed to protect [] in grep expression.
27279          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27280          if test "x$FOUND_CORRECT_VERSION" = x; then
27281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27283            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27284$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27285            BOOT_JDK_FOUND=no
27286          else
27287            # We're done! :-)
27288            BOOT_JDK_FOUND=yes
27289
27290  # Only process if variable expands to non-empty
27291
27292  if test "x$BOOT_JDK" != x; then
27293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27294
27295  # Input might be given as Windows format, start by converting to
27296  # unix format.
27297  path="$BOOT_JDK"
27298  new_path=`$CYGPATH -u "$path"`
27299
27300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27303  # "foo.exe" is OK but "foo" is an error.
27304  #
27305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27306  # It is also a way to make sure we got the proper file name for the real test later on.
27307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27308  if test "x$test_shortpath" = x; then
27309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27311    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27312  fi
27313
27314  # Call helper function which possibly converts this using DOS-style short mode.
27315  # If so, the updated path is stored in $new_path.
27316
27317  input_path="$new_path"
27318  # Check if we need to convert this using DOS-style short mode. If the path
27319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27320  # take no chances and rewrite it.
27321  # Note: m4 eats our [], so we need to use [ and ] instead.
27322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27323  if test "x$has_forbidden_chars" != x; then
27324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27328      # Going to short mode and back again did indeed matter. Since short mode is
27329      # case insensitive, let's make it lowercase to improve readability.
27330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27331      # Now convert it back to Unix-style (cygpath)
27332      input_path=`$CYGPATH -u "$shortmode_path"`
27333      new_path="$input_path"
27334    fi
27335  fi
27336
27337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27338  if test "x$test_cygdrive_prefix" = x; then
27339    # As a simple fix, exclude /usr/bin since it's not a real path.
27340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27342      # a path prefixed by /cygdrive for fixpath to work.
27343      new_path="$CYGWIN_ROOT_PATH$input_path"
27344    fi
27345  fi
27346
27347
27348  if test "x$path" != "x$new_path"; then
27349    BOOT_JDK="$new_path"
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27352  fi
27353
27354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27355
27356  path="$BOOT_JDK"
27357  has_colon=`$ECHO $path | $GREP ^.:`
27358  new_path="$path"
27359  if test "x$has_colon" = x; then
27360    # Not in mixed or Windows style, start by that.
27361    new_path=`cmd //c echo $path`
27362  fi
27363
27364
27365  input_path="$new_path"
27366  # Check if we need to convert this using DOS-style short mode. If the path
27367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27368  # take no chances and rewrite it.
27369  # Note: m4 eats our [], so we need to use [ and ] instead.
27370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27371  if test "x$has_forbidden_chars" != x; then
27372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27374  fi
27375
27376
27377  windows_path="$new_path"
27378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27379    unix_path=`$CYGPATH -u "$windows_path"`
27380    new_path="$unix_path"
27381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27383    new_path="$unix_path"
27384  fi
27385
27386  if test "x$path" != "x$new_path"; then
27387    BOOT_JDK="$new_path"
27388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27390  fi
27391
27392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27394
27395    else
27396      # We're on a unix platform. Hooray! :)
27397      path="$BOOT_JDK"
27398      has_space=`$ECHO "$path" | $GREP " "`
27399      if test "x$has_space" != x; then
27400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27403      fi
27404
27405      # Use eval to expand a potential ~
27406      eval path="$path"
27407      if test ! -f "$path" && test ! -d "$path"; then
27408        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27409      fi
27410
27411      if test -d "$path"; then
27412        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27413      else
27414        dir="`$DIRNAME "$path"`"
27415        base="`$BASENAME "$path"`"
27416        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27417      fi
27418    fi
27419  fi
27420
27421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27422$as_echo_n "checking for Boot JDK... " >&6; }
27423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27424$as_echo "$BOOT_JDK" >&6; }
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27426$as_echo_n "checking Boot JDK version... " >&6; }
27427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27429$as_echo "$BOOT_JDK_VERSION" >&6; }
27430          fi # end check jdk version
27431        fi # end check javac
27432      fi # end check java
27433    fi # end check boot jdk found
27434  fi
27435
27436
27437  if test "x$BOOT_JDK_FOUND" = xno; then
27438    # Now execute the test
27439
27440  if test "x$PROGRAMW6432" != x; then
27441    VIRTUAL_DIR="$PROGRAMW6432/Java"
27442
27443  windows_path="$VIRTUAL_DIR"
27444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27445    unix_path=`$CYGPATH -u "$windows_path"`
27446    VIRTUAL_DIR="$unix_path"
27447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27449    VIRTUAL_DIR="$unix_path"
27450  fi
27451
27452
27453  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27454  BOOT_JDK_SUFFIX=""
27455  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27456  if test "x$ALL_JDKS_FOUND" != x; then
27457    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27458
27459  if test "x$BOOT_JDK_FOUND" = xno; then
27460    # Now execute the test
27461
27462        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27463        if test -d "$BOOT_JDK"; then
27464          BOOT_JDK_FOUND=maybe
27465          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27466$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27467        fi
27468
27469
27470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27472      # Do we have a bin/java?
27473      if test ! -x "$BOOT_JDK/bin/java"; then
27474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27476        BOOT_JDK_FOUND=no
27477      else
27478        # Do we have a bin/javac?
27479        if test ! -x "$BOOT_JDK/bin/javac"; then
27480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27484          BOOT_JDK_FOUND=no
27485        else
27486          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27487          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27488
27489          # Extra M4 quote needed to protect [] in grep expression.
27490          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27491          if test "x$FOUND_CORRECT_VERSION" = x; then
27492            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27494            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27495$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27496            BOOT_JDK_FOUND=no
27497          else
27498            # We're done! :-)
27499            BOOT_JDK_FOUND=yes
27500
27501  # Only process if variable expands to non-empty
27502
27503  if test "x$BOOT_JDK" != x; then
27504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27505
27506  # Input might be given as Windows format, start by converting to
27507  # unix format.
27508  path="$BOOT_JDK"
27509  new_path=`$CYGPATH -u "$path"`
27510
27511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27514  # "foo.exe" is OK but "foo" is an error.
27515  #
27516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27517  # It is also a way to make sure we got the proper file name for the real test later on.
27518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27519  if test "x$test_shortpath" = x; then
27520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27523  fi
27524
27525  # Call helper function which possibly converts this using DOS-style short mode.
27526  # If so, the updated path is stored in $new_path.
27527
27528  input_path="$new_path"
27529  # Check if we need to convert this using DOS-style short mode. If the path
27530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27531  # take no chances and rewrite it.
27532  # Note: m4 eats our [], so we need to use [ and ] instead.
27533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27534  if test "x$has_forbidden_chars" != x; then
27535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27539      # Going to short mode and back again did indeed matter. Since short mode is
27540      # case insensitive, let's make it lowercase to improve readability.
27541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27542      # Now convert it back to Unix-style (cygpath)
27543      input_path=`$CYGPATH -u "$shortmode_path"`
27544      new_path="$input_path"
27545    fi
27546  fi
27547
27548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27549  if test "x$test_cygdrive_prefix" = x; then
27550    # As a simple fix, exclude /usr/bin since it's not a real path.
27551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27553      # a path prefixed by /cygdrive for fixpath to work.
27554      new_path="$CYGWIN_ROOT_PATH$input_path"
27555    fi
27556  fi
27557
27558
27559  if test "x$path" != "x$new_path"; then
27560    BOOT_JDK="$new_path"
27561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27563  fi
27564
27565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27566
27567  path="$BOOT_JDK"
27568  has_colon=`$ECHO $path | $GREP ^.:`
27569  new_path="$path"
27570  if test "x$has_colon" = x; then
27571    # Not in mixed or Windows style, start by that.
27572    new_path=`cmd //c echo $path`
27573  fi
27574
27575
27576  input_path="$new_path"
27577  # Check if we need to convert this using DOS-style short mode. If the path
27578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27579  # take no chances and rewrite it.
27580  # Note: m4 eats our [], so we need to use [ and ] instead.
27581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27582  if test "x$has_forbidden_chars" != x; then
27583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27585  fi
27586
27587
27588  windows_path="$new_path"
27589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590    unix_path=`$CYGPATH -u "$windows_path"`
27591    new_path="$unix_path"
27592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27594    new_path="$unix_path"
27595  fi
27596
27597  if test "x$path" != "x$new_path"; then
27598    BOOT_JDK="$new_path"
27599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27601  fi
27602
27603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27605
27606    else
27607      # We're on a unix platform. Hooray! :)
27608      path="$BOOT_JDK"
27609      has_space=`$ECHO "$path" | $GREP " "`
27610      if test "x$has_space" != x; then
27611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27614      fi
27615
27616      # Use eval to expand a potential ~
27617      eval path="$path"
27618      if test ! -f "$path" && test ! -d "$path"; then
27619        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27620      fi
27621
27622      if test -d "$path"; then
27623        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27624      else
27625        dir="`$DIRNAME "$path"`"
27626        base="`$BASENAME "$path"`"
27627        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27628      fi
27629    fi
27630  fi
27631
27632            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27633$as_echo_n "checking for Boot JDK... " >&6; }
27634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27635$as_echo "$BOOT_JDK" >&6; }
27636            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27637$as_echo_n "checking Boot JDK version... " >&6; }
27638            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27640$as_echo "$BOOT_JDK_VERSION" >&6; }
27641          fi # end check jdk version
27642        fi # end check javac
27643      fi # end check java
27644    fi # end check boot jdk found
27645  fi
27646
27647    done
27648  fi
27649
27650  fi
27651
27652
27653    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27654    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27655      # Do we have a bin/java?
27656      if test ! -x "$BOOT_JDK/bin/java"; then
27657        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27659        BOOT_JDK_FOUND=no
27660      else
27661        # Do we have a bin/javac?
27662        if test ! -x "$BOOT_JDK/bin/javac"; then
27663          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27665          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27666$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27667          BOOT_JDK_FOUND=no
27668        else
27669          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27670          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27671
27672          # Extra M4 quote needed to protect [] in grep expression.
27673          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27674          if test "x$FOUND_CORRECT_VERSION" = x; then
27675            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27677            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27678$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27679            BOOT_JDK_FOUND=no
27680          else
27681            # We're done! :-)
27682            BOOT_JDK_FOUND=yes
27683
27684  # Only process if variable expands to non-empty
27685
27686  if test "x$BOOT_JDK" != x; then
27687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27688
27689  # Input might be given as Windows format, start by converting to
27690  # unix format.
27691  path="$BOOT_JDK"
27692  new_path=`$CYGPATH -u "$path"`
27693
27694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27697  # "foo.exe" is OK but "foo" is an error.
27698  #
27699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27700  # It is also a way to make sure we got the proper file name for the real test later on.
27701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27702  if test "x$test_shortpath" = x; then
27703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27705    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27706  fi
27707
27708  # Call helper function which possibly converts this using DOS-style short mode.
27709  # If so, the updated path is stored in $new_path.
27710
27711  input_path="$new_path"
27712  # Check if we need to convert this using DOS-style short mode. If the path
27713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27714  # take no chances and rewrite it.
27715  # Note: m4 eats our [], so we need to use [ and ] instead.
27716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27717  if test "x$has_forbidden_chars" != x; then
27718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27722      # Going to short mode and back again did indeed matter. Since short mode is
27723      # case insensitive, let's make it lowercase to improve readability.
27724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27725      # Now convert it back to Unix-style (cygpath)
27726      input_path=`$CYGPATH -u "$shortmode_path"`
27727      new_path="$input_path"
27728    fi
27729  fi
27730
27731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27732  if test "x$test_cygdrive_prefix" = x; then
27733    # As a simple fix, exclude /usr/bin since it's not a real path.
27734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27736      # a path prefixed by /cygdrive for fixpath to work.
27737      new_path="$CYGWIN_ROOT_PATH$input_path"
27738    fi
27739  fi
27740
27741
27742  if test "x$path" != "x$new_path"; then
27743    BOOT_JDK="$new_path"
27744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27746  fi
27747
27748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27749
27750  path="$BOOT_JDK"
27751  has_colon=`$ECHO $path | $GREP ^.:`
27752  new_path="$path"
27753  if test "x$has_colon" = x; then
27754    # Not in mixed or Windows style, start by that.
27755    new_path=`cmd //c echo $path`
27756  fi
27757
27758
27759  input_path="$new_path"
27760  # Check if we need to convert this using DOS-style short mode. If the path
27761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27762  # take no chances and rewrite it.
27763  # Note: m4 eats our [], so we need to use [ and ] instead.
27764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27765  if test "x$has_forbidden_chars" != x; then
27766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27768  fi
27769
27770
27771  windows_path="$new_path"
27772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27773    unix_path=`$CYGPATH -u "$windows_path"`
27774    new_path="$unix_path"
27775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27777    new_path="$unix_path"
27778  fi
27779
27780  if test "x$path" != "x$new_path"; then
27781    BOOT_JDK="$new_path"
27782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27784  fi
27785
27786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27788
27789    else
27790      # We're on a unix platform. Hooray! :)
27791      path="$BOOT_JDK"
27792      has_space=`$ECHO "$path" | $GREP " "`
27793      if test "x$has_space" != x; then
27794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27797      fi
27798
27799      # Use eval to expand a potential ~
27800      eval path="$path"
27801      if test ! -f "$path" && test ! -d "$path"; then
27802        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27803      fi
27804
27805      if test -d "$path"; then
27806        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27807      else
27808        dir="`$DIRNAME "$path"`"
27809        base="`$BASENAME "$path"`"
27810        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27811      fi
27812    fi
27813  fi
27814
27815            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27816$as_echo_n "checking for Boot JDK... " >&6; }
27817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27818$as_echo "$BOOT_JDK" >&6; }
27819            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27820$as_echo_n "checking Boot JDK version... " >&6; }
27821            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27823$as_echo "$BOOT_JDK_VERSION" >&6; }
27824          fi # end check jdk version
27825        fi # end check javac
27826      fi # end check java
27827    fi # end check boot jdk found
27828  fi
27829
27830
27831  if test "x$BOOT_JDK_FOUND" = xno; then
27832    # Now execute the test
27833
27834  if test "x$PROGRAMFILES" != x; then
27835    VIRTUAL_DIR="$PROGRAMFILES/Java"
27836
27837  windows_path="$VIRTUAL_DIR"
27838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27839    unix_path=`$CYGPATH -u "$windows_path"`
27840    VIRTUAL_DIR="$unix_path"
27841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27843    VIRTUAL_DIR="$unix_path"
27844  fi
27845
27846
27847  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27848  BOOT_JDK_SUFFIX=""
27849  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27850  if test "x$ALL_JDKS_FOUND" != x; then
27851    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27852
27853  if test "x$BOOT_JDK_FOUND" = xno; then
27854    # Now execute the test
27855
27856        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27857        if test -d "$BOOT_JDK"; then
27858          BOOT_JDK_FOUND=maybe
27859          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27860$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27861        fi
27862
27863
27864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27866      # Do we have a bin/java?
27867      if test ! -x "$BOOT_JDK/bin/java"; then
27868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27870        BOOT_JDK_FOUND=no
27871      else
27872        # Do we have a bin/javac?
27873        if test ! -x "$BOOT_JDK/bin/javac"; then
27874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27878          BOOT_JDK_FOUND=no
27879        else
27880          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27881          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27882
27883          # Extra M4 quote needed to protect [] in grep expression.
27884          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27885          if test "x$FOUND_CORRECT_VERSION" = x; then
27886            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27888            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27889$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27890            BOOT_JDK_FOUND=no
27891          else
27892            # We're done! :-)
27893            BOOT_JDK_FOUND=yes
27894
27895  # Only process if variable expands to non-empty
27896
27897  if test "x$BOOT_JDK" != x; then
27898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27899
27900  # Input might be given as Windows format, start by converting to
27901  # unix format.
27902  path="$BOOT_JDK"
27903  new_path=`$CYGPATH -u "$path"`
27904
27905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27908  # "foo.exe" is OK but "foo" is an error.
27909  #
27910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27911  # It is also a way to make sure we got the proper file name for the real test later on.
27912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27913  if test "x$test_shortpath" = x; then
27914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27917  fi
27918
27919  # Call helper function which possibly converts this using DOS-style short mode.
27920  # If so, the updated path is stored in $new_path.
27921
27922  input_path="$new_path"
27923  # Check if we need to convert this using DOS-style short mode. If the path
27924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27925  # take no chances and rewrite it.
27926  # Note: m4 eats our [], so we need to use [ and ] instead.
27927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27928  if test "x$has_forbidden_chars" != x; then
27929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27933      # Going to short mode and back again did indeed matter. Since short mode is
27934      # case insensitive, let's make it lowercase to improve readability.
27935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27936      # Now convert it back to Unix-style (cygpath)
27937      input_path=`$CYGPATH -u "$shortmode_path"`
27938      new_path="$input_path"
27939    fi
27940  fi
27941
27942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27943  if test "x$test_cygdrive_prefix" = x; then
27944    # As a simple fix, exclude /usr/bin since it's not a real path.
27945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27947      # a path prefixed by /cygdrive for fixpath to work.
27948      new_path="$CYGWIN_ROOT_PATH$input_path"
27949    fi
27950  fi
27951
27952
27953  if test "x$path" != "x$new_path"; then
27954    BOOT_JDK="$new_path"
27955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27957  fi
27958
27959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27960
27961  path="$BOOT_JDK"
27962  has_colon=`$ECHO $path | $GREP ^.:`
27963  new_path="$path"
27964  if test "x$has_colon" = x; then
27965    # Not in mixed or Windows style, start by that.
27966    new_path=`cmd //c echo $path`
27967  fi
27968
27969
27970  input_path="$new_path"
27971  # Check if we need to convert this using DOS-style short mode. If the path
27972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27973  # take no chances and rewrite it.
27974  # Note: m4 eats our [], so we need to use [ and ] instead.
27975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27976  if test "x$has_forbidden_chars" != x; then
27977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27979  fi
27980
27981
27982  windows_path="$new_path"
27983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27984    unix_path=`$CYGPATH -u "$windows_path"`
27985    new_path="$unix_path"
27986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27988    new_path="$unix_path"
27989  fi
27990
27991  if test "x$path" != "x$new_path"; then
27992    BOOT_JDK="$new_path"
27993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27995  fi
27996
27997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27999
28000    else
28001      # We're on a unix platform. Hooray! :)
28002      path="$BOOT_JDK"
28003      has_space=`$ECHO "$path" | $GREP " "`
28004      if test "x$has_space" != x; then
28005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28008      fi
28009
28010      # Use eval to expand a potential ~
28011      eval path="$path"
28012      if test ! -f "$path" && test ! -d "$path"; then
28013        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28014      fi
28015
28016      if test -d "$path"; then
28017        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28018      else
28019        dir="`$DIRNAME "$path"`"
28020        base="`$BASENAME "$path"`"
28021        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28022      fi
28023    fi
28024  fi
28025
28026            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28027$as_echo_n "checking for Boot JDK... " >&6; }
28028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28029$as_echo "$BOOT_JDK" >&6; }
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28031$as_echo_n "checking Boot JDK version... " >&6; }
28032            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28034$as_echo "$BOOT_JDK_VERSION" >&6; }
28035          fi # end check jdk version
28036        fi # end check javac
28037      fi # end check java
28038    fi # end check boot jdk found
28039  fi
28040
28041    done
28042  fi
28043
28044  fi
28045
28046
28047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28049      # Do we have a bin/java?
28050      if test ! -x "$BOOT_JDK/bin/java"; then
28051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28053        BOOT_JDK_FOUND=no
28054      else
28055        # Do we have a bin/javac?
28056        if test ! -x "$BOOT_JDK/bin/javac"; then
28057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28061          BOOT_JDK_FOUND=no
28062        else
28063          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28064          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28065
28066          # Extra M4 quote needed to protect [] in grep expression.
28067          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28068          if test "x$FOUND_CORRECT_VERSION" = x; then
28069            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28072$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28073            BOOT_JDK_FOUND=no
28074          else
28075            # We're done! :-)
28076            BOOT_JDK_FOUND=yes
28077
28078  # Only process if variable expands to non-empty
28079
28080  if test "x$BOOT_JDK" != x; then
28081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28082
28083  # Input might be given as Windows format, start by converting to
28084  # unix format.
28085  path="$BOOT_JDK"
28086  new_path=`$CYGPATH -u "$path"`
28087
28088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28091  # "foo.exe" is OK but "foo" is an error.
28092  #
28093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28094  # It is also a way to make sure we got the proper file name for the real test later on.
28095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28096  if test "x$test_shortpath" = x; then
28097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28099    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28100  fi
28101
28102  # Call helper function which possibly converts this using DOS-style short mode.
28103  # If so, the updated path is stored in $new_path.
28104
28105  input_path="$new_path"
28106  # Check if we need to convert this using DOS-style short mode. If the path
28107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28108  # take no chances and rewrite it.
28109  # Note: m4 eats our [], so we need to use [ and ] instead.
28110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28111  if test "x$has_forbidden_chars" != x; then
28112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28116      # Going to short mode and back again did indeed matter. Since short mode is
28117      # case insensitive, let's make it lowercase to improve readability.
28118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28119      # Now convert it back to Unix-style (cygpath)
28120      input_path=`$CYGPATH -u "$shortmode_path"`
28121      new_path="$input_path"
28122    fi
28123  fi
28124
28125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28126  if test "x$test_cygdrive_prefix" = x; then
28127    # As a simple fix, exclude /usr/bin since it's not a real path.
28128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28130      # a path prefixed by /cygdrive for fixpath to work.
28131      new_path="$CYGWIN_ROOT_PATH$input_path"
28132    fi
28133  fi
28134
28135
28136  if test "x$path" != "x$new_path"; then
28137    BOOT_JDK="$new_path"
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28140  fi
28141
28142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28143
28144  path="$BOOT_JDK"
28145  has_colon=`$ECHO $path | $GREP ^.:`
28146  new_path="$path"
28147  if test "x$has_colon" = x; then
28148    # Not in mixed or Windows style, start by that.
28149    new_path=`cmd //c echo $path`
28150  fi
28151
28152
28153  input_path="$new_path"
28154  # Check if we need to convert this using DOS-style short mode. If the path
28155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28156  # take no chances and rewrite it.
28157  # Note: m4 eats our [], so we need to use [ and ] instead.
28158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28159  if test "x$has_forbidden_chars" != x; then
28160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28162  fi
28163
28164
28165  windows_path="$new_path"
28166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28167    unix_path=`$CYGPATH -u "$windows_path"`
28168    new_path="$unix_path"
28169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28171    new_path="$unix_path"
28172  fi
28173
28174  if test "x$path" != "x$new_path"; then
28175    BOOT_JDK="$new_path"
28176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28178  fi
28179
28180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28182
28183    else
28184      # We're on a unix platform. Hooray! :)
28185      path="$BOOT_JDK"
28186      has_space=`$ECHO "$path" | $GREP " "`
28187      if test "x$has_space" != x; then
28188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28191      fi
28192
28193      # Use eval to expand a potential ~
28194      eval path="$path"
28195      if test ! -f "$path" && test ! -d "$path"; then
28196        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28197      fi
28198
28199      if test -d "$path"; then
28200        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28201      else
28202        dir="`$DIRNAME "$path"`"
28203        base="`$BASENAME "$path"`"
28204        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28205      fi
28206    fi
28207  fi
28208
28209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28210$as_echo_n "checking for Boot JDK... " >&6; }
28211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28212$as_echo "$BOOT_JDK" >&6; }
28213            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28214$as_echo_n "checking Boot JDK version... " >&6; }
28215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28217$as_echo "$BOOT_JDK_VERSION" >&6; }
28218          fi # end check jdk version
28219        fi # end check javac
28220      fi # end check java
28221    fi # end check boot jdk found
28222  fi
28223
28224
28225  if test "x$BOOT_JDK_FOUND" = xno; then
28226    # Now execute the test
28227
28228  if test "x$ProgramFiles" != x; then
28229    VIRTUAL_DIR="$ProgramFiles/Java"
28230
28231  windows_path="$VIRTUAL_DIR"
28232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28233    unix_path=`$CYGPATH -u "$windows_path"`
28234    VIRTUAL_DIR="$unix_path"
28235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28237    VIRTUAL_DIR="$unix_path"
28238  fi
28239
28240
28241  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28242  BOOT_JDK_SUFFIX=""
28243  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28244  if test "x$ALL_JDKS_FOUND" != x; then
28245    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28246
28247  if test "x$BOOT_JDK_FOUND" = xno; then
28248    # Now execute the test
28249
28250        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28251        if test -d "$BOOT_JDK"; then
28252          BOOT_JDK_FOUND=maybe
28253          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28254$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28255        fi
28256
28257
28258    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28259    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28260      # Do we have a bin/java?
28261      if test ! -x "$BOOT_JDK/bin/java"; then
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28264        BOOT_JDK_FOUND=no
28265      else
28266        # Do we have a bin/javac?
28267        if test ! -x "$BOOT_JDK/bin/javac"; then
28268          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28270          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28271$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28272          BOOT_JDK_FOUND=no
28273        else
28274          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28275          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28276
28277          # Extra M4 quote needed to protect [] in grep expression.
28278          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28279          if test "x$FOUND_CORRECT_VERSION" = x; then
28280            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28282            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28283$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28284            BOOT_JDK_FOUND=no
28285          else
28286            # We're done! :-)
28287            BOOT_JDK_FOUND=yes
28288
28289  # Only process if variable expands to non-empty
28290
28291  if test "x$BOOT_JDK" != x; then
28292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28293
28294  # Input might be given as Windows format, start by converting to
28295  # unix format.
28296  path="$BOOT_JDK"
28297  new_path=`$CYGPATH -u "$path"`
28298
28299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28302  # "foo.exe" is OK but "foo" is an error.
28303  #
28304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28305  # It is also a way to make sure we got the proper file name for the real test later on.
28306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28307  if test "x$test_shortpath" = x; then
28308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28310    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28311  fi
28312
28313  # Call helper function which possibly converts this using DOS-style short mode.
28314  # If so, the updated path is stored in $new_path.
28315
28316  input_path="$new_path"
28317  # Check if we need to convert this using DOS-style short mode. If the path
28318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28319  # take no chances and rewrite it.
28320  # Note: m4 eats our [], so we need to use [ and ] instead.
28321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28322  if test "x$has_forbidden_chars" != x; then
28323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28327      # Going to short mode and back again did indeed matter. Since short mode is
28328      # case insensitive, let's make it lowercase to improve readability.
28329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28330      # Now convert it back to Unix-style (cygpath)
28331      input_path=`$CYGPATH -u "$shortmode_path"`
28332      new_path="$input_path"
28333    fi
28334  fi
28335
28336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28337  if test "x$test_cygdrive_prefix" = x; then
28338    # As a simple fix, exclude /usr/bin since it's not a real path.
28339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28341      # a path prefixed by /cygdrive for fixpath to work.
28342      new_path="$CYGWIN_ROOT_PATH$input_path"
28343    fi
28344  fi
28345
28346
28347  if test "x$path" != "x$new_path"; then
28348    BOOT_JDK="$new_path"
28349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28351  fi
28352
28353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28354
28355  path="$BOOT_JDK"
28356  has_colon=`$ECHO $path | $GREP ^.:`
28357  new_path="$path"
28358  if test "x$has_colon" = x; then
28359    # Not in mixed or Windows style, start by that.
28360    new_path=`cmd //c echo $path`
28361  fi
28362
28363
28364  input_path="$new_path"
28365  # Check if we need to convert this using DOS-style short mode. If the path
28366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28367  # take no chances and rewrite it.
28368  # Note: m4 eats our [], so we need to use [ and ] instead.
28369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28370  if test "x$has_forbidden_chars" != x; then
28371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28373  fi
28374
28375
28376  windows_path="$new_path"
28377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28378    unix_path=`$CYGPATH -u "$windows_path"`
28379    new_path="$unix_path"
28380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28382    new_path="$unix_path"
28383  fi
28384
28385  if test "x$path" != "x$new_path"; then
28386    BOOT_JDK="$new_path"
28387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28389  fi
28390
28391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28393
28394    else
28395      # We're on a unix platform. Hooray! :)
28396      path="$BOOT_JDK"
28397      has_space=`$ECHO "$path" | $GREP " "`
28398      if test "x$has_space" != x; then
28399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28402      fi
28403
28404      # Use eval to expand a potential ~
28405      eval path="$path"
28406      if test ! -f "$path" && test ! -d "$path"; then
28407        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28408      fi
28409
28410      if test -d "$path"; then
28411        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28412      else
28413        dir="`$DIRNAME "$path"`"
28414        base="`$BASENAME "$path"`"
28415        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28416      fi
28417    fi
28418  fi
28419
28420            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28421$as_echo_n "checking for Boot JDK... " >&6; }
28422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28423$as_echo "$BOOT_JDK" >&6; }
28424            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28425$as_echo_n "checking Boot JDK version... " >&6; }
28426            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28428$as_echo "$BOOT_JDK_VERSION" >&6; }
28429          fi # end check jdk version
28430        fi # end check javac
28431      fi # end check java
28432    fi # end check boot jdk found
28433  fi
28434
28435    done
28436  fi
28437
28438  fi
28439
28440
28441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28443      # Do we have a bin/java?
28444      if test ! -x "$BOOT_JDK/bin/java"; then
28445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28447        BOOT_JDK_FOUND=no
28448      else
28449        # Do we have a bin/javac?
28450        if test ! -x "$BOOT_JDK/bin/javac"; then
28451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28455          BOOT_JDK_FOUND=no
28456        else
28457          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28458          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28459
28460          # Extra M4 quote needed to protect [] in grep expression.
28461          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28462          if test "x$FOUND_CORRECT_VERSION" = x; then
28463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28465            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28466$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28467            BOOT_JDK_FOUND=no
28468          else
28469            # We're done! :-)
28470            BOOT_JDK_FOUND=yes
28471
28472  # Only process if variable expands to non-empty
28473
28474  if test "x$BOOT_JDK" != x; then
28475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28476
28477  # Input might be given as Windows format, start by converting to
28478  # unix format.
28479  path="$BOOT_JDK"
28480  new_path=`$CYGPATH -u "$path"`
28481
28482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28485  # "foo.exe" is OK but "foo" is an error.
28486  #
28487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28488  # It is also a way to make sure we got the proper file name for the real test later on.
28489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28490  if test "x$test_shortpath" = x; then
28491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28493    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28494  fi
28495
28496  # Call helper function which possibly converts this using DOS-style short mode.
28497  # If so, the updated path is stored in $new_path.
28498
28499  input_path="$new_path"
28500  # Check if we need to convert this using DOS-style short mode. If the path
28501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28502  # take no chances and rewrite it.
28503  # Note: m4 eats our [], so we need to use [ and ] instead.
28504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28505  if test "x$has_forbidden_chars" != x; then
28506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28510      # Going to short mode and back again did indeed matter. Since short mode is
28511      # case insensitive, let's make it lowercase to improve readability.
28512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28513      # Now convert it back to Unix-style (cygpath)
28514      input_path=`$CYGPATH -u "$shortmode_path"`
28515      new_path="$input_path"
28516    fi
28517  fi
28518
28519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28520  if test "x$test_cygdrive_prefix" = x; then
28521    # As a simple fix, exclude /usr/bin since it's not a real path.
28522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28524      # a path prefixed by /cygdrive for fixpath to work.
28525      new_path="$CYGWIN_ROOT_PATH$input_path"
28526    fi
28527  fi
28528
28529
28530  if test "x$path" != "x$new_path"; then
28531    BOOT_JDK="$new_path"
28532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28534  fi
28535
28536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28537
28538  path="$BOOT_JDK"
28539  has_colon=`$ECHO $path | $GREP ^.:`
28540  new_path="$path"
28541  if test "x$has_colon" = x; then
28542    # Not in mixed or Windows style, start by that.
28543    new_path=`cmd //c echo $path`
28544  fi
28545
28546
28547  input_path="$new_path"
28548  # Check if we need to convert this using DOS-style short mode. If the path
28549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28550  # take no chances and rewrite it.
28551  # Note: m4 eats our [], so we need to use [ and ] instead.
28552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28553  if test "x$has_forbidden_chars" != x; then
28554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28556  fi
28557
28558
28559  windows_path="$new_path"
28560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28561    unix_path=`$CYGPATH -u "$windows_path"`
28562    new_path="$unix_path"
28563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28565    new_path="$unix_path"
28566  fi
28567
28568  if test "x$path" != "x$new_path"; then
28569    BOOT_JDK="$new_path"
28570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28572  fi
28573
28574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28576
28577    else
28578      # We're on a unix platform. Hooray! :)
28579      path="$BOOT_JDK"
28580      has_space=`$ECHO "$path" | $GREP " "`
28581      if test "x$has_space" != x; then
28582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28585      fi
28586
28587      # Use eval to expand a potential ~
28588      eval path="$path"
28589      if test ! -f "$path" && test ! -d "$path"; then
28590        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28591      fi
28592
28593      if test -d "$path"; then
28594        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28595      else
28596        dir="`$DIRNAME "$path"`"
28597        base="`$BASENAME "$path"`"
28598        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28599      fi
28600    fi
28601  fi
28602
28603            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28604$as_echo_n "checking for Boot JDK... " >&6; }
28605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28606$as_echo "$BOOT_JDK" >&6; }
28607            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28608$as_echo_n "checking Boot JDK version... " >&6; }
28609            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28611$as_echo "$BOOT_JDK_VERSION" >&6; }
28612          fi # end check jdk version
28613        fi # end check javac
28614      fi # end check java
28615    fi # end check boot jdk found
28616  fi
28617
28618
28619  if test "x$BOOT_JDK_FOUND" = xno; then
28620    # Now execute the test
28621
28622  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28623  BOOT_JDK_SUFFIX=""
28624  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28625  if test "x$ALL_JDKS_FOUND" != x; then
28626    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28627
28628  if test "x$BOOT_JDK_FOUND" = xno; then
28629    # Now execute the test
28630
28631        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28632        if test -d "$BOOT_JDK"; then
28633          BOOT_JDK_FOUND=maybe
28634          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28635$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28636        fi
28637
28638
28639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28641      # Do we have a bin/java?
28642      if test ! -x "$BOOT_JDK/bin/java"; then
28643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28645        BOOT_JDK_FOUND=no
28646      else
28647        # Do we have a bin/javac?
28648        if test ! -x "$BOOT_JDK/bin/javac"; then
28649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28653          BOOT_JDK_FOUND=no
28654        else
28655          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28656          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28657
28658          # Extra M4 quote needed to protect [] in grep expression.
28659          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28660          if test "x$FOUND_CORRECT_VERSION" = x; then
28661            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28663            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28664$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28665            BOOT_JDK_FOUND=no
28666          else
28667            # We're done! :-)
28668            BOOT_JDK_FOUND=yes
28669
28670  # Only process if variable expands to non-empty
28671
28672  if test "x$BOOT_JDK" != x; then
28673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28674
28675  # Input might be given as Windows format, start by converting to
28676  # unix format.
28677  path="$BOOT_JDK"
28678  new_path=`$CYGPATH -u "$path"`
28679
28680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28683  # "foo.exe" is OK but "foo" is an error.
28684  #
28685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28686  # It is also a way to make sure we got the proper file name for the real test later on.
28687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28688  if test "x$test_shortpath" = x; then
28689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28691    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28692  fi
28693
28694  # Call helper function which possibly converts this using DOS-style short mode.
28695  # If so, the updated path is stored in $new_path.
28696
28697  input_path="$new_path"
28698  # Check if we need to convert this using DOS-style short mode. If the path
28699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28700  # take no chances and rewrite it.
28701  # Note: m4 eats our [], so we need to use [ and ] instead.
28702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28703  if test "x$has_forbidden_chars" != x; then
28704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28708      # Going to short mode and back again did indeed matter. Since short mode is
28709      # case insensitive, let's make it lowercase to improve readability.
28710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28711      # Now convert it back to Unix-style (cygpath)
28712      input_path=`$CYGPATH -u "$shortmode_path"`
28713      new_path="$input_path"
28714    fi
28715  fi
28716
28717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28718  if test "x$test_cygdrive_prefix" = x; then
28719    # As a simple fix, exclude /usr/bin since it's not a real path.
28720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28722      # a path prefixed by /cygdrive for fixpath to work.
28723      new_path="$CYGWIN_ROOT_PATH$input_path"
28724    fi
28725  fi
28726
28727
28728  if test "x$path" != "x$new_path"; then
28729    BOOT_JDK="$new_path"
28730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28732  fi
28733
28734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28735
28736  path="$BOOT_JDK"
28737  has_colon=`$ECHO $path | $GREP ^.:`
28738  new_path="$path"
28739  if test "x$has_colon" = x; then
28740    # Not in mixed or Windows style, start by that.
28741    new_path=`cmd //c echo $path`
28742  fi
28743
28744
28745  input_path="$new_path"
28746  # Check if we need to convert this using DOS-style short mode. If the path
28747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28748  # take no chances and rewrite it.
28749  # Note: m4 eats our [], so we need to use [ and ] instead.
28750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28751  if test "x$has_forbidden_chars" != x; then
28752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28754  fi
28755
28756
28757  windows_path="$new_path"
28758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28759    unix_path=`$CYGPATH -u "$windows_path"`
28760    new_path="$unix_path"
28761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28763    new_path="$unix_path"
28764  fi
28765
28766  if test "x$path" != "x$new_path"; then
28767    BOOT_JDK="$new_path"
28768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28770  fi
28771
28772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28774
28775    else
28776      # We're on a unix platform. Hooray! :)
28777      path="$BOOT_JDK"
28778      has_space=`$ECHO "$path" | $GREP " "`
28779      if test "x$has_space" != x; then
28780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28783      fi
28784
28785      # Use eval to expand a potential ~
28786      eval path="$path"
28787      if test ! -f "$path" && test ! -d "$path"; then
28788        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28789      fi
28790
28791      if test -d "$path"; then
28792        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28793      else
28794        dir="`$DIRNAME "$path"`"
28795        base="`$BASENAME "$path"`"
28796        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28797      fi
28798    fi
28799  fi
28800
28801            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28802$as_echo_n "checking for Boot JDK... " >&6; }
28803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28804$as_echo "$BOOT_JDK" >&6; }
28805            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28806$as_echo_n "checking Boot JDK version... " >&6; }
28807            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28809$as_echo "$BOOT_JDK_VERSION" >&6; }
28810          fi # end check jdk version
28811        fi # end check javac
28812      fi # end check java
28813    fi # end check boot jdk found
28814  fi
28815
28816    done
28817  fi
28818
28819
28820    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28821    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28822      # Do we have a bin/java?
28823      if test ! -x "$BOOT_JDK/bin/java"; then
28824        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28826        BOOT_JDK_FOUND=no
28827      else
28828        # Do we have a bin/javac?
28829        if test ! -x "$BOOT_JDK/bin/javac"; then
28830          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28832          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28833$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28834          BOOT_JDK_FOUND=no
28835        else
28836          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28837          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28838
28839          # Extra M4 quote needed to protect [] in grep expression.
28840          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28841          if test "x$FOUND_CORRECT_VERSION" = x; then
28842            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28844            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28845$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28846            BOOT_JDK_FOUND=no
28847          else
28848            # We're done! :-)
28849            BOOT_JDK_FOUND=yes
28850
28851  # Only process if variable expands to non-empty
28852
28853  if test "x$BOOT_JDK" != x; then
28854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28855
28856  # Input might be given as Windows format, start by converting to
28857  # unix format.
28858  path="$BOOT_JDK"
28859  new_path=`$CYGPATH -u "$path"`
28860
28861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28864  # "foo.exe" is OK but "foo" is an error.
28865  #
28866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28867  # It is also a way to make sure we got the proper file name for the real test later on.
28868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28869  if test "x$test_shortpath" = x; then
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28872    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28873  fi
28874
28875  # Call helper function which possibly converts this using DOS-style short mode.
28876  # If so, the updated path is stored in $new_path.
28877
28878  input_path="$new_path"
28879  # Check if we need to convert this using DOS-style short mode. If the path
28880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28881  # take no chances and rewrite it.
28882  # Note: m4 eats our [], so we need to use [ and ] instead.
28883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28884  if test "x$has_forbidden_chars" != x; then
28885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28889      # Going to short mode and back again did indeed matter. Since short mode is
28890      # case insensitive, let's make it lowercase to improve readability.
28891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28892      # Now convert it back to Unix-style (cygpath)
28893      input_path=`$CYGPATH -u "$shortmode_path"`
28894      new_path="$input_path"
28895    fi
28896  fi
28897
28898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28899  if test "x$test_cygdrive_prefix" = x; then
28900    # As a simple fix, exclude /usr/bin since it's not a real path.
28901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28903      # a path prefixed by /cygdrive for fixpath to work.
28904      new_path="$CYGWIN_ROOT_PATH$input_path"
28905    fi
28906  fi
28907
28908
28909  if test "x$path" != "x$new_path"; then
28910    BOOT_JDK="$new_path"
28911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28912$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28913  fi
28914
28915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28916
28917  path="$BOOT_JDK"
28918  has_colon=`$ECHO $path | $GREP ^.:`
28919  new_path="$path"
28920  if test "x$has_colon" = x; then
28921    # Not in mixed or Windows style, start by that.
28922    new_path=`cmd //c echo $path`
28923  fi
28924
28925
28926  input_path="$new_path"
28927  # Check if we need to convert this using DOS-style short mode. If the path
28928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28929  # take no chances and rewrite it.
28930  # Note: m4 eats our [], so we need to use [ and ] instead.
28931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28932  if test "x$has_forbidden_chars" != x; then
28933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28935  fi
28936
28937
28938  windows_path="$new_path"
28939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28940    unix_path=`$CYGPATH -u "$windows_path"`
28941    new_path="$unix_path"
28942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28944    new_path="$unix_path"
28945  fi
28946
28947  if test "x$path" != "x$new_path"; then
28948    BOOT_JDK="$new_path"
28949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28951  fi
28952
28953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28955
28956    else
28957      # We're on a unix platform. Hooray! :)
28958      path="$BOOT_JDK"
28959      has_space=`$ECHO "$path" | $GREP " "`
28960      if test "x$has_space" != x; then
28961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28964      fi
28965
28966      # Use eval to expand a potential ~
28967      eval path="$path"
28968      if test ! -f "$path" && test ! -d "$path"; then
28969        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28970      fi
28971
28972      if test -d "$path"; then
28973        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28974      else
28975        dir="`$DIRNAME "$path"`"
28976        base="`$BASENAME "$path"`"
28977        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28978      fi
28979    fi
28980  fi
28981
28982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28983$as_echo_n "checking for Boot JDK... " >&6; }
28984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28985$as_echo "$BOOT_JDK" >&6; }
28986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28987$as_echo_n "checking Boot JDK version... " >&6; }
28988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28990$as_echo "$BOOT_JDK_VERSION" >&6; }
28991          fi # end check jdk version
28992        fi # end check javac
28993      fi # end check java
28994    fi # end check boot jdk found
28995  fi
28996
28997  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28998
28999  if test "x$BOOT_JDK_FOUND" = xno; then
29000    # Now execute the test
29001
29002  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29003  BOOT_JDK_SUFFIX="/Contents/Home"
29004  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29005  if test "x$ALL_JDKS_FOUND" != x; then
29006    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29007
29008  if test "x$BOOT_JDK_FOUND" = xno; then
29009    # Now execute the test
29010
29011        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29012        if test -d "$BOOT_JDK"; then
29013          BOOT_JDK_FOUND=maybe
29014          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29015$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29016        fi
29017
29018
29019    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29020    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29021      # Do we have a bin/java?
29022      if test ! -x "$BOOT_JDK/bin/java"; then
29023        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29025        BOOT_JDK_FOUND=no
29026      else
29027        # Do we have a bin/javac?
29028        if test ! -x "$BOOT_JDK/bin/javac"; then
29029          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29031          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29032$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29033          BOOT_JDK_FOUND=no
29034        else
29035          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29036          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29037
29038          # Extra M4 quote needed to protect [] in grep expression.
29039          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29040          if test "x$FOUND_CORRECT_VERSION" = x; then
29041            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29043            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29044$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29045            BOOT_JDK_FOUND=no
29046          else
29047            # We're done! :-)
29048            BOOT_JDK_FOUND=yes
29049
29050  # Only process if variable expands to non-empty
29051
29052  if test "x$BOOT_JDK" != x; then
29053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29054
29055  # Input might be given as Windows format, start by converting to
29056  # unix format.
29057  path="$BOOT_JDK"
29058  new_path=`$CYGPATH -u "$path"`
29059
29060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29063  # "foo.exe" is OK but "foo" is an error.
29064  #
29065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29066  # It is also a way to make sure we got the proper file name for the real test later on.
29067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29068  if test "x$test_shortpath" = x; then
29069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29072  fi
29073
29074  # Call helper function which possibly converts this using DOS-style short mode.
29075  # If so, the updated path is stored in $new_path.
29076
29077  input_path="$new_path"
29078  # Check if we need to convert this using DOS-style short mode. If the path
29079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29080  # take no chances and rewrite it.
29081  # Note: m4 eats our [], so we need to use [ and ] instead.
29082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29083  if test "x$has_forbidden_chars" != x; then
29084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29088      # Going to short mode and back again did indeed matter. Since short mode is
29089      # case insensitive, let's make it lowercase to improve readability.
29090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29091      # Now convert it back to Unix-style (cygpath)
29092      input_path=`$CYGPATH -u "$shortmode_path"`
29093      new_path="$input_path"
29094    fi
29095  fi
29096
29097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29098  if test "x$test_cygdrive_prefix" = x; then
29099    # As a simple fix, exclude /usr/bin since it's not a real path.
29100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29102      # a path prefixed by /cygdrive for fixpath to work.
29103      new_path="$CYGWIN_ROOT_PATH$input_path"
29104    fi
29105  fi
29106
29107
29108  if test "x$path" != "x$new_path"; then
29109    BOOT_JDK="$new_path"
29110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29112  fi
29113
29114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29115
29116  path="$BOOT_JDK"
29117  has_colon=`$ECHO $path | $GREP ^.:`
29118  new_path="$path"
29119  if test "x$has_colon" = x; then
29120    # Not in mixed or Windows style, start by that.
29121    new_path=`cmd //c echo $path`
29122  fi
29123
29124
29125  input_path="$new_path"
29126  # Check if we need to convert this using DOS-style short mode. If the path
29127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29128  # take no chances and rewrite it.
29129  # Note: m4 eats our [], so we need to use [ and ] instead.
29130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29131  if test "x$has_forbidden_chars" != x; then
29132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29134  fi
29135
29136
29137  windows_path="$new_path"
29138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29139    unix_path=`$CYGPATH -u "$windows_path"`
29140    new_path="$unix_path"
29141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29143    new_path="$unix_path"
29144  fi
29145
29146  if test "x$path" != "x$new_path"; then
29147    BOOT_JDK="$new_path"
29148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29150  fi
29151
29152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29154
29155    else
29156      # We're on a unix platform. Hooray! :)
29157      path="$BOOT_JDK"
29158      has_space=`$ECHO "$path" | $GREP " "`
29159      if test "x$has_space" != x; then
29160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29163      fi
29164
29165      # Use eval to expand a potential ~
29166      eval path="$path"
29167      if test ! -f "$path" && test ! -d "$path"; then
29168        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29169      fi
29170
29171      if test -d "$path"; then
29172        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29173      else
29174        dir="`$DIRNAME "$path"`"
29175        base="`$BASENAME "$path"`"
29176        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29177      fi
29178    fi
29179  fi
29180
29181            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29182$as_echo_n "checking for Boot JDK... " >&6; }
29183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29184$as_echo "$BOOT_JDK" >&6; }
29185            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29186$as_echo_n "checking Boot JDK version... " >&6; }
29187            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29189$as_echo "$BOOT_JDK_VERSION" >&6; }
29190          fi # end check jdk version
29191        fi # end check javac
29192      fi # end check java
29193    fi # end check boot jdk found
29194  fi
29195
29196    done
29197  fi
29198
29199
29200    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29201    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29202      # Do we have a bin/java?
29203      if test ! -x "$BOOT_JDK/bin/java"; then
29204        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29206        BOOT_JDK_FOUND=no
29207      else
29208        # Do we have a bin/javac?
29209        if test ! -x "$BOOT_JDK/bin/javac"; then
29210          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29212          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29213$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29214          BOOT_JDK_FOUND=no
29215        else
29216          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29217          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29218
29219          # Extra M4 quote needed to protect [] in grep expression.
29220          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29221          if test "x$FOUND_CORRECT_VERSION" = x; then
29222            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29224            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29225$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29226            BOOT_JDK_FOUND=no
29227          else
29228            # We're done! :-)
29229            BOOT_JDK_FOUND=yes
29230
29231  # Only process if variable expands to non-empty
29232
29233  if test "x$BOOT_JDK" != x; then
29234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29235
29236  # Input might be given as Windows format, start by converting to
29237  # unix format.
29238  path="$BOOT_JDK"
29239  new_path=`$CYGPATH -u "$path"`
29240
29241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29244  # "foo.exe" is OK but "foo" is an error.
29245  #
29246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29247  # It is also a way to make sure we got the proper file name for the real test later on.
29248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29249  if test "x$test_shortpath" = x; then
29250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29252    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29253  fi
29254
29255  # Call helper function which possibly converts this using DOS-style short mode.
29256  # If so, the updated path is stored in $new_path.
29257
29258  input_path="$new_path"
29259  # Check if we need to convert this using DOS-style short mode. If the path
29260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29261  # take no chances and rewrite it.
29262  # Note: m4 eats our [], so we need to use [ and ] instead.
29263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29264  if test "x$has_forbidden_chars" != x; then
29265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29269      # Going to short mode and back again did indeed matter. Since short mode is
29270      # case insensitive, let's make it lowercase to improve readability.
29271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29272      # Now convert it back to Unix-style (cygpath)
29273      input_path=`$CYGPATH -u "$shortmode_path"`
29274      new_path="$input_path"
29275    fi
29276  fi
29277
29278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29279  if test "x$test_cygdrive_prefix" = x; then
29280    # As a simple fix, exclude /usr/bin since it's not a real path.
29281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29283      # a path prefixed by /cygdrive for fixpath to work.
29284      new_path="$CYGWIN_ROOT_PATH$input_path"
29285    fi
29286  fi
29287
29288
29289  if test "x$path" != "x$new_path"; then
29290    BOOT_JDK="$new_path"
29291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29293  fi
29294
29295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29296
29297  path="$BOOT_JDK"
29298  has_colon=`$ECHO $path | $GREP ^.:`
29299  new_path="$path"
29300  if test "x$has_colon" = x; then
29301    # Not in mixed or Windows style, start by that.
29302    new_path=`cmd //c echo $path`
29303  fi
29304
29305
29306  input_path="$new_path"
29307  # Check if we need to convert this using DOS-style short mode. If the path
29308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29309  # take no chances and rewrite it.
29310  # Note: m4 eats our [], so we need to use [ and ] instead.
29311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29312  if test "x$has_forbidden_chars" != x; then
29313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29315  fi
29316
29317
29318  windows_path="$new_path"
29319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29320    unix_path=`$CYGPATH -u "$windows_path"`
29321    new_path="$unix_path"
29322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29324    new_path="$unix_path"
29325  fi
29326
29327  if test "x$path" != "x$new_path"; then
29328    BOOT_JDK="$new_path"
29329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29331  fi
29332
29333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29335
29336    else
29337      # We're on a unix platform. Hooray! :)
29338      path="$BOOT_JDK"
29339      has_space=`$ECHO "$path" | $GREP " "`
29340      if test "x$has_space" != x; then
29341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29344      fi
29345
29346      # Use eval to expand a potential ~
29347      eval path="$path"
29348      if test ! -f "$path" && test ! -d "$path"; then
29349        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29350      fi
29351
29352      if test -d "$path"; then
29353        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29354      else
29355        dir="`$DIRNAME "$path"`"
29356        base="`$BASENAME "$path"`"
29357        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29358      fi
29359    fi
29360  fi
29361
29362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29363$as_echo_n "checking for Boot JDK... " >&6; }
29364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29365$as_echo "$BOOT_JDK" >&6; }
29366            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29367$as_echo_n "checking Boot JDK version... " >&6; }
29368            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29370$as_echo "$BOOT_JDK_VERSION" >&6; }
29371          fi # end check jdk version
29372        fi # end check javac
29373      fi # end check java
29374    fi # end check boot jdk found
29375  fi
29376
29377
29378  if test "x$BOOT_JDK_FOUND" = xno; then
29379    # Now execute the test
29380
29381  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29382  BOOT_JDK_SUFFIX="/Contents/Home"
29383  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29384  if test "x$ALL_JDKS_FOUND" != x; then
29385    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29386
29387  if test "x$BOOT_JDK_FOUND" = xno; then
29388    # Now execute the test
29389
29390        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29391        if test -d "$BOOT_JDK"; then
29392          BOOT_JDK_FOUND=maybe
29393          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29394$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29395        fi
29396
29397
29398    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29399    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29400      # Do we have a bin/java?
29401      if test ! -x "$BOOT_JDK/bin/java"; then
29402        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29404        BOOT_JDK_FOUND=no
29405      else
29406        # Do we have a bin/javac?
29407        if test ! -x "$BOOT_JDK/bin/javac"; then
29408          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29410          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29411$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29412          BOOT_JDK_FOUND=no
29413        else
29414          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29415          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29416
29417          # Extra M4 quote needed to protect [] in grep expression.
29418          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29419          if test "x$FOUND_CORRECT_VERSION" = x; then
29420            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29422            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29423$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29424            BOOT_JDK_FOUND=no
29425          else
29426            # We're done! :-)
29427            BOOT_JDK_FOUND=yes
29428
29429  # Only process if variable expands to non-empty
29430
29431  if test "x$BOOT_JDK" != x; then
29432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29433
29434  # Input might be given as Windows format, start by converting to
29435  # unix format.
29436  path="$BOOT_JDK"
29437  new_path=`$CYGPATH -u "$path"`
29438
29439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29442  # "foo.exe" is OK but "foo" is an error.
29443  #
29444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29445  # It is also a way to make sure we got the proper file name for the real test later on.
29446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29447  if test "x$test_shortpath" = x; then
29448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29450    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29451  fi
29452
29453  # Call helper function which possibly converts this using DOS-style short mode.
29454  # If so, the updated path is stored in $new_path.
29455
29456  input_path="$new_path"
29457  # Check if we need to convert this using DOS-style short mode. If the path
29458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29459  # take no chances and rewrite it.
29460  # Note: m4 eats our [], so we need to use [ and ] instead.
29461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29462  if test "x$has_forbidden_chars" != x; then
29463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29467      # Going to short mode and back again did indeed matter. Since short mode is
29468      # case insensitive, let's make it lowercase to improve readability.
29469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29470      # Now convert it back to Unix-style (cygpath)
29471      input_path=`$CYGPATH -u "$shortmode_path"`
29472      new_path="$input_path"
29473    fi
29474  fi
29475
29476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29477  if test "x$test_cygdrive_prefix" = x; then
29478    # As a simple fix, exclude /usr/bin since it's not a real path.
29479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29481      # a path prefixed by /cygdrive for fixpath to work.
29482      new_path="$CYGWIN_ROOT_PATH$input_path"
29483    fi
29484  fi
29485
29486
29487  if test "x$path" != "x$new_path"; then
29488    BOOT_JDK="$new_path"
29489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29491  fi
29492
29493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29494
29495  path="$BOOT_JDK"
29496  has_colon=`$ECHO $path | $GREP ^.:`
29497  new_path="$path"
29498  if test "x$has_colon" = x; then
29499    # Not in mixed or Windows style, start by that.
29500    new_path=`cmd //c echo $path`
29501  fi
29502
29503
29504  input_path="$new_path"
29505  # Check if we need to convert this using DOS-style short mode. If the path
29506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29507  # take no chances and rewrite it.
29508  # Note: m4 eats our [], so we need to use [ and ] instead.
29509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29510  if test "x$has_forbidden_chars" != x; then
29511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29513  fi
29514
29515
29516  windows_path="$new_path"
29517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29518    unix_path=`$CYGPATH -u "$windows_path"`
29519    new_path="$unix_path"
29520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29522    new_path="$unix_path"
29523  fi
29524
29525  if test "x$path" != "x$new_path"; then
29526    BOOT_JDK="$new_path"
29527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29529  fi
29530
29531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29533
29534    else
29535      # We're on a unix platform. Hooray! :)
29536      path="$BOOT_JDK"
29537      has_space=`$ECHO "$path" | $GREP " "`
29538      if test "x$has_space" != x; then
29539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29542      fi
29543
29544      # Use eval to expand a potential ~
29545      eval path="$path"
29546      if test ! -f "$path" && test ! -d "$path"; then
29547        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29548      fi
29549
29550      if test -d "$path"; then
29551        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29552      else
29553        dir="`$DIRNAME "$path"`"
29554        base="`$BASENAME "$path"`"
29555        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29556      fi
29557    fi
29558  fi
29559
29560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29561$as_echo_n "checking for Boot JDK... " >&6; }
29562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29563$as_echo "$BOOT_JDK" >&6; }
29564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29565$as_echo_n "checking Boot JDK version... " >&6; }
29566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29568$as_echo "$BOOT_JDK_VERSION" >&6; }
29569          fi # end check jdk version
29570        fi # end check javac
29571      fi # end check java
29572    fi # end check boot jdk found
29573  fi
29574
29575    done
29576  fi
29577
29578
29579    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29580    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29581      # Do we have a bin/java?
29582      if test ! -x "$BOOT_JDK/bin/java"; then
29583        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29585        BOOT_JDK_FOUND=no
29586      else
29587        # Do we have a bin/javac?
29588        if test ! -x "$BOOT_JDK/bin/javac"; then
29589          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29591          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29592$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29593          BOOT_JDK_FOUND=no
29594        else
29595          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29596          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29597
29598          # Extra M4 quote needed to protect [] in grep expression.
29599          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29600          if test "x$FOUND_CORRECT_VERSION" = x; then
29601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29603            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29604$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29605            BOOT_JDK_FOUND=no
29606          else
29607            # We're done! :-)
29608            BOOT_JDK_FOUND=yes
29609
29610  # Only process if variable expands to non-empty
29611
29612  if test "x$BOOT_JDK" != x; then
29613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29614
29615  # Input might be given as Windows format, start by converting to
29616  # unix format.
29617  path="$BOOT_JDK"
29618  new_path=`$CYGPATH -u "$path"`
29619
29620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29623  # "foo.exe" is OK but "foo" is an error.
29624  #
29625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29626  # It is also a way to make sure we got the proper file name for the real test later on.
29627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29628  if test "x$test_shortpath" = x; then
29629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29632  fi
29633
29634  # Call helper function which possibly converts this using DOS-style short mode.
29635  # If so, the updated path is stored in $new_path.
29636
29637  input_path="$new_path"
29638  # Check if we need to convert this using DOS-style short mode. If the path
29639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29640  # take no chances and rewrite it.
29641  # Note: m4 eats our [], so we need to use [ and ] instead.
29642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29643  if test "x$has_forbidden_chars" != x; then
29644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29648      # Going to short mode and back again did indeed matter. Since short mode is
29649      # case insensitive, let's make it lowercase to improve readability.
29650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29651      # Now convert it back to Unix-style (cygpath)
29652      input_path=`$CYGPATH -u "$shortmode_path"`
29653      new_path="$input_path"
29654    fi
29655  fi
29656
29657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29658  if test "x$test_cygdrive_prefix" = x; then
29659    # As a simple fix, exclude /usr/bin since it's not a real path.
29660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29662      # a path prefixed by /cygdrive for fixpath to work.
29663      new_path="$CYGWIN_ROOT_PATH$input_path"
29664    fi
29665  fi
29666
29667
29668  if test "x$path" != "x$new_path"; then
29669    BOOT_JDK="$new_path"
29670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29672  fi
29673
29674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29675
29676  path="$BOOT_JDK"
29677  has_colon=`$ECHO $path | $GREP ^.:`
29678  new_path="$path"
29679  if test "x$has_colon" = x; then
29680    # Not in mixed or Windows style, start by that.
29681    new_path=`cmd //c echo $path`
29682  fi
29683
29684
29685  input_path="$new_path"
29686  # Check if we need to convert this using DOS-style short mode. If the path
29687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29688  # take no chances and rewrite it.
29689  # Note: m4 eats our [], so we need to use [ and ] instead.
29690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29691  if test "x$has_forbidden_chars" != x; then
29692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29694  fi
29695
29696
29697  windows_path="$new_path"
29698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29699    unix_path=`$CYGPATH -u "$windows_path"`
29700    new_path="$unix_path"
29701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29703    new_path="$unix_path"
29704  fi
29705
29706  if test "x$path" != "x$new_path"; then
29707    BOOT_JDK="$new_path"
29708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29710  fi
29711
29712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29714
29715    else
29716      # We're on a unix platform. Hooray! :)
29717      path="$BOOT_JDK"
29718      has_space=`$ECHO "$path" | $GREP " "`
29719      if test "x$has_space" != x; then
29720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29723      fi
29724
29725      # Use eval to expand a potential ~
29726      eval path="$path"
29727      if test ! -f "$path" && test ! -d "$path"; then
29728        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29729      fi
29730
29731      if test -d "$path"; then
29732        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29733      else
29734        dir="`$DIRNAME "$path"`"
29735        base="`$BASENAME "$path"`"
29736        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29737      fi
29738    fi
29739  fi
29740
29741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29742$as_echo_n "checking for Boot JDK... " >&6; }
29743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29744$as_echo "$BOOT_JDK" >&6; }
29745            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29746$as_echo_n "checking Boot JDK version... " >&6; }
29747            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29749$as_echo "$BOOT_JDK_VERSION" >&6; }
29750          fi # end check jdk version
29751        fi # end check javac
29752      fi # end check java
29753    fi # end check boot jdk found
29754  fi
29755
29756  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29757
29758  if test "x$BOOT_JDK_FOUND" = xno; then
29759    # Now execute the test
29760
29761  BOOT_JDK_PREFIX="/usr/lib/jvm"
29762  BOOT_JDK_SUFFIX=""
29763  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29764  if test "x$ALL_JDKS_FOUND" != x; then
29765    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29766
29767  if test "x$BOOT_JDK_FOUND" = xno; then
29768    # Now execute the test
29769
29770        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29771        if test -d "$BOOT_JDK"; then
29772          BOOT_JDK_FOUND=maybe
29773          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29774$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29775        fi
29776
29777
29778    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29779    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29780      # Do we have a bin/java?
29781      if test ! -x "$BOOT_JDK/bin/java"; then
29782        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29784        BOOT_JDK_FOUND=no
29785      else
29786        # Do we have a bin/javac?
29787        if test ! -x "$BOOT_JDK/bin/javac"; then
29788          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29790          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29791$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29792          BOOT_JDK_FOUND=no
29793        else
29794          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29795          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29796
29797          # Extra M4 quote needed to protect [] in grep expression.
29798          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29799          if test "x$FOUND_CORRECT_VERSION" = x; then
29800            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29802            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29803$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29804            BOOT_JDK_FOUND=no
29805          else
29806            # We're done! :-)
29807            BOOT_JDK_FOUND=yes
29808
29809  # Only process if variable expands to non-empty
29810
29811  if test "x$BOOT_JDK" != x; then
29812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29813
29814  # Input might be given as Windows format, start by converting to
29815  # unix format.
29816  path="$BOOT_JDK"
29817  new_path=`$CYGPATH -u "$path"`
29818
29819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29822  # "foo.exe" is OK but "foo" is an error.
29823  #
29824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29825  # It is also a way to make sure we got the proper file name for the real test later on.
29826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29827  if test "x$test_shortpath" = x; then
29828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29830    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29831  fi
29832
29833  # Call helper function which possibly converts this using DOS-style short mode.
29834  # If so, the updated path is stored in $new_path.
29835
29836  input_path="$new_path"
29837  # Check if we need to convert this using DOS-style short mode. If the path
29838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29839  # take no chances and rewrite it.
29840  # Note: m4 eats our [], so we need to use [ and ] instead.
29841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29842  if test "x$has_forbidden_chars" != x; then
29843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29847      # Going to short mode and back again did indeed matter. Since short mode is
29848      # case insensitive, let's make it lowercase to improve readability.
29849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29850      # Now convert it back to Unix-style (cygpath)
29851      input_path=`$CYGPATH -u "$shortmode_path"`
29852      new_path="$input_path"
29853    fi
29854  fi
29855
29856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29857  if test "x$test_cygdrive_prefix" = x; then
29858    # As a simple fix, exclude /usr/bin since it's not a real path.
29859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29861      # a path prefixed by /cygdrive for fixpath to work.
29862      new_path="$CYGWIN_ROOT_PATH$input_path"
29863    fi
29864  fi
29865
29866
29867  if test "x$path" != "x$new_path"; then
29868    BOOT_JDK="$new_path"
29869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29870$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29871  fi
29872
29873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29874
29875  path="$BOOT_JDK"
29876  has_colon=`$ECHO $path | $GREP ^.:`
29877  new_path="$path"
29878  if test "x$has_colon" = x; then
29879    # Not in mixed or Windows style, start by that.
29880    new_path=`cmd //c echo $path`
29881  fi
29882
29883
29884  input_path="$new_path"
29885  # Check if we need to convert this using DOS-style short mode. If the path
29886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29887  # take no chances and rewrite it.
29888  # Note: m4 eats our [], so we need to use [ and ] instead.
29889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29890  if test "x$has_forbidden_chars" != x; then
29891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29893  fi
29894
29895
29896  windows_path="$new_path"
29897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29898    unix_path=`$CYGPATH -u "$windows_path"`
29899    new_path="$unix_path"
29900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29902    new_path="$unix_path"
29903  fi
29904
29905  if test "x$path" != "x$new_path"; then
29906    BOOT_JDK="$new_path"
29907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29908$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29909  fi
29910
29911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29913
29914    else
29915      # We're on a unix platform. Hooray! :)
29916      path="$BOOT_JDK"
29917      has_space=`$ECHO "$path" | $GREP " "`
29918      if test "x$has_space" != x; then
29919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29920$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29922      fi
29923
29924      # Use eval to expand a potential ~
29925      eval path="$path"
29926      if test ! -f "$path" && test ! -d "$path"; then
29927        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29928      fi
29929
29930      if test -d "$path"; then
29931        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29932      else
29933        dir="`$DIRNAME "$path"`"
29934        base="`$BASENAME "$path"`"
29935        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29936      fi
29937    fi
29938  fi
29939
29940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29941$as_echo_n "checking for Boot JDK... " >&6; }
29942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29943$as_echo "$BOOT_JDK" >&6; }
29944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29945$as_echo_n "checking Boot JDK version... " >&6; }
29946            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29948$as_echo "$BOOT_JDK_VERSION" >&6; }
29949          fi # end check jdk version
29950        fi # end check javac
29951      fi # end check java
29952    fi # end check boot jdk found
29953  fi
29954
29955    done
29956  fi
29957
29958
29959    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29960    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29961      # Do we have a bin/java?
29962      if test ! -x "$BOOT_JDK/bin/java"; then
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29965        BOOT_JDK_FOUND=no
29966      else
29967        # Do we have a bin/javac?
29968        if test ! -x "$BOOT_JDK/bin/javac"; then
29969          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29971          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29972$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29973          BOOT_JDK_FOUND=no
29974        else
29975          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29976          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29977
29978          # Extra M4 quote needed to protect [] in grep expression.
29979          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29980          if test "x$FOUND_CORRECT_VERSION" = x; then
29981            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29983            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29984$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29985            BOOT_JDK_FOUND=no
29986          else
29987            # We're done! :-)
29988            BOOT_JDK_FOUND=yes
29989
29990  # Only process if variable expands to non-empty
29991
29992  if test "x$BOOT_JDK" != x; then
29993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29994
29995  # Input might be given as Windows format, start by converting to
29996  # unix format.
29997  path="$BOOT_JDK"
29998  new_path=`$CYGPATH -u "$path"`
29999
30000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30003  # "foo.exe" is OK but "foo" is an error.
30004  #
30005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30006  # It is also a way to make sure we got the proper file name for the real test later on.
30007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30008  if test "x$test_shortpath" = x; then
30009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30012  fi
30013
30014  # Call helper function which possibly converts this using DOS-style short mode.
30015  # If so, the updated path is stored in $new_path.
30016
30017  input_path="$new_path"
30018  # Check if we need to convert this using DOS-style short mode. If the path
30019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30020  # take no chances and rewrite it.
30021  # Note: m4 eats our [], so we need to use [ and ] instead.
30022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30023  if test "x$has_forbidden_chars" != x; then
30024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30028      # Going to short mode and back again did indeed matter. Since short mode is
30029      # case insensitive, let's make it lowercase to improve readability.
30030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30031      # Now convert it back to Unix-style (cygpath)
30032      input_path=`$CYGPATH -u "$shortmode_path"`
30033      new_path="$input_path"
30034    fi
30035  fi
30036
30037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30038  if test "x$test_cygdrive_prefix" = x; then
30039    # As a simple fix, exclude /usr/bin since it's not a real path.
30040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30042      # a path prefixed by /cygdrive for fixpath to work.
30043      new_path="$CYGWIN_ROOT_PATH$input_path"
30044    fi
30045  fi
30046
30047
30048  if test "x$path" != "x$new_path"; then
30049    BOOT_JDK="$new_path"
30050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30052  fi
30053
30054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30055
30056  path="$BOOT_JDK"
30057  has_colon=`$ECHO $path | $GREP ^.:`
30058  new_path="$path"
30059  if test "x$has_colon" = x; then
30060    # Not in mixed or Windows style, start by that.
30061    new_path=`cmd //c echo $path`
30062  fi
30063
30064
30065  input_path="$new_path"
30066  # Check if we need to convert this using DOS-style short mode. If the path
30067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30068  # take no chances and rewrite it.
30069  # Note: m4 eats our [], so we need to use [ and ] instead.
30070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30071  if test "x$has_forbidden_chars" != x; then
30072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30074  fi
30075
30076
30077  windows_path="$new_path"
30078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30079    unix_path=`$CYGPATH -u "$windows_path"`
30080    new_path="$unix_path"
30081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30083    new_path="$unix_path"
30084  fi
30085
30086  if test "x$path" != "x$new_path"; then
30087    BOOT_JDK="$new_path"
30088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30090  fi
30091
30092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30094
30095    else
30096      # We're on a unix platform. Hooray! :)
30097      path="$BOOT_JDK"
30098      has_space=`$ECHO "$path" | $GREP " "`
30099      if test "x$has_space" != x; then
30100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30102        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30103      fi
30104
30105      # Use eval to expand a potential ~
30106      eval path="$path"
30107      if test ! -f "$path" && test ! -d "$path"; then
30108        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30109      fi
30110
30111      if test -d "$path"; then
30112        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30113      else
30114        dir="`$DIRNAME "$path"`"
30115        base="`$BASENAME "$path"`"
30116        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30117      fi
30118    fi
30119  fi
30120
30121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30122$as_echo_n "checking for Boot JDK... " >&6; }
30123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30124$as_echo "$BOOT_JDK" >&6; }
30125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30126$as_echo_n "checking Boot JDK version... " >&6; }
30127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30129$as_echo "$BOOT_JDK_VERSION" >&6; }
30130          fi # end check jdk version
30131        fi # end check javac
30132      fi # end check java
30133    fi # end check boot jdk found
30134  fi
30135
30136  fi
30137
30138
30139    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30140    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30141      # Do we have a bin/java?
30142      if test ! -x "$BOOT_JDK/bin/java"; then
30143        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30145        BOOT_JDK_FOUND=no
30146      else
30147        # Do we have a bin/javac?
30148        if test ! -x "$BOOT_JDK/bin/javac"; then
30149          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30151          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30152$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30153          BOOT_JDK_FOUND=no
30154        else
30155          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30156          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30157
30158          # Extra M4 quote needed to protect [] in grep expression.
30159          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30160          if test "x$FOUND_CORRECT_VERSION" = x; then
30161            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30163            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30164$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30165            BOOT_JDK_FOUND=no
30166          else
30167            # We're done! :-)
30168            BOOT_JDK_FOUND=yes
30169
30170  # Only process if variable expands to non-empty
30171
30172  if test "x$BOOT_JDK" != x; then
30173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30174
30175  # Input might be given as Windows format, start by converting to
30176  # unix format.
30177  path="$BOOT_JDK"
30178  new_path=`$CYGPATH -u "$path"`
30179
30180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30183  # "foo.exe" is OK but "foo" is an error.
30184  #
30185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30186  # It is also a way to make sure we got the proper file name for the real test later on.
30187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30188  if test "x$test_shortpath" = x; then
30189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30192  fi
30193
30194  # Call helper function which possibly converts this using DOS-style short mode.
30195  # If so, the updated path is stored in $new_path.
30196
30197  input_path="$new_path"
30198  # Check if we need to convert this using DOS-style short mode. If the path
30199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30200  # take no chances and rewrite it.
30201  # Note: m4 eats our [], so we need to use [ and ] instead.
30202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30203  if test "x$has_forbidden_chars" != x; then
30204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30208      # Going to short mode and back again did indeed matter. Since short mode is
30209      # case insensitive, let's make it lowercase to improve readability.
30210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30211      # Now convert it back to Unix-style (cygpath)
30212      input_path=`$CYGPATH -u "$shortmode_path"`
30213      new_path="$input_path"
30214    fi
30215  fi
30216
30217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30218  if test "x$test_cygdrive_prefix" = x; then
30219    # As a simple fix, exclude /usr/bin since it's not a real path.
30220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30222      # a path prefixed by /cygdrive for fixpath to work.
30223      new_path="$CYGWIN_ROOT_PATH$input_path"
30224    fi
30225  fi
30226
30227
30228  if test "x$path" != "x$new_path"; then
30229    BOOT_JDK="$new_path"
30230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30232  fi
30233
30234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30235
30236  path="$BOOT_JDK"
30237  has_colon=`$ECHO $path | $GREP ^.:`
30238  new_path="$path"
30239  if test "x$has_colon" = x; then
30240    # Not in mixed or Windows style, start by that.
30241    new_path=`cmd //c echo $path`
30242  fi
30243
30244
30245  input_path="$new_path"
30246  # Check if we need to convert this using DOS-style short mode. If the path
30247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30248  # take no chances and rewrite it.
30249  # Note: m4 eats our [], so we need to use [ and ] instead.
30250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30251  if test "x$has_forbidden_chars" != x; then
30252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30254  fi
30255
30256
30257  windows_path="$new_path"
30258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30259    unix_path=`$CYGPATH -u "$windows_path"`
30260    new_path="$unix_path"
30261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30263    new_path="$unix_path"
30264  fi
30265
30266  if test "x$path" != "x$new_path"; then
30267    BOOT_JDK="$new_path"
30268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30270  fi
30271
30272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30274
30275    else
30276      # We're on a unix platform. Hooray! :)
30277      path="$BOOT_JDK"
30278      has_space=`$ECHO "$path" | $GREP " "`
30279      if test "x$has_space" != x; then
30280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30283      fi
30284
30285      # Use eval to expand a potential ~
30286      eval path="$path"
30287      if test ! -f "$path" && test ! -d "$path"; then
30288        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30289      fi
30290
30291      if test -d "$path"; then
30292        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30293      else
30294        dir="`$DIRNAME "$path"`"
30295        base="`$BASENAME "$path"`"
30296        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30297      fi
30298    fi
30299  fi
30300
30301            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30302$as_echo_n "checking for Boot JDK... " >&6; }
30303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30304$as_echo "$BOOT_JDK" >&6; }
30305            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30306$as_echo_n "checking Boot JDK version... " >&6; }
30307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30309$as_echo "$BOOT_JDK_VERSION" >&6; }
30310          fi # end check jdk version
30311        fi # end check javac
30312      fi # end check java
30313    fi # end check boot jdk found
30314  fi
30315
30316
30317  # If we haven't found anything yet, we've truly lost. Give up.
30318  if test "x$BOOT_JDK_FOUND" = xno; then
30319
30320  # Print a helpful message on how to acquire the necessary build dependency.
30321  # openjdk is the help tag: freetype, cups, alsa etc
30322  MISSING_DEPENDENCY=openjdk
30323
30324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30325    cygwin_help $MISSING_DEPENDENCY
30326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30327    msys_help $MISSING_DEPENDENCY
30328  else
30329    PKGHANDLER_COMMAND=
30330
30331    case $PKGHANDLER in
30332      apt-get)
30333        apt_help     $MISSING_DEPENDENCY ;;
30334      yum)
30335        yum_help     $MISSING_DEPENDENCY ;;
30336      brew)
30337        brew_help    $MISSING_DEPENDENCY ;;
30338      port)
30339        port_help    $MISSING_DEPENDENCY ;;
30340      pkgutil)
30341        pkgutil_help $MISSING_DEPENDENCY ;;
30342      pkgadd)
30343        pkgadd_help  $MISSING_DEPENDENCY ;;
30344    esac
30345
30346    if test "x$PKGHANDLER_COMMAND" != x; then
30347      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30348    fi
30349  fi
30350
30351    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30352$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30353    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30354$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30355    as_fn_error $? "Cannot continue" "$LINENO" 5
30356  fi
30357
30358
30359
30360  # Setup tools from the Boot JDK.
30361
30362  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30363
30364  # Publish this variable in the help.
30365
30366
30367  if [ -z "${JAVA+x}" ]; then
30368    # The variable is not set by user, try to locate tool using the code snippet
30369
30370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30371$as_echo_n "checking for java in Boot JDK... " >&6; }
30372      JAVA=$BOOT_JDK/bin/java
30373      if test ! -x $JAVA; then
30374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30375$as_echo "not found" >&6; }
30376        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30377$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30378        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30379      fi
30380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30381$as_echo "ok" >&6; }
30382
30383
30384  else
30385    # The variable is set, but is it from the command line or the environment?
30386
30387    # Try to remove the string !JAVA! from our list.
30388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30390      # If it failed, the variable was not from the command line. Ignore it,
30391      # but warn the user (except for BASH, which is always set by the calling BASH).
30392      if test "xJAVA" != xBASH; then
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30394$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30395      fi
30396      # Try to locate tool using the code snippet
30397
30398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30399$as_echo_n "checking for java in Boot JDK... " >&6; }
30400      JAVA=$BOOT_JDK/bin/java
30401      if test ! -x $JAVA; then
30402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30403$as_echo "not found" >&6; }
30404        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30405$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30406        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30407      fi
30408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30409$as_echo "ok" >&6; }
30410
30411
30412    else
30413      # If it succeeded, then it was overridden by the user. We will use it
30414      # for the tool.
30415
30416      # First remove it from the list of overridden variables, so we can test
30417      # for unknown variables in the end.
30418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30419
30420      # Check if we try to supply an empty value
30421      if test "x$JAVA" = x; then
30422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30423$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30425$as_echo_n "checking for JAVA... " >&6; }
30426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30427$as_echo "disabled" >&6; }
30428      else
30429        # Check if the provided tool contains a complete path.
30430        tool_specified="$JAVA"
30431        tool_basename="${tool_specified##*/}"
30432        if test "x$tool_basename" = "x$tool_specified"; then
30433          # A command without a complete path is provided, search $PATH.
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30435$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30436          # Extract the first word of "$tool_basename", so it can be a program name with args.
30437set dummy $tool_basename; ac_word=$2
30438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30439$as_echo_n "checking for $ac_word... " >&6; }
30440if ${ac_cv_path_JAVA+:} false; then :
30441  $as_echo_n "(cached) " >&6
30442else
30443  case $JAVA in
30444  [\\/]* | ?:[\\/]*)
30445  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30446  ;;
30447  *)
30448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30449for as_dir in $PATH
30450do
30451  IFS=$as_save_IFS
30452  test -z "$as_dir" && as_dir=.
30453    for ac_exec_ext in '' $ac_executable_extensions; do
30454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30455    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30457    break 2
30458  fi
30459done
30460  done
30461IFS=$as_save_IFS
30462
30463  ;;
30464esac
30465fi
30466JAVA=$ac_cv_path_JAVA
30467if test -n "$JAVA"; then
30468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30469$as_echo "$JAVA" >&6; }
30470else
30471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30472$as_echo "no" >&6; }
30473fi
30474
30475
30476          if test "x$JAVA" = x; then
30477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30478          fi
30479        else
30480          # Otherwise we believe it is a complete path. Use it as it is.
30481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30482$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30484$as_echo_n "checking for JAVA... " >&6; }
30485          if test ! -x "$tool_specified"; then
30486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30487$as_echo "not found" >&6; }
30488            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30489          fi
30490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30491$as_echo "$tool_specified" >&6; }
30492        fi
30493      fi
30494    fi
30495
30496  fi
30497
30498
30499
30500  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30501
30502  # Publish this variable in the help.
30503
30504
30505  if [ -z "${JAVAC+x}" ]; then
30506    # The variable is not set by user, try to locate tool using the code snippet
30507
30508      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30509$as_echo_n "checking for javac in Boot JDK... " >&6; }
30510      JAVAC=$BOOT_JDK/bin/javac
30511      if test ! -x $JAVAC; then
30512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30513$as_echo "not found" >&6; }
30514        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30515$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30516        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30517      fi
30518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30519$as_echo "ok" >&6; }
30520
30521
30522  else
30523    # The variable is set, but is it from the command line or the environment?
30524
30525    # Try to remove the string !JAVAC! from our list.
30526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30528      # If it failed, the variable was not from the command line. Ignore it,
30529      # but warn the user (except for BASH, which is always set by the calling BASH).
30530      if test "xJAVAC" != xBASH; then
30531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30532$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30533      fi
30534      # Try to locate tool using the code snippet
30535
30536      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30537$as_echo_n "checking for javac in Boot JDK... " >&6; }
30538      JAVAC=$BOOT_JDK/bin/javac
30539      if test ! -x $JAVAC; then
30540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30541$as_echo "not found" >&6; }
30542        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30543$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30544        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30545      fi
30546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30547$as_echo "ok" >&6; }
30548
30549
30550    else
30551      # If it succeeded, then it was overridden by the user. We will use it
30552      # for the tool.
30553
30554      # First remove it from the list of overridden variables, so we can test
30555      # for unknown variables in the end.
30556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30557
30558      # Check if we try to supply an empty value
30559      if test "x$JAVAC" = x; then
30560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30561$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30563$as_echo_n "checking for JAVAC... " >&6; }
30564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30565$as_echo "disabled" >&6; }
30566      else
30567        # Check if the provided tool contains a complete path.
30568        tool_specified="$JAVAC"
30569        tool_basename="${tool_specified##*/}"
30570        if test "x$tool_basename" = "x$tool_specified"; then
30571          # A command without a complete path is provided, search $PATH.
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30573$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30574          # Extract the first word of "$tool_basename", so it can be a program name with args.
30575set dummy $tool_basename; ac_word=$2
30576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30577$as_echo_n "checking for $ac_word... " >&6; }
30578if ${ac_cv_path_JAVAC+:} false; then :
30579  $as_echo_n "(cached) " >&6
30580else
30581  case $JAVAC in
30582  [\\/]* | ?:[\\/]*)
30583  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30584  ;;
30585  *)
30586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30587for as_dir in $PATH
30588do
30589  IFS=$as_save_IFS
30590  test -z "$as_dir" && as_dir=.
30591    for ac_exec_ext in '' $ac_executable_extensions; do
30592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30593    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30595    break 2
30596  fi
30597done
30598  done
30599IFS=$as_save_IFS
30600
30601  ;;
30602esac
30603fi
30604JAVAC=$ac_cv_path_JAVAC
30605if test -n "$JAVAC"; then
30606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30607$as_echo "$JAVAC" >&6; }
30608else
30609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30610$as_echo "no" >&6; }
30611fi
30612
30613
30614          if test "x$JAVAC" = x; then
30615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30616          fi
30617        else
30618          # Otherwise we believe it is a complete path. Use it as it is.
30619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30620$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30622$as_echo_n "checking for JAVAC... " >&6; }
30623          if test ! -x "$tool_specified"; then
30624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30625$as_echo "not found" >&6; }
30626            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30627          fi
30628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30629$as_echo "$tool_specified" >&6; }
30630        fi
30631      fi
30632    fi
30633
30634  fi
30635
30636
30637
30638  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30639
30640  # Publish this variable in the help.
30641
30642
30643  if [ -z "${JAVAH+x}" ]; then
30644    # The variable is not set by user, try to locate tool using the code snippet
30645
30646      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30647$as_echo_n "checking for javah in Boot JDK... " >&6; }
30648      JAVAH=$BOOT_JDK/bin/javah
30649      if test ! -x $JAVAH; then
30650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30651$as_echo "not found" >&6; }
30652        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30653$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30654        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30655      fi
30656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30657$as_echo "ok" >&6; }
30658
30659
30660  else
30661    # The variable is set, but is it from the command line or the environment?
30662
30663    # Try to remove the string !JAVAH! from our list.
30664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30666      # If it failed, the variable was not from the command line. Ignore it,
30667      # but warn the user (except for BASH, which is always set by the calling BASH).
30668      if test "xJAVAH" != xBASH; then
30669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30670$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30671      fi
30672      # Try to locate tool using the code snippet
30673
30674      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30675$as_echo_n "checking for javah in Boot JDK... " >&6; }
30676      JAVAH=$BOOT_JDK/bin/javah
30677      if test ! -x $JAVAH; then
30678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30679$as_echo "not found" >&6; }
30680        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30681$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30682        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30683      fi
30684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30685$as_echo "ok" >&6; }
30686
30687
30688    else
30689      # If it succeeded, then it was overridden by the user. We will use it
30690      # for the tool.
30691
30692      # First remove it from the list of overridden variables, so we can test
30693      # for unknown variables in the end.
30694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30695
30696      # Check if we try to supply an empty value
30697      if test "x$JAVAH" = x; then
30698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30699$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30701$as_echo_n "checking for JAVAH... " >&6; }
30702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30703$as_echo "disabled" >&6; }
30704      else
30705        # Check if the provided tool contains a complete path.
30706        tool_specified="$JAVAH"
30707        tool_basename="${tool_specified##*/}"
30708        if test "x$tool_basename" = "x$tool_specified"; then
30709          # A command without a complete path is provided, search $PATH.
30710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30711$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30712          # Extract the first word of "$tool_basename", so it can be a program name with args.
30713set dummy $tool_basename; ac_word=$2
30714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30715$as_echo_n "checking for $ac_word... " >&6; }
30716if ${ac_cv_path_JAVAH+:} false; then :
30717  $as_echo_n "(cached) " >&6
30718else
30719  case $JAVAH in
30720  [\\/]* | ?:[\\/]*)
30721  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30722  ;;
30723  *)
30724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30725for as_dir in $PATH
30726do
30727  IFS=$as_save_IFS
30728  test -z "$as_dir" && as_dir=.
30729    for ac_exec_ext in '' $ac_executable_extensions; do
30730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30731    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30733    break 2
30734  fi
30735done
30736  done
30737IFS=$as_save_IFS
30738
30739  ;;
30740esac
30741fi
30742JAVAH=$ac_cv_path_JAVAH
30743if test -n "$JAVAH"; then
30744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30745$as_echo "$JAVAH" >&6; }
30746else
30747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30748$as_echo "no" >&6; }
30749fi
30750
30751
30752          if test "x$JAVAH" = x; then
30753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30754          fi
30755        else
30756          # Otherwise we believe it is a complete path. Use it as it is.
30757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30758$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30760$as_echo_n "checking for JAVAH... " >&6; }
30761          if test ! -x "$tool_specified"; then
30762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30763$as_echo "not found" >&6; }
30764            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30765          fi
30766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30767$as_echo "$tool_specified" >&6; }
30768        fi
30769      fi
30770    fi
30771
30772  fi
30773
30774
30775
30776  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30777
30778  # Publish this variable in the help.
30779
30780
30781  if [ -z "${JAR+x}" ]; then
30782    # The variable is not set by user, try to locate tool using the code snippet
30783
30784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30785$as_echo_n "checking for jar in Boot JDK... " >&6; }
30786      JAR=$BOOT_JDK/bin/jar
30787      if test ! -x $JAR; then
30788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30789$as_echo "not found" >&6; }
30790        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30791$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30792        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30793      fi
30794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30795$as_echo "ok" >&6; }
30796
30797
30798  else
30799    # The variable is set, but is it from the command line or the environment?
30800
30801    # Try to remove the string !JAR! from our list.
30802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30804      # If it failed, the variable was not from the command line. Ignore it,
30805      # but warn the user (except for BASH, which is always set by the calling BASH).
30806      if test "xJAR" != xBASH; then
30807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30808$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30809      fi
30810      # Try to locate tool using the code snippet
30811
30812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30813$as_echo_n "checking for jar in Boot JDK... " >&6; }
30814      JAR=$BOOT_JDK/bin/jar
30815      if test ! -x $JAR; then
30816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30817$as_echo "not found" >&6; }
30818        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30819$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30820        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30821      fi
30822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30823$as_echo "ok" >&6; }
30824
30825
30826    else
30827      # If it succeeded, then it was overridden by the user. We will use it
30828      # for the tool.
30829
30830      # First remove it from the list of overridden variables, so we can test
30831      # for unknown variables in the end.
30832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30833
30834      # Check if we try to supply an empty value
30835      if test "x$JAR" = x; then
30836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30837$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30839$as_echo_n "checking for JAR... " >&6; }
30840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30841$as_echo "disabled" >&6; }
30842      else
30843        # Check if the provided tool contains a complete path.
30844        tool_specified="$JAR"
30845        tool_basename="${tool_specified##*/}"
30846        if test "x$tool_basename" = "x$tool_specified"; then
30847          # A command without a complete path is provided, search $PATH.
30848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30849$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30850          # Extract the first word of "$tool_basename", so it can be a program name with args.
30851set dummy $tool_basename; ac_word=$2
30852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30853$as_echo_n "checking for $ac_word... " >&6; }
30854if ${ac_cv_path_JAR+:} false; then :
30855  $as_echo_n "(cached) " >&6
30856else
30857  case $JAR in
30858  [\\/]* | ?:[\\/]*)
30859  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30860  ;;
30861  *)
30862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30863for as_dir in $PATH
30864do
30865  IFS=$as_save_IFS
30866  test -z "$as_dir" && as_dir=.
30867    for ac_exec_ext in '' $ac_executable_extensions; do
30868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30869    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30871    break 2
30872  fi
30873done
30874  done
30875IFS=$as_save_IFS
30876
30877  ;;
30878esac
30879fi
30880JAR=$ac_cv_path_JAR
30881if test -n "$JAR"; then
30882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30883$as_echo "$JAR" >&6; }
30884else
30885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30886$as_echo "no" >&6; }
30887fi
30888
30889
30890          if test "x$JAR" = x; then
30891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30892          fi
30893        else
30894          # Otherwise we believe it is a complete path. Use it as it is.
30895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30896$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30898$as_echo_n "checking for JAR... " >&6; }
30899          if test ! -x "$tool_specified"; then
30900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30901$as_echo "not found" >&6; }
30902            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30903          fi
30904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30905$as_echo "$tool_specified" >&6; }
30906        fi
30907      fi
30908    fi
30909
30910  fi
30911
30912
30913
30914  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30915
30916  # Publish this variable in the help.
30917
30918
30919  if [ -z "${JARSIGNER+x}" ]; then
30920    # The variable is not set by user, try to locate tool using the code snippet
30921
30922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30923$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30924      JARSIGNER=$BOOT_JDK/bin/jarsigner
30925      if test ! -x $JARSIGNER; then
30926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30927$as_echo "not found" >&6; }
30928        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30929$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30930        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30931      fi
30932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30933$as_echo "ok" >&6; }
30934
30935
30936  else
30937    # The variable is set, but is it from the command line or the environment?
30938
30939    # Try to remove the string !JARSIGNER! from our list.
30940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30942      # If it failed, the variable was not from the command line. Ignore it,
30943      # but warn the user (except for BASH, which is always set by the calling BASH).
30944      if test "xJARSIGNER" != xBASH; then
30945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30946$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30947      fi
30948      # Try to locate tool using the code snippet
30949
30950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30951$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30952      JARSIGNER=$BOOT_JDK/bin/jarsigner
30953      if test ! -x $JARSIGNER; then
30954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30955$as_echo "not found" >&6; }
30956        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30957$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30958        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30959      fi
30960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30961$as_echo "ok" >&6; }
30962
30963
30964    else
30965      # If it succeeded, then it was overridden by the user. We will use it
30966      # for the tool.
30967
30968      # First remove it from the list of overridden variables, so we can test
30969      # for unknown variables in the end.
30970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30971
30972      # Check if we try to supply an empty value
30973      if test "x$JARSIGNER" = x; then
30974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30975$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30977$as_echo_n "checking for JARSIGNER... " >&6; }
30978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30979$as_echo "disabled" >&6; }
30980      else
30981        # Check if the provided tool contains a complete path.
30982        tool_specified="$JARSIGNER"
30983        tool_basename="${tool_specified##*/}"
30984        if test "x$tool_basename" = "x$tool_specified"; then
30985          # A command without a complete path is provided, search $PATH.
30986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30987$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30988          # Extract the first word of "$tool_basename", so it can be a program name with args.
30989set dummy $tool_basename; ac_word=$2
30990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30991$as_echo_n "checking for $ac_word... " >&6; }
30992if ${ac_cv_path_JARSIGNER+:} false; then :
30993  $as_echo_n "(cached) " >&6
30994else
30995  case $JARSIGNER in
30996  [\\/]* | ?:[\\/]*)
30997  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30998  ;;
30999  *)
31000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31001for as_dir in $PATH
31002do
31003  IFS=$as_save_IFS
31004  test -z "$as_dir" && as_dir=.
31005    for ac_exec_ext in '' $ac_executable_extensions; do
31006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31007    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31009    break 2
31010  fi
31011done
31012  done
31013IFS=$as_save_IFS
31014
31015  ;;
31016esac
31017fi
31018JARSIGNER=$ac_cv_path_JARSIGNER
31019if test -n "$JARSIGNER"; then
31020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31021$as_echo "$JARSIGNER" >&6; }
31022else
31023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31024$as_echo "no" >&6; }
31025fi
31026
31027
31028          if test "x$JARSIGNER" = x; then
31029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31030          fi
31031        else
31032          # Otherwise we believe it is a complete path. Use it as it is.
31033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31034$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31036$as_echo_n "checking for JARSIGNER... " >&6; }
31037          if test ! -x "$tool_specified"; then
31038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31039$as_echo "not found" >&6; }
31040            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31041          fi
31042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31043$as_echo "$tool_specified" >&6; }
31044        fi
31045      fi
31046    fi
31047
31048  fi
31049
31050
31051
31052  # Finally, set some other options...
31053
31054  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31055  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31056
31057
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31059$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31060  if "$JAVA" --list-modules > /dev/null 2>&1; then
31061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31062$as_echo "yes" >&6; }
31063    BOOT_JDK_MODULAR="true"
31064  else
31065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31066$as_echo "no" >&6; }
31067    BOOT_JDK_MODULAR="false"
31068  fi
31069
31070
31071
31072
31073  # Check if the boot jdk is 32 or 64 bit
31074  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31075    BOOT_JDK_BITS="64"
31076  else
31077    BOOT_JDK_BITS="32"
31078  fi
31079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31080$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31082$as_echo "$BOOT_JDK_BITS" >&6; }
31083
31084
31085
31086# Check whether --with-build-jdk was given.
31087if test "${with_build_jdk+set}" = set; then :
31088  withval=$with_build_jdk;
31089fi
31090
31091
31092  CREATE_BUILDJDK=false
31093  EXTERNAL_BUILDJDK=false
31094  BUILD_JDK_FOUND="no"
31095  if test "x$with_build_jdk" != "x"; then
31096
31097  if test "x$BUILD_JDK_FOUND" = xno; then
31098    # Execute the test
31099
31100       if test "x$with_build_jdk" != x; then
31101         BUILD_JDK=$with_build_jdk
31102         BUILD_JDK_FOUND=maybe
31103         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31104$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31105       fi
31106
31107    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31108    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31109      # Do we have a bin/java?
31110      if test ! -x "$BUILD_JDK/bin/java"; then
31111        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31112$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31113        BUILD_JDK_FOUND=no
31114      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31115        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31116$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31117        BUILD_JDK_FOUND=no
31118      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31120$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31121        BUILD_JDK_FOUND=no
31122      elif test ! -x "$BUILD_JDK/bin/javac"; then
31123        # Do we have a bin/javac?
31124        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31125$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31127$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31128        BUILD_JDK_FOUND=no
31129      else
31130        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31131        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31132
31133        # Extra M4 quote needed to protect [] in grep expression.
31134        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31135        if test "x$FOUND_CORRECT_VERSION" = x; then
31136          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31137$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31138          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31139$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31140          BUILD_JDK_FOUND=no
31141        else
31142          # We're done!
31143          BUILD_JDK_FOUND=yes
31144
31145  # Only process if variable expands to non-empty
31146
31147  if test "x$BUILD_JDK" != x; then
31148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31149
31150  # Input might be given as Windows format, start by converting to
31151  # unix format.
31152  path="$BUILD_JDK"
31153  new_path=`$CYGPATH -u "$path"`
31154
31155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31158  # "foo.exe" is OK but "foo" is an error.
31159  #
31160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31161  # It is also a way to make sure we got the proper file name for the real test later on.
31162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31163  if test "x$test_shortpath" = x; then
31164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31165$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31166    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31167  fi
31168
31169  # Call helper function which possibly converts this using DOS-style short mode.
31170  # If so, the updated path is stored in $new_path.
31171
31172  input_path="$new_path"
31173  # Check if we need to convert this using DOS-style short mode. If the path
31174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31175  # take no chances and rewrite it.
31176  # Note: m4 eats our [], so we need to use [ and ] instead.
31177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31178  if test "x$has_forbidden_chars" != x; then
31179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31183      # Going to short mode and back again did indeed matter. Since short mode is
31184      # case insensitive, let's make it lowercase to improve readability.
31185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31186      # Now convert it back to Unix-style (cygpath)
31187      input_path=`$CYGPATH -u "$shortmode_path"`
31188      new_path="$input_path"
31189    fi
31190  fi
31191
31192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31193  if test "x$test_cygdrive_prefix" = x; then
31194    # As a simple fix, exclude /usr/bin since it's not a real path.
31195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31197      # a path prefixed by /cygdrive for fixpath to work.
31198      new_path="$CYGWIN_ROOT_PATH$input_path"
31199    fi
31200  fi
31201
31202
31203  if test "x$path" != "x$new_path"; then
31204    BUILD_JDK="$new_path"
31205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31206$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31207  fi
31208
31209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31210
31211  path="$BUILD_JDK"
31212  has_colon=`$ECHO $path | $GREP ^.:`
31213  new_path="$path"
31214  if test "x$has_colon" = x; then
31215    # Not in mixed or Windows style, start by that.
31216    new_path=`cmd //c echo $path`
31217  fi
31218
31219
31220  input_path="$new_path"
31221  # Check if we need to convert this using DOS-style short mode. If the path
31222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31223  # take no chances and rewrite it.
31224  # Note: m4 eats our [], so we need to use [ and ] instead.
31225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31226  if test "x$has_forbidden_chars" != x; then
31227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31229  fi
31230
31231
31232  windows_path="$new_path"
31233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31234    unix_path=`$CYGPATH -u "$windows_path"`
31235    new_path="$unix_path"
31236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31238    new_path="$unix_path"
31239  fi
31240
31241  if test "x$path" != "x$new_path"; then
31242    BUILD_JDK="$new_path"
31243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31244$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31245  fi
31246
31247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31249
31250    else
31251      # We're on a unix platform. Hooray! :)
31252      path="$BUILD_JDK"
31253      has_space=`$ECHO "$path" | $GREP " "`
31254      if test "x$has_space" != x; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31256$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31258      fi
31259
31260      # Use eval to expand a potential ~
31261      eval path="$path"
31262      if test ! -f "$path" && test ! -d "$path"; then
31263        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31264      fi
31265
31266      if test -d "$path"; then
31267        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31268      else
31269        dir="`$DIRNAME "$path"`"
31270        base="`$BASENAME "$path"`"
31271        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31272      fi
31273    fi
31274  fi
31275
31276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31277$as_echo_n "checking for Build JDK... " >&6; }
31278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31279$as_echo "$BUILD_JDK" >&6; }
31280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31281$as_echo_n "checking Build JDK version... " >&6; }
31282          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31284$as_echo "$BUILD_JDK_VERSION" >&6; }
31285        fi # end check jdk version
31286      fi # end check java
31287    fi # end check build jdk found
31288  fi
31289
31290    EXTERNAL_BUILDJDK=true
31291  else
31292    if test "x$COMPILE_TYPE" = "xcross"; then
31293      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31294      BUILD_JDK_FOUND=yes
31295      CREATE_BUILDJDK=true
31296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31297$as_echo_n "checking for Build JDK... " >&6; }
31298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31299$as_echo "yes, will build it for the host platform" >&6; }
31300    else
31301      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31302      BUILD_JDK_FOUND=yes
31303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31304$as_echo_n "checking for Build JDK... " >&6; }
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31306$as_echo "yes, will use output dir" >&6; }
31307    fi
31308  fi
31309
31310  JMOD="$BUILD_JDK/bin/jmod"
31311  JLINK="$BUILD_JDK/bin/jlink"
31312
31313
31314
31315  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31317$as_echo_n "checking for Build JDK... " >&6; }
31318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31319$as_echo "no" >&6; }
31320    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31321  fi
31322
31323
31324
31325
31326
31327
31328###############################################################################
31329#
31330# Configure the sources to use. We can add or override individual directories.
31331#
31332###############################################################################
31333
31334
31335  # Where are the sources.
31336  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31337  CORBA_TOPDIR="$SRC_ROOT/corba"
31338  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31339  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31340  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31341  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31342  JDK_TOPDIR="$SRC_ROOT/jdk"
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352  # This feature is no longer supported.
31353
31354
31355
31356# Check whether --with-add-source-root was given.
31357if test "${with_add_source_root+set}" = set; then :
31358  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
31359$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31360fi
31361
31362
31363
31364
31365# Check whether --with-override-source-root was given.
31366if test "${with_override_source_root+set}" = set; then :
31367  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
31368$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31369fi
31370
31371
31372
31373
31374# Check whether --with-adds-and-overrides was given.
31375if test "${with_adds_and_overrides+set}" = set; then :
31376  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
31377$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31378fi
31379
31380
31381
31382
31383# Check whether --with-override-langtools was given.
31384if test "${with_override_langtools+set}" = set; then :
31385  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31386$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31387fi
31388
31389
31390
31391
31392# Check whether --with-override-corba was given.
31393if test "${with_override_corba+set}" = set; then :
31394  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31395$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31396fi
31397
31398
31399
31400
31401# Check whether --with-override-jaxp was given.
31402if test "${with_override_jaxp+set}" = set; then :
31403  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31404$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31405fi
31406
31407
31408
31409
31410# Check whether --with-override-jaxws was given.
31411if test "${with_override_jaxws+set}" = set; then :
31412  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31413$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31414fi
31415
31416
31417
31418
31419# Check whether --with-override-hotspot was given.
31420if test "${with_override_hotspot+set}" = set; then :
31421  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31422$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31423fi
31424
31425
31426
31427
31428# Check whether --with-override-nashorn was given.
31429if test "${with_override_nashorn+set}" = set; then :
31430  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31431$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31432fi
31433
31434
31435
31436
31437# Check whether --with-override-jdk was given.
31438if test "${with_override_jdk+set}" = set; then :
31439  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31440$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31441fi
31442
31443
31444
31445
31446  BUILD_OUTPUT="$OUTPUT_ROOT"
31447
31448  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31449
31450
31451
31452# Check whether --with-import_hotspot was given.
31453if test "${with_import_hotspot+set}" = set; then :
31454  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31455$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31456fi
31457
31458
31459
31460
31461
31462
31463# Check whether --with-import-modules was given.
31464if test "${with_import_modules+set}" = set; then :
31465  withval=$with_import_modules;
31466fi
31467
31468
31469  if test "x$with_import_modules" != x \
31470      && test "x$with_import_modules" != "xno"; then
31471    if test -d "$with_import_modules"; then
31472      IMPORT_MODULES_TOPDIR="$with_import_modules"
31473
31474  # Only process if variable expands to non-empty
31475
31476  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31478
31479  # Input might be given as Windows format, start by converting to
31480  # unix format.
31481  path="$IMPORT_MODULES_TOPDIR"
31482  new_path=`$CYGPATH -u "$path"`
31483
31484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31487  # "foo.exe" is OK but "foo" is an error.
31488  #
31489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31490  # It is also a way to make sure we got the proper file name for the real test later on.
31491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31492  if test "x$test_shortpath" = x; then
31493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31494$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31495    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31496  fi
31497
31498  # Call helper function which possibly converts this using DOS-style short mode.
31499  # If so, the updated path is stored in $new_path.
31500
31501  input_path="$new_path"
31502  # Check if we need to convert this using DOS-style short mode. If the path
31503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31504  # take no chances and rewrite it.
31505  # Note: m4 eats our [], so we need to use [ and ] instead.
31506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31507  if test "x$has_forbidden_chars" != x; then
31508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31512      # Going to short mode and back again did indeed matter. Since short mode is
31513      # case insensitive, let's make it lowercase to improve readability.
31514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31515      # Now convert it back to Unix-style (cygpath)
31516      input_path=`$CYGPATH -u "$shortmode_path"`
31517      new_path="$input_path"
31518    fi
31519  fi
31520
31521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31522  if test "x$test_cygdrive_prefix" = x; then
31523    # As a simple fix, exclude /usr/bin since it's not a real path.
31524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31526      # a path prefixed by /cygdrive for fixpath to work.
31527      new_path="$CYGWIN_ROOT_PATH$input_path"
31528    fi
31529  fi
31530
31531
31532  if test "x$path" != "x$new_path"; then
31533    IMPORT_MODULES_TOPDIR="$new_path"
31534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31535$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31536  fi
31537
31538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31539
31540  path="$IMPORT_MODULES_TOPDIR"
31541  has_colon=`$ECHO $path | $GREP ^.:`
31542  new_path="$path"
31543  if test "x$has_colon" = x; then
31544    # Not in mixed or Windows style, start by that.
31545    new_path=`cmd //c echo $path`
31546  fi
31547
31548
31549  input_path="$new_path"
31550  # Check if we need to convert this using DOS-style short mode. If the path
31551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31552  # take no chances and rewrite it.
31553  # Note: m4 eats our [], so we need to use [ and ] instead.
31554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31555  if test "x$has_forbidden_chars" != x; then
31556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31558  fi
31559
31560
31561  windows_path="$new_path"
31562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31563    unix_path=`$CYGPATH -u "$windows_path"`
31564    new_path="$unix_path"
31565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31567    new_path="$unix_path"
31568  fi
31569
31570  if test "x$path" != "x$new_path"; then
31571    IMPORT_MODULES_TOPDIR="$new_path"
31572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31573$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31574  fi
31575
31576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31578
31579    else
31580      # We're on a unix platform. Hooray! :)
31581      path="$IMPORT_MODULES_TOPDIR"
31582      has_space=`$ECHO "$path" | $GREP " "`
31583      if test "x$has_space" != x; then
31584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31585$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31587      fi
31588
31589      # Use eval to expand a potential ~
31590      eval path="$path"
31591      if test ! -f "$path" && test ! -d "$path"; then
31592        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31593      fi
31594
31595      if test -d "$path"; then
31596        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31597      else
31598        dir="`$DIRNAME "$path"`"
31599        base="`$BASENAME "$path"`"
31600        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31601      fi
31602    fi
31603  fi
31604
31605    elif test -e "$with_import_modules"; then
31606      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31607      $RM -rf "$IMPORT_MODULES_TOPDIR"
31608      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31609      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31610        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31611      fi
31612    else
31613      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31614    fi
31615  fi
31616
31617  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31618    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31619  fi
31620  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31621    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31622  fi
31623  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31624    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31625  fi
31626  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31627    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31628  fi
31629  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31630    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31631  fi
31632  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31633    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31634  fi
31635  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31636    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31637  fi
31638  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31639    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31640  fi
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652###############################################################################
31653#
31654# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31655# native code.
31656#
31657###############################################################################
31658
31659# See if we are doing a complete static build or not
31660
31661  # Check whether --enable-static-build was given.
31662if test "${enable_static_build+set}" = set; then :
31663  enableval=$enable_static_build;
31664fi
31665
31666  STATIC_BUILD=false
31667  if test "x$enable_static_build" = "xyes"; then
31668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31669$as_echo_n "checking if static build is enabled... " >&6; }
31670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31671$as_echo "yes" >&6; }
31672    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31673      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31674    fi
31675    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31676    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31677    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31678    STATIC_BUILD=true
31679  elif test "x$enable_static_build" = "xno"; then
31680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31681$as_echo_n "checking if static build is enabled... " >&6; }
31682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31683$as_echo "no" >&6; }
31684  elif test "x$enable_static_build" != "x"; then
31685    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31686  fi
31687
31688
31689
31690
31691# First determine the toolchain type (compiler family)
31692
31693
31694# Check whether --with-toolchain-type was given.
31695if test "${with_toolchain_type+set}" = set; then :
31696  withval=$with_toolchain_type;
31697fi
31698
31699
31700  # Use indirect variable referencing
31701  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31702  VALID_TOOLCHAINS=${!toolchain_var_name}
31703
31704  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31705    if test -n "$XCODEBUILD"; then
31706      # On Mac OS X, default toolchain to clang after Xcode 5
31707      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31708      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31709      if test $? -ne 0; then
31710        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31711      fi
31712      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31713          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31714          $CUT -f 1 -d .`
31715      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31716$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31717      if test $XCODE_MAJOR_VERSION -ge 5; then
31718          DEFAULT_TOOLCHAIN="clang"
31719      else
31720          DEFAULT_TOOLCHAIN="gcc"
31721      fi
31722    else
31723      # If Xcode is not installed, but the command line tools are
31724      # then we can't run xcodebuild. On these systems we should
31725      # default to clang
31726      DEFAULT_TOOLCHAIN="clang"
31727    fi
31728  else
31729    # First toolchain type in the list is the default
31730    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31731  fi
31732
31733  if test "x$with_toolchain_type" = xlist; then
31734    # List all toolchains
31735    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31736$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31737    for toolchain in $VALID_TOOLCHAINS; do
31738      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31739      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31740      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31741    done
31742
31743    exit 0
31744  elif test "x$with_toolchain_type" != x; then
31745    # User override; check that it is valid
31746    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31747      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31748$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31749      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31750$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31751      as_fn_error $? "Cannot continue." "$LINENO" 5
31752    fi
31753    TOOLCHAIN_TYPE=$with_toolchain_type
31754  else
31755    # No flag given, use default
31756    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31757  fi
31758
31759
31760  TOOLCHAIN_CC_BINARY_clang="clang"
31761  TOOLCHAIN_CC_BINARY_gcc="gcc"
31762  TOOLCHAIN_CC_BINARY_microsoft="cl"
31763  TOOLCHAIN_CC_BINARY_solstudio="cc"
31764  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31765
31766  TOOLCHAIN_CXX_BINARY_clang="clang++"
31767  TOOLCHAIN_CXX_BINARY_gcc="g++"
31768  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31769  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31770  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31771
31772  # Use indirect variable referencing
31773  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31774  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31775  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31776  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31777  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31778  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31779  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31780  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31781
31782
31783  # Define filename patterns
31784  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31785    LIBRARY_PREFIX=
31786    SHARED_LIBRARY_SUFFIX='.dll'
31787    STATIC_LIBRARY_SUFFIX='.lib'
31788    SHARED_LIBRARY='$1.dll'
31789    STATIC_LIBRARY='$1.lib'
31790    OBJ_SUFFIX='.obj'
31791    EXE_SUFFIX='.exe'
31792  else
31793    LIBRARY_PREFIX=lib
31794    SHARED_LIBRARY_SUFFIX='.so'
31795    STATIC_LIBRARY_SUFFIX='.a'
31796    SHARED_LIBRARY='lib$1.so'
31797    STATIC_LIBRARY='lib$1.a'
31798    OBJ_SUFFIX='.o'
31799    EXE_SUFFIX=''
31800    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31801      # For full static builds, we're overloading the SHARED_LIBRARY
31802      # variables in order to limit the amount of changes required.
31803      # It would be better to remove SHARED and just use LIBRARY and
31804      # LIBRARY_SUFFIX for libraries that can be built either
31805      # shared or static and use STATIC_* for libraries that are
31806      # always built statically.
31807      if test "x$STATIC_BUILD" = xtrue; then
31808        SHARED_LIBRARY='lib$1.a'
31809        SHARED_LIBRARY_SUFFIX='.a'
31810      else
31811        SHARED_LIBRARY='lib$1.dylib'
31812        SHARED_LIBRARY_SUFFIX='.dylib'
31813      fi
31814    fi
31815  fi
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31827    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31828$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31829  else
31830    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31831$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31832  fi
31833
31834
31835# User supplied flags should be used when configure detects compilers
31836
31837  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31838    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31839$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31840  fi
31841
31842  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31843    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31844$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31845  fi
31846
31847  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31848    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31849$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31850  fi
31851
31852
31853# Check whether --with-extra-cflags was given.
31854if test "${with_extra_cflags+set}" = set; then :
31855  withval=$with_extra_cflags;
31856fi
31857
31858
31859
31860# Check whether --with-extra-cxxflags was given.
31861if test "${with_extra_cxxflags+set}" = set; then :
31862  withval=$with_extra_cxxflags;
31863fi
31864
31865
31866
31867# Check whether --with-extra-ldflags was given.
31868if test "${with_extra_ldflags+set}" = set; then :
31869  withval=$with_extra_ldflags;
31870fi
31871
31872
31873  EXTRA_CFLAGS="$with_extra_cflags"
31874  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31875  EXTRA_LDFLAGS="$with_extra_ldflags"
31876
31877
31878
31879
31880
31881  # The global CFLAGS and LDLAGS variables are used by configure tests and
31882  # should include the extra parameters
31883  CFLAGS="$EXTRA_CFLAGS"
31884  CXXFLAGS="$EXTRA_CXXFLAGS"
31885  LDFLAGS="$EXTRA_LDFLAGS"
31886  CPPFLAGS=""
31887
31888# The sysroot cflags are needed for configure to be able to run the compilers
31889
31890  if test "x$SYSROOT" != "x"; then
31891    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31892      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31893        # Solaris Studio does not have a concept of sysroot. Instead we must
31894        # make sure the default include and lib dirs are appended to each
31895        # compile and link command line. Must also add -I-xbuiltin to enable
31896        # inlining of system functions and intrinsics.
31897        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31898        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31899            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31900      fi
31901    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31902      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31903      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31904    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31905      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31906      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31907    fi
31908    # The global CFLAGS and LDFLAGS variables need these for configure to function
31909    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31910    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31911    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31912    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31913  fi
31914
31915  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31916    # We also need -iframework<path>/System/Library/Frameworks
31917    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31918    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31919    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31920    # set this here so it doesn't have to be peppered throughout the forest
31921    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31922    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31923  fi
31924
31925
31926
31927
31928
31929# Then detect the actual binaries needed
31930
31931  # FIXME: Is this needed?
31932  ac_ext=cpp
31933ac_cpp='$CXXCPP $CPPFLAGS'
31934ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31935ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31936ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31937
31938
31939  # Store the CFLAGS etc passed to the configure script.
31940  ORG_CFLAGS="$CFLAGS"
31941  ORG_CXXFLAGS="$CXXFLAGS"
31942
31943  # autoconf magic only relies on PATH, so update it if tools dir is specified
31944  OLD_PATH="$PATH"
31945
31946  # On Windows, we need to detect the visual studio installation first.
31947  # This will change the PATH, but we need to keep that new PATH even
31948  # after toolchain detection is done, since the compiler (on x86) uses
31949  # it for DLL resolution in runtime.
31950  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31951      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31952
31953  # Store path to cygwin link.exe to help excluding it when searching for
31954  # VS linker. This must be done before changing the PATH when looking for VS.
31955  # Extract the first word of "link", so it can be a program name with args.
31956set dummy link; ac_word=$2
31957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31958$as_echo_n "checking for $ac_word... " >&6; }
31959if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31960  $as_echo_n "(cached) " >&6
31961else
31962  case $CYGWIN_LINK in
31963  [\\/]* | ?:[\\/]*)
31964  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31965  ;;
31966  *)
31967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31968for as_dir in $PATH
31969do
31970  IFS=$as_save_IFS
31971  test -z "$as_dir" && as_dir=.
31972    for ac_exec_ext in '' $ac_executable_extensions; do
31973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31974    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31976    break 2
31977  fi
31978done
31979  done
31980IFS=$as_save_IFS
31981
31982  ;;
31983esac
31984fi
31985CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31986if test -n "$CYGWIN_LINK"; then
31987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31988$as_echo "$CYGWIN_LINK" >&6; }
31989else
31990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31991$as_echo "no" >&6; }
31992fi
31993
31994
31995  if test "x$CYGWIN_LINK" != x; then
31996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31997$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31998    "$CYGWIN_LINK" --version > /dev/null
31999    if test $? -eq 0 ; then
32000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32001$as_echo "yes" >&6; }
32002    else
32003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32004$as_echo "no" >&6; }
32005      # This might be the VS linker. Don't exclude it later on.
32006      CYGWIN_LINK=""
32007    fi
32008  fi
32009
32010  # First-hand choice is to locate and run the vsvars bat file.
32011
32012
32013# Check whether --with-toolchain-version was given.
32014if test "${with_toolchain_version+set}" = set; then :
32015  withval=$with_toolchain_version;
32016fi
32017
32018
32019  if test "x$with_toolchain_version" = xlist; then
32020    # List all toolchains
32021    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32022$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32023    for version in $VALID_VS_VERSIONS; do
32024      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32025      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32026    done
32027
32028    exit 0
32029  elif test "x$DEVKIT_VS_VERSION" != x; then
32030    VS_VERSION=$DEVKIT_VS_VERSION
32031    TOOLCHAIN_VERSION=$VS_VERSION
32032    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32033    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32034    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32035    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32036    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32037    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32038
32039    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32040    # can still be exported as INCLUDE for compiler invocations without
32041    # SYSROOT_CFLAGS
32042    OLDIFS="$IFS"
32043    IFS=";"
32044    for i in $DEVKIT_VS_INCLUDE; do
32045      ipath=$i
32046
32047  unix_path="$ipath"
32048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32049    windows_path=`$CYGPATH -m "$unix_path"`
32050    ipath="$windows_path"
32051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052    windows_path=`cmd //c echo $unix_path`
32053    ipath="$windows_path"
32054  fi
32055
32056      VS_INCLUDE="$VS_INCLUDE;$ipath"
32057    done
32058    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32059    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32060    for i in $DEVKIT_VS_LIB; do
32061      libpath=$i
32062
32063  unix_path="$libpath"
32064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32065    windows_path=`$CYGPATH -m "$unix_path"`
32066    libpath="$windows_path"
32067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32068    windows_path=`cmd //c echo $unix_path`
32069    libpath="$windows_path"
32070  fi
32071
32072      VS_LIB="$VS_LIB;$libpath"
32073    done
32074    IFS="$OLDIFS"
32075
32076    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32077$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32078
32079  elif test "x$with_toolchain_version" != x; then
32080    # User override; check that it is valid
32081    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32082      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32083$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32084      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32085$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32086      as_fn_error $? "Cannot continue." "$LINENO" 5
32087    fi
32088    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32089  else
32090    # No flag given, use default
32091    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32092  fi
32093
32094  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32095
32096  VS_VERSION="$VS_VERSION"
32097  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32098  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32099  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32100  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32101
32102  # When using --with-tools-dir, assume it points to the correct and default
32103  # version of Visual Studio or that --with-toolchain-version was also set.
32104  if test "x$with_tools_dir" != x; then
32105
32106  if test "x$VS_ENV_CMD" = x; then
32107    VS_VERSION="${VS_VERSION}"
32108    VS_BASE="$with_tools_dir/../.."
32109    METHOD="--with-tools-dir"
32110
32111    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32112      VCVARSFILE="vc/bin/vcvars32.bat"
32113    else
32114      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32115    fi
32116
32117
32118  windows_path="$VS_BASE"
32119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32120    unix_path=`$CYGPATH -u "$windows_path"`
32121    VS_BASE="$unix_path"
32122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32124    VS_BASE="$unix_path"
32125  fi
32126
32127    if test -d "$VS_BASE"; then
32128      if test -f "$VS_BASE/$VCVARSFILE"; then
32129        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32130$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32131        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32132        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32133        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32134        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32135      else
32136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32137$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32138        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32139$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32140      fi
32141    fi
32142  fi
32143
32144
32145  if test "x$VS_ENV_CMD" = x; then
32146    VS_VERSION="${VS_VERSION}"
32147    VS_BASE="$with_tools_dir/../../.."
32148    METHOD="--with-tools-dir"
32149
32150    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32151      VCVARSFILE="vc/bin/vcvars32.bat"
32152    else
32153      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32154    fi
32155
32156
32157  windows_path="$VS_BASE"
32158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32159    unix_path=`$CYGPATH -u "$windows_path"`
32160    VS_BASE="$unix_path"
32161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32163    VS_BASE="$unix_path"
32164  fi
32165
32166    if test -d "$VS_BASE"; then
32167      if test -f "$VS_BASE/$VCVARSFILE"; then
32168        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32169$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32170        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32171        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32172        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32173        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32174      else
32175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32176$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32177        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32178$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32179      fi
32180    fi
32181  fi
32182
32183    if test "x$VS_ENV_CMD" = x; then
32184      # Having specified an argument which is incorrect will produce an instant failure;
32185      # we should not go on looking
32186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32187$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32188      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32189$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32190      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32191$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32192      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32193    fi
32194  fi
32195
32196  VS_ENV_CMD=""
32197  VS_ENV_ARGS=""
32198
32199  if test "x$VS_COMNTOOLS" != x; then
32200
32201  if test "x$VS_ENV_CMD" = x; then
32202    VS_VERSION="${VS_VERSION}"
32203    VS_BASE="$VS_COMNTOOLS/../.."
32204    METHOD="$VS_COMNTOOLS_VAR variable"
32205
32206    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32207      VCVARSFILE="vc/bin/vcvars32.bat"
32208    else
32209      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32210    fi
32211
32212
32213  windows_path="$VS_BASE"
32214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32215    unix_path=`$CYGPATH -u "$windows_path"`
32216    VS_BASE="$unix_path"
32217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32219    VS_BASE="$unix_path"
32220  fi
32221
32222    if test -d "$VS_BASE"; then
32223      if test -f "$VS_BASE/$VCVARSFILE"; then
32224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32225$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32226        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32227        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32228        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32229        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32230      else
32231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32232$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32233        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32234$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32235      fi
32236    fi
32237  fi
32238
32239  fi
32240  if test "x$PROGRAMFILES" != x; then
32241
32242  if test "x$VS_ENV_CMD" = x; then
32243    VS_VERSION="${VS_VERSION}"
32244    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32245    METHOD="well-known name"
32246
32247    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32248      VCVARSFILE="vc/bin/vcvars32.bat"
32249    else
32250      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32251    fi
32252
32253
32254  windows_path="$VS_BASE"
32255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32256    unix_path=`$CYGPATH -u "$windows_path"`
32257    VS_BASE="$unix_path"
32258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32260    VS_BASE="$unix_path"
32261  fi
32262
32263    if test -d "$VS_BASE"; then
32264      if test -f "$VS_BASE/$VCVARSFILE"; then
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32266$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32267        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32268        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32269        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32270        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32271      else
32272        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32273$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32275$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32276      fi
32277    fi
32278  fi
32279
32280  fi
32281  # Work around the insanely named ProgramFiles(x86) env variable
32282  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32283  if test "x$PROGRAMFILES_X86" != x; then
32284
32285  if test "x$VS_ENV_CMD" = x; then
32286    VS_VERSION="${VS_VERSION}"
32287    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32288    METHOD="well-known name"
32289
32290    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32291      VCVARSFILE="vc/bin/vcvars32.bat"
32292    else
32293      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32294    fi
32295
32296
32297  windows_path="$VS_BASE"
32298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32299    unix_path=`$CYGPATH -u "$windows_path"`
32300    VS_BASE="$unix_path"
32301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32303    VS_BASE="$unix_path"
32304  fi
32305
32306    if test -d "$VS_BASE"; then
32307      if test -f "$VS_BASE/$VCVARSFILE"; then
32308        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32309$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32310        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32311        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32312        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32313        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32314      else
32315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32316$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32317        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32318$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32319      fi
32320    fi
32321  fi
32322
32323  fi
32324
32325  if test "x$VS_ENV_CMD" = x; then
32326    VS_VERSION="${VS_VERSION}"
32327    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32328    METHOD="well-known name"
32329
32330    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32331      VCVARSFILE="vc/bin/vcvars32.bat"
32332    else
32333      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32334    fi
32335
32336
32337  windows_path="$VS_BASE"
32338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32339    unix_path=`$CYGPATH -u "$windows_path"`
32340    VS_BASE="$unix_path"
32341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32343    VS_BASE="$unix_path"
32344  fi
32345
32346    if test -d "$VS_BASE"; then
32347      if test -f "$VS_BASE/$VCVARSFILE"; then
32348        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32349$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32350        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32351        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32352        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32353        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32354      else
32355        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32356$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32357        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32358$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32359      fi
32360    fi
32361  fi
32362
32363
32364  if test "x$VS_ENV_CMD" = x; then
32365    VS_VERSION="${VS_VERSION}"
32366    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32367    METHOD="well-known name"
32368
32369    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32370      VCVARSFILE="vc/bin/vcvars32.bat"
32371    else
32372      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32373    fi
32374
32375
32376  windows_path="$VS_BASE"
32377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32378    unix_path=`$CYGPATH -u "$windows_path"`
32379    VS_BASE="$unix_path"
32380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32382    VS_BASE="$unix_path"
32383  fi
32384
32385    if test -d "$VS_BASE"; then
32386      if test -f "$VS_BASE/$VCVARSFILE"; then
32387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32388$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32389        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32390        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32391        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32392        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32393      else
32394        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32395$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32396        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32397$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32398      fi
32399    fi
32400  fi
32401
32402
32403  if test "x$SDK_INSTALL_DIR" != x; then
32404    if test "x$ProgramW6432" != x; then
32405
32406  if test "x$VS_ENV_CMD" = x; then
32407    VS_VERSION="${VS_VERSION}"
32408    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32409    METHOD="well-known name"
32410
32411  windows_path="$WIN_SDK_BASE"
32412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32413    unix_path=`$CYGPATH -u "$windows_path"`
32414    WIN_SDK_BASE="$unix_path"
32415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32417    WIN_SDK_BASE="$unix_path"
32418  fi
32419
32420    if test -d "$WIN_SDK_BASE"; then
32421      # There have been cases of partial or broken SDK installations. A missing
32422      # lib dir is not going to work.
32423      if test ! -d "$WIN_SDK_BASE/lib"; then
32424        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32425$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32426        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32427$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32428      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32429        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32430$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32431        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32432        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32433          VS_ENV_ARGS="/x86"
32434        else
32435          VS_ENV_ARGS="/x64"
32436        fi
32437        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32438        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32439        # TODO: improve detection for other versions of SDK
32440        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32441      else
32442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32443$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32444        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32445$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32446      fi
32447    fi
32448  fi
32449
32450    fi
32451    if test "x$PROGRAMW6432" != x; then
32452
32453  if test "x$VS_ENV_CMD" = x; then
32454    VS_VERSION="${VS_VERSION}"
32455    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32456    METHOD="well-known name"
32457
32458  windows_path="$WIN_SDK_BASE"
32459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32460    unix_path=`$CYGPATH -u "$windows_path"`
32461    WIN_SDK_BASE="$unix_path"
32462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32464    WIN_SDK_BASE="$unix_path"
32465  fi
32466
32467    if test -d "$WIN_SDK_BASE"; then
32468      # There have been cases of partial or broken SDK installations. A missing
32469      # lib dir is not going to work.
32470      if test ! -d "$WIN_SDK_BASE/lib"; then
32471        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32472$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32473        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32474$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32475      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32476        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32477$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32478        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32479        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32480          VS_ENV_ARGS="/x86"
32481        else
32482          VS_ENV_ARGS="/x64"
32483        fi
32484        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32485        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32486        # TODO: improve detection for other versions of SDK
32487        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32488      else
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32490$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32491        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32492$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32493      fi
32494    fi
32495  fi
32496
32497    fi
32498    if test "x$PROGRAMFILES" != x; then
32499
32500  if test "x$VS_ENV_CMD" = x; then
32501    VS_VERSION="${VS_VERSION}"
32502    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32503    METHOD="well-known name"
32504
32505  windows_path="$WIN_SDK_BASE"
32506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32507    unix_path=`$CYGPATH -u "$windows_path"`
32508    WIN_SDK_BASE="$unix_path"
32509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32511    WIN_SDK_BASE="$unix_path"
32512  fi
32513
32514    if test -d "$WIN_SDK_BASE"; then
32515      # There have been cases of partial or broken SDK installations. A missing
32516      # lib dir is not going to work.
32517      if test ! -d "$WIN_SDK_BASE/lib"; then
32518        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32519$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32520        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32521$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32522      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32524$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32525        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32526        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32527          VS_ENV_ARGS="/x86"
32528        else
32529          VS_ENV_ARGS="/x64"
32530        fi
32531        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32532        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32533        # TODO: improve detection for other versions of SDK
32534        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32535      else
32536        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32537$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32539$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32540      fi
32541    fi
32542  fi
32543
32544    fi
32545
32546  if test "x$VS_ENV_CMD" = x; then
32547    VS_VERSION="${VS_VERSION}"
32548    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32549    METHOD="well-known name"
32550
32551  windows_path="$WIN_SDK_BASE"
32552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32553    unix_path=`$CYGPATH -u "$windows_path"`
32554    WIN_SDK_BASE="$unix_path"
32555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32557    WIN_SDK_BASE="$unix_path"
32558  fi
32559
32560    if test -d "$WIN_SDK_BASE"; then
32561      # There have been cases of partial or broken SDK installations. A missing
32562      # lib dir is not going to work.
32563      if test ! -d "$WIN_SDK_BASE/lib"; then
32564        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32565$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32566        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32567$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32568      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32571        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32572        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32573          VS_ENV_ARGS="/x86"
32574        else
32575          VS_ENV_ARGS="/x64"
32576        fi
32577        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32578        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32579        # TODO: improve detection for other versions of SDK
32580        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32581      else
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32583$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32585$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32586      fi
32587    fi
32588  fi
32589
32590
32591  if test "x$VS_ENV_CMD" = x; then
32592    VS_VERSION="${VS_VERSION}"
32593    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32594    METHOD="well-known name"
32595
32596  windows_path="$WIN_SDK_BASE"
32597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32598    unix_path=`$CYGPATH -u "$windows_path"`
32599    WIN_SDK_BASE="$unix_path"
32600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32602    WIN_SDK_BASE="$unix_path"
32603  fi
32604
32605    if test -d "$WIN_SDK_BASE"; then
32606      # There have been cases of partial or broken SDK installations. A missing
32607      # lib dir is not going to work.
32608      if test ! -d "$WIN_SDK_BASE/lib"; then
32609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32610$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32611        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32612$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32613      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32614        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32615$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32616        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32617        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32618          VS_ENV_ARGS="/x86"
32619        else
32620          VS_ENV_ARGS="/x64"
32621        fi
32622        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32623        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32624        # TODO: improve detection for other versions of SDK
32625        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32626      else
32627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32628$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32629        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32630$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32631      fi
32632    fi
32633  fi
32634
32635  fi
32636
32637    if test "x$VS_ENV_CMD" != x; then
32638      TOOLCHAIN_VERSION=$VS_VERSION
32639      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32640      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32641      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32642      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32643      # The rest of the variables are already evaled while probing
32644      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32645$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32646      break
32647    fi
32648  done
32649
32650
32651  # If we have a devkit, skip all of the below.
32652  if test "x$DEVKIT_VS_VERSION" = x; then
32653    if test "x$VS_ENV_CMD" != x; then
32654      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32655
32656  # Only process if variable expands to non-empty
32657
32658  if test "x$VS_ENV_CMD" != x; then
32659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32660
32661  # First separate the path from the arguments. This will split at the first
32662  # space.
32663  complete="$VS_ENV_CMD"
32664  path="${complete%% *}"
32665  tmp="$complete EOL"
32666  arguments="${tmp#* }"
32667
32668  # Input might be given as Windows format, start by converting to
32669  # unix format.
32670  new_path=`$CYGPATH -u "$path"`
32671
32672  # Now try to locate executable using which
32673  new_path=`$WHICH "$new_path" 2> /dev/null`
32674  # bat and cmd files are not always considered executable in cygwin causing which
32675  # to not find them
32676  if test "x$new_path" = x \
32677      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32678      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32679    new_path=`$CYGPATH -u "$path"`
32680  fi
32681  if test "x$new_path" = x; then
32682    # Oops. Which didn't find the executable.
32683    # The splitting of arguments from the executable at a space might have been incorrect,
32684    # since paths with space are more likely in Windows. Give it another try with the whole
32685    # argument.
32686    path="$complete"
32687    arguments="EOL"
32688    new_path=`$CYGPATH -u "$path"`
32689    new_path=`$WHICH "$new_path" 2> /dev/null`
32690    # bat and cmd files are not always considered executable in cygwin causing which
32691    # to not find them
32692    if test "x$new_path" = x \
32693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32695      new_path=`$CYGPATH -u "$path"`
32696    fi
32697    if test "x$new_path" = x; then
32698      # It's still not found. Now this is an unrecoverable error.
32699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32700$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32701      has_space=`$ECHO "$complete" | $GREP " "`
32702      if test "x$has_space" != x; then
32703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32705      fi
32706      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32707    fi
32708  fi
32709
32710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32713  # "foo.exe" is OK but "foo" is an error.
32714  #
32715  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32716  # It is also a way to make sure we got the proper file name for the real test later on.
32717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32718  if test "x$test_shortpath" = x; then
32719    # Short path failed, file does not exist as specified.
32720    # Try adding .exe or .cmd
32721    if test -f "${new_path}.exe"; then
32722      input_to_shortpath="${new_path}.exe"
32723    elif test -f "${new_path}.cmd"; then
32724      input_to_shortpath="${new_path}.cmd"
32725    else
32726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32727$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32730      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32731    fi
32732  else
32733    input_to_shortpath="$new_path"
32734  fi
32735
32736  # Call helper function which possibly converts this using DOS-style short mode.
32737  # If so, the updated path is stored in $new_path.
32738  new_path="$input_to_shortpath"
32739
32740  input_path="$input_to_shortpath"
32741  # Check if we need to convert this using DOS-style short mode. If the path
32742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32743  # take no chances and rewrite it.
32744  # Note: m4 eats our [], so we need to use [ and ] instead.
32745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32746  if test "x$has_forbidden_chars" != x; then
32747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32751      # Going to short mode and back again did indeed matter. Since short mode is
32752      # case insensitive, let's make it lowercase to improve readability.
32753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32754      # Now convert it back to Unix-style (cygpath)
32755      input_path=`$CYGPATH -u "$shortmode_path"`
32756      new_path="$input_path"
32757    fi
32758  fi
32759
32760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32761  if test "x$test_cygdrive_prefix" = x; then
32762    # As a simple fix, exclude /usr/bin since it's not a real path.
32763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32765      # a path prefixed by /cygdrive for fixpath to work.
32766      new_path="$CYGWIN_ROOT_PATH$input_path"
32767    fi
32768  fi
32769
32770  # remove trailing .exe if any
32771  new_path="${new_path/%.exe/}"
32772
32773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32774
32775  # First separate the path from the arguments. This will split at the first
32776  # space.
32777  complete="$VS_ENV_CMD"
32778  path="${complete%% *}"
32779  tmp="$complete EOL"
32780  arguments="${tmp#* }"
32781
32782  # Input might be given as Windows format, start by converting to
32783  # unix format.
32784  new_path="$path"
32785
32786  windows_path="$new_path"
32787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32788    unix_path=`$CYGPATH -u "$windows_path"`
32789    new_path="$unix_path"
32790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32792    new_path="$unix_path"
32793  fi
32794
32795
32796  # Now try to locate executable using which
32797  new_path=`$WHICH "$new_path" 2> /dev/null`
32798
32799  if test "x$new_path" = x; then
32800    # Oops. Which didn't find the executable.
32801    # The splitting of arguments from the executable at a space might have been incorrect,
32802    # since paths with space are more likely in Windows. Give it another try with the whole
32803    # argument.
32804    path="$complete"
32805    arguments="EOL"
32806    new_path="$path"
32807
32808  windows_path="$new_path"
32809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32810    unix_path=`$CYGPATH -u "$windows_path"`
32811    new_path="$unix_path"
32812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32814    new_path="$unix_path"
32815  fi
32816
32817
32818    new_path=`$WHICH "$new_path" 2> /dev/null`
32819    # bat and cmd files are not always considered executable in MSYS causing which
32820    # to not find them
32821    if test "x$new_path" = x \
32822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32824      new_path="$path"
32825
32826  windows_path="$new_path"
32827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32828    unix_path=`$CYGPATH -u "$windows_path"`
32829    new_path="$unix_path"
32830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32832    new_path="$unix_path"
32833  fi
32834
32835    fi
32836
32837    if test "x$new_path" = x; then
32838      # It's still not found. Now this is an unrecoverable error.
32839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32840$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32841      has_space=`$ECHO "$complete" | $GREP " "`
32842      if test "x$has_space" != x; then
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32845      fi
32846      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32847    fi
32848  fi
32849
32850  # Now new_path has a complete unix path to the binary
32851  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32852    # Keep paths in /bin as-is, but remove trailing .exe if any
32853    new_path="${new_path/%.exe/}"
32854    # Do not save /bin paths to all_fixpath_prefixes!
32855  else
32856    # Not in mixed or Windows style, start by that.
32857    new_path=`cmd //c echo $new_path`
32858
32859  input_path="$new_path"
32860  # Check if we need to convert this using DOS-style short mode. If the path
32861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32862  # take no chances and rewrite it.
32863  # Note: m4 eats our [], so we need to use [ and ] instead.
32864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32865  if test "x$has_forbidden_chars" != x; then
32866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32868  fi
32869
32870    # Output is in $new_path
32871
32872  windows_path="$new_path"
32873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874    unix_path=`$CYGPATH -u "$windows_path"`
32875    new_path="$unix_path"
32876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32878    new_path="$unix_path"
32879  fi
32880
32881    # remove trailing .exe if any
32882    new_path="${new_path/%.exe/}"
32883
32884    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32885    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32886  fi
32887
32888    else
32889      # We're on a unix platform. Hooray! :)
32890      # First separate the path from the arguments. This will split at the first
32891      # space.
32892      complete="$VS_ENV_CMD"
32893      path="${complete%% *}"
32894      tmp="$complete EOL"
32895      arguments="${tmp#* }"
32896
32897      # Cannot rely on the command "which" here since it doesn't always work.
32898      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32899      if test -z "$is_absolute_path"; then
32900        # Path to executable is not absolute. Find it.
32901        IFS_save="$IFS"
32902        IFS=:
32903        for p in $PATH; do
32904          if test -f "$p/$path" && test -x "$p/$path"; then
32905            new_path="$p/$path"
32906            break
32907          fi
32908        done
32909        IFS="$IFS_save"
32910      else
32911        # This is an absolute path, we can use it without further modifications.
32912        new_path="$path"
32913      fi
32914
32915      if test "x$new_path" = x; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32917$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32918        has_space=`$ECHO "$complete" | $GREP " "`
32919        if test "x$has_space" != x; then
32920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32922        fi
32923        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32924      fi
32925    fi
32926
32927    # Now join together the path and the arguments once again
32928    if test "x$arguments" != xEOL; then
32929      new_complete="$new_path ${arguments% *}"
32930    else
32931      new_complete="$new_path"
32932    fi
32933
32934    if test "x$complete" != "x$new_complete"; then
32935      VS_ENV_CMD="$new_complete"
32936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32937$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32938    fi
32939  fi
32940
32941
32942      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32943      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32944$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32945
32946      # We need to create a couple of temporary files.
32947      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32948      $MKDIR -p $VS_ENV_TMP_DIR
32949
32950      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32951      # Instead create a shell script which will set the relevant variables when run.
32952      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32953
32954  unix_path="$WINPATH_VS_ENV_CMD"
32955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32956    windows_path=`$CYGPATH -m "$unix_path"`
32957    WINPATH_VS_ENV_CMD="$windows_path"
32958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32959    windows_path=`cmd //c echo $unix_path`
32960    WINPATH_VS_ENV_CMD="$windows_path"
32961  fi
32962
32963      WINPATH_BASH="$BASH"
32964
32965  unix_path="$WINPATH_BASH"
32966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32967    windows_path=`$CYGPATH -m "$unix_path"`
32968    WINPATH_BASH="$windows_path"
32969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32970    windows_path=`cmd //c echo $unix_path`
32971    WINPATH_BASH="$windows_path"
32972  fi
32973
32974
32975      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32976      # script (executable by bash) that will setup the important variables.
32977      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32978      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32979      # This will end up something like:
32980      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32981      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32982      # These will end up something like:
32983      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32984      # The trailing space for everyone except PATH is no typo, but is needed due
32985      # to trailing \ in the Windows paths. These will be stripped later.
32986      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32987          >> $EXTRACT_VC_ENV_BAT_FILE
32988      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32989          >> $EXTRACT_VC_ENV_BAT_FILE
32990      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32991          >> $EXTRACT_VC_ENV_BAT_FILE
32992      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32993          >> $EXTRACT_VC_ENV_BAT_FILE
32994      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32995          >> $EXTRACT_VC_ENV_BAT_FILE
32996      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32997          >> $EXTRACT_VC_ENV_BAT_FILE
32998
32999      # Now execute the newly created bat file.
33000      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33001      # Change directory so we don't need to mess with Windows paths in redirects.
33002      cd $VS_ENV_TMP_DIR
33003      cmd /c extract-vs-env.bat | $CAT
33004      cd $CURDIR
33005
33006      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33007        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33008$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33009        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33010$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33011        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33012$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33013        as_fn_error $? "Cannot continue" "$LINENO" 5
33014      fi
33015
33016      # Now set all paths and other env variables. This will allow the rest of
33017      # the configure script to find and run the compiler in the proper way.
33018      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33019$as_echo "$as_me: Setting extracted environment variables" >&6;}
33020      . $VS_ENV_TMP_DIR/set-vs-env.sh
33021      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33022      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33023    else
33024      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33025      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33026$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33027    fi
33028  fi
33029
33030  # At this point, we should have correct variables in the environment, or we can't continue.
33031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33032$as_echo_n "checking for Visual Studio variables... " >&6; }
33033
33034  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33035      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33036    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33038$as_echo "present but broken" >&6; }
33039      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33040    else
33041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33042$as_echo "ok" >&6; }
33043      # Remove any trailing "\" ";" and " " from the variables.
33044      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33045      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33046      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33047      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33048      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33049      # Remove any paths containing # (typically F#) as that messes up make. This
33050      # is needed if visual studio was installed with F# support.
33051      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33052
33053
33054
33055
33056
33057      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33058      OLDIFS="$IFS"
33059      IFS=";"
33060      for i in $VS_INCLUDE; do
33061        ipath=$i
33062        # Only process non-empty elements
33063        if test "x$ipath" != x; then
33064          IFS="$OLDIFS"
33065          # Check that directory exists before calling fixup_path
33066          testpath=$ipath
33067
33068  windows_path="$testpath"
33069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33070    unix_path=`$CYGPATH -u "$windows_path"`
33071    testpath="$unix_path"
33072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33074    testpath="$unix_path"
33075  fi
33076
33077          if test -d "$testpath"; then
33078
33079  # Only process if variable expands to non-empty
33080
33081  if test "x$ipath" != x; then
33082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33083
33084  # Input might be given as Windows format, start by converting to
33085  # unix format.
33086  path="$ipath"
33087  new_path=`$CYGPATH -u "$path"`
33088
33089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33092  # "foo.exe" is OK but "foo" is an error.
33093  #
33094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33095  # It is also a way to make sure we got the proper file name for the real test later on.
33096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33097  if test "x$test_shortpath" = x; then
33098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33099$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33100    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33101  fi
33102
33103  # Call helper function which possibly converts this using DOS-style short mode.
33104  # If so, the updated path is stored in $new_path.
33105
33106  input_path="$new_path"
33107  # Check if we need to convert this using DOS-style short mode. If the path
33108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33109  # take no chances and rewrite it.
33110  # Note: m4 eats our [], so we need to use [ and ] instead.
33111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33112  if test "x$has_forbidden_chars" != x; then
33113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33117      # Going to short mode and back again did indeed matter. Since short mode is
33118      # case insensitive, let's make it lowercase to improve readability.
33119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33120      # Now convert it back to Unix-style (cygpath)
33121      input_path=`$CYGPATH -u "$shortmode_path"`
33122      new_path="$input_path"
33123    fi
33124  fi
33125
33126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33127  if test "x$test_cygdrive_prefix" = x; then
33128    # As a simple fix, exclude /usr/bin since it's not a real path.
33129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33131      # a path prefixed by /cygdrive for fixpath to work.
33132      new_path="$CYGWIN_ROOT_PATH$input_path"
33133    fi
33134  fi
33135
33136
33137  if test "x$path" != "x$new_path"; then
33138    ipath="$new_path"
33139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33140$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33141  fi
33142
33143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33144
33145  path="$ipath"
33146  has_colon=`$ECHO $path | $GREP ^.:`
33147  new_path="$path"
33148  if test "x$has_colon" = x; then
33149    # Not in mixed or Windows style, start by that.
33150    new_path=`cmd //c echo $path`
33151  fi
33152
33153
33154  input_path="$new_path"
33155  # Check if we need to convert this using DOS-style short mode. If the path
33156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33157  # take no chances and rewrite it.
33158  # Note: m4 eats our [], so we need to use [ and ] instead.
33159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33160  if test "x$has_forbidden_chars" != x; then
33161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33163  fi
33164
33165
33166  windows_path="$new_path"
33167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33168    unix_path=`$CYGPATH -u "$windows_path"`
33169    new_path="$unix_path"
33170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33172    new_path="$unix_path"
33173  fi
33174
33175  if test "x$path" != "x$new_path"; then
33176    ipath="$new_path"
33177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33178$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33179  fi
33180
33181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33183
33184    else
33185      # We're on a unix platform. Hooray! :)
33186      path="$ipath"
33187      has_space=`$ECHO "$path" | $GREP " "`
33188      if test "x$has_space" != x; then
33189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33190$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33192      fi
33193
33194      # Use eval to expand a potential ~
33195      eval path="$path"
33196      if test ! -f "$path" && test ! -d "$path"; then
33197        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33198      fi
33199
33200      if test -d "$path"; then
33201        ipath="`cd "$path"; $THEPWDCMD -L`"
33202      else
33203        dir="`$DIRNAME "$path"`"
33204        base="`$BASENAME "$path"`"
33205        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33206      fi
33207    fi
33208  fi
33209
33210            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33211          fi
33212          IFS=";"
33213        fi
33214      done
33215      # Convert VS_LIB into SYSROOT_LDFLAGS
33216      for i in $VS_LIB; do
33217        libpath=$i
33218        # Only process non-empty elements
33219        if test "x$libpath" != x; then
33220          IFS="$OLDIFS"
33221          # Check that directory exists before calling fixup_path
33222          testpath=$libpath
33223
33224  windows_path="$testpath"
33225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33226    unix_path=`$CYGPATH -u "$windows_path"`
33227    testpath="$unix_path"
33228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33230    testpath="$unix_path"
33231  fi
33232
33233          if test -d "$testpath"; then
33234
33235  # Only process if variable expands to non-empty
33236
33237  if test "x$libpath" != x; then
33238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33239
33240  # Input might be given as Windows format, start by converting to
33241  # unix format.
33242  path="$libpath"
33243  new_path=`$CYGPATH -u "$path"`
33244
33245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33248  # "foo.exe" is OK but "foo" is an error.
33249  #
33250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33251  # It is also a way to make sure we got the proper file name for the real test later on.
33252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33253  if test "x$test_shortpath" = x; then
33254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33255$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33256    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33257  fi
33258
33259  # Call helper function which possibly converts this using DOS-style short mode.
33260  # If so, the updated path is stored in $new_path.
33261
33262  input_path="$new_path"
33263  # Check if we need to convert this using DOS-style short mode. If the path
33264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33265  # take no chances and rewrite it.
33266  # Note: m4 eats our [], so we need to use [ and ] instead.
33267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33268  if test "x$has_forbidden_chars" != x; then
33269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33273      # Going to short mode and back again did indeed matter. Since short mode is
33274      # case insensitive, let's make it lowercase to improve readability.
33275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33276      # Now convert it back to Unix-style (cygpath)
33277      input_path=`$CYGPATH -u "$shortmode_path"`
33278      new_path="$input_path"
33279    fi
33280  fi
33281
33282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33283  if test "x$test_cygdrive_prefix" = x; then
33284    # As a simple fix, exclude /usr/bin since it's not a real path.
33285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33287      # a path prefixed by /cygdrive for fixpath to work.
33288      new_path="$CYGWIN_ROOT_PATH$input_path"
33289    fi
33290  fi
33291
33292
33293  if test "x$path" != "x$new_path"; then
33294    libpath="$new_path"
33295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33296$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33297  fi
33298
33299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33300
33301  path="$libpath"
33302  has_colon=`$ECHO $path | $GREP ^.:`
33303  new_path="$path"
33304  if test "x$has_colon" = x; then
33305    # Not in mixed or Windows style, start by that.
33306    new_path=`cmd //c echo $path`
33307  fi
33308
33309
33310  input_path="$new_path"
33311  # Check if we need to convert this using DOS-style short mode. If the path
33312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33313  # take no chances and rewrite it.
33314  # Note: m4 eats our [], so we need to use [ and ] instead.
33315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33316  if test "x$has_forbidden_chars" != x; then
33317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33319  fi
33320
33321
33322  windows_path="$new_path"
33323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33324    unix_path=`$CYGPATH -u "$windows_path"`
33325    new_path="$unix_path"
33326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33328    new_path="$unix_path"
33329  fi
33330
33331  if test "x$path" != "x$new_path"; then
33332    libpath="$new_path"
33333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33334$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33335  fi
33336
33337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33339
33340    else
33341      # We're on a unix platform. Hooray! :)
33342      path="$libpath"
33343      has_space=`$ECHO "$path" | $GREP " "`
33344      if test "x$has_space" != x; then
33345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33346$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33348      fi
33349
33350      # Use eval to expand a potential ~
33351      eval path="$path"
33352      if test ! -f "$path" && test ! -d "$path"; then
33353        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33354      fi
33355
33356      if test -d "$path"; then
33357        libpath="`cd "$path"; $THEPWDCMD -L`"
33358      else
33359        dir="`$DIRNAME "$path"`"
33360        base="`$BASENAME "$path"`"
33361        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33362      fi
33363    fi
33364  fi
33365
33366            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33367          fi
33368          IFS=";"
33369        fi
33370      done
33371      IFS="$OLDIFS"
33372    fi
33373  else
33374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33375$as_echo "not found" >&6; }
33376
33377    if test "x$VS_ENV_CMD" = x; then
33378      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33379$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33380      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33381$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33382    else
33383      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33384$as_echo "$as_me: Running the extraction script failed." >&6;}
33385    fi
33386    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33387$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33388    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33389$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33390    as_fn_error $? "Cannot continue" "$LINENO" 5
33391  fi
33392
33393    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33394    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33395    PATH="$VS_PATH"
33396    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33397    export INCLUDE="$VS_INCLUDE"
33398    export LIB="$VS_LIB"
33399  else
33400    if test "x$XCODE_VERSION_OUTPUT" != x; then
33401      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33402      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33403      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33404    else
33405      # Currently we do not define this for other toolchains. This might change as the need arise.
33406      TOOLCHAIN_VERSION=
33407    fi
33408  fi
33409
33410
33411  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33412  # override all other locations.
33413  if test "x$TOOLCHAIN_PATH" != x; then
33414    PATH=$TOOLCHAIN_PATH:$PATH
33415  fi
33416
33417
33418  #
33419  # Setup the compilers (CC and CXX)
33420  #
33421
33422  COMPILER_NAME=C
33423  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33424
33425  if test "x$CC" != x; then
33426    # User has supplied compiler name already, always let that override.
33427    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33428$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33429    if test "x`basename $CC`" = "x$CC"; then
33430      # A command without a complete path is provided, search $PATH.
33431
33432      for ac_prog in $CC
33433do
33434  # Extract the first word of "$ac_prog", so it can be a program name with args.
33435set dummy $ac_prog; ac_word=$2
33436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33437$as_echo_n "checking for $ac_word... " >&6; }
33438if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33439  $as_echo_n "(cached) " >&6
33440else
33441  case $POTENTIAL_CC in
33442  [\\/]* | ?:[\\/]*)
33443  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33444  ;;
33445  *)
33446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33447for as_dir in $PATH
33448do
33449  IFS=$as_save_IFS
33450  test -z "$as_dir" && as_dir=.
33451    for ac_exec_ext in '' $ac_executable_extensions; do
33452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33453    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33455    break 2
33456  fi
33457done
33458  done
33459IFS=$as_save_IFS
33460
33461  ;;
33462esac
33463fi
33464POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33465if test -n "$POTENTIAL_CC"; then
33466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33467$as_echo "$POTENTIAL_CC" >&6; }
33468else
33469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33470$as_echo "no" >&6; }
33471fi
33472
33473
33474  test -n "$POTENTIAL_CC" && break
33475done
33476
33477      if test "x$POTENTIAL_CC" != x; then
33478        CC=$POTENTIAL_CC
33479      else
33480        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33481      fi
33482    else
33483      # Otherwise it might already be a complete path
33484      if test ! -x "$CC"; then
33485        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33486      fi
33487    fi
33488  else
33489    # No user supplied value. Locate compiler ourselves.
33490
33491    # If we are cross compiling, assume cross compilation tools follows the
33492    # cross compilation standard where they are prefixed with the autoconf
33493    # standard name for the target. For example the binary
33494    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33495    # If we are not cross compiling, then the default compiler name will be
33496    # used.
33497
33498    CC=
33499    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33500    # before checking the rest of the PATH.
33501    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33502    # step, this should not be necessary.
33503    if test -n "$TOOLCHAIN_PATH"; then
33504      PATH_save="$PATH"
33505      PATH="$TOOLCHAIN_PATH"
33506      if test -n "$ac_tool_prefix"; then
33507  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33508set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33510$as_echo_n "checking for $ac_word... " >&6; }
33511if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33512  $as_echo_n "(cached) " >&6
33513else
33514  case $TOOLCHAIN_PATH_CC in
33515  [\\/]* | ?:[\\/]*)
33516  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33517  ;;
33518  *)
33519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33520for as_dir in $PATH
33521do
33522  IFS=$as_save_IFS
33523  test -z "$as_dir" && as_dir=.
33524    for ac_exec_ext in '' $ac_executable_extensions; do
33525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33526    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33528    break 2
33529  fi
33530done
33531  done
33532IFS=$as_save_IFS
33533
33534  ;;
33535esac
33536fi
33537TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33538if test -n "$TOOLCHAIN_PATH_CC"; then
33539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33540$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33541else
33542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33543$as_echo "no" >&6; }
33544fi
33545
33546
33547fi
33548if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33549  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33550  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33551set dummy $SEARCH_LIST; ac_word=$2
33552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33553$as_echo_n "checking for $ac_word... " >&6; }
33554if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33555  $as_echo_n "(cached) " >&6
33556else
33557  case $ac_pt_TOOLCHAIN_PATH_CC in
33558  [\\/]* | ?:[\\/]*)
33559  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33560  ;;
33561  *)
33562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33563for as_dir in $PATH
33564do
33565  IFS=$as_save_IFS
33566  test -z "$as_dir" && as_dir=.
33567    for ac_exec_ext in '' $ac_executable_extensions; do
33568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33569    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33571    break 2
33572  fi
33573done
33574  done
33575IFS=$as_save_IFS
33576
33577  ;;
33578esac
33579fi
33580ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33581if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33583$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33584else
33585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33586$as_echo "no" >&6; }
33587fi
33588
33589  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33590    TOOLCHAIN_PATH_CC=""
33591  else
33592    case $cross_compiling:$ac_tool_warned in
33593yes:)
33594{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33595$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33596ac_tool_warned=yes ;;
33597esac
33598    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33599  fi
33600else
33601  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33602fi
33603
33604      CC=$TOOLCHAIN_PATH_CC
33605      PATH="$PATH_save"
33606    fi
33607
33608    # AC_PATH_TOOL can't be run multiple times with the same variable,
33609    # so create a new name for this run.
33610    if test "x$CC" = x; then
33611      if test -n "$ac_tool_prefix"; then
33612  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33613set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33615$as_echo_n "checking for $ac_word... " >&6; }
33616if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33617  $as_echo_n "(cached) " >&6
33618else
33619  case $POTENTIAL_CC in
33620  [\\/]* | ?:[\\/]*)
33621  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33622  ;;
33623  *)
33624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33625for as_dir in $PATH
33626do
33627  IFS=$as_save_IFS
33628  test -z "$as_dir" && as_dir=.
33629    for ac_exec_ext in '' $ac_executable_extensions; do
33630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33631    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33633    break 2
33634  fi
33635done
33636  done
33637IFS=$as_save_IFS
33638
33639  ;;
33640esac
33641fi
33642POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33643if test -n "$POTENTIAL_CC"; then
33644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33645$as_echo "$POTENTIAL_CC" >&6; }
33646else
33647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33648$as_echo "no" >&6; }
33649fi
33650
33651
33652fi
33653if test -z "$ac_cv_path_POTENTIAL_CC"; then
33654  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33655  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33656set dummy $SEARCH_LIST; ac_word=$2
33657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33658$as_echo_n "checking for $ac_word... " >&6; }
33659if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33660  $as_echo_n "(cached) " >&6
33661else
33662  case $ac_pt_POTENTIAL_CC in
33663  [\\/]* | ?:[\\/]*)
33664  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33665  ;;
33666  *)
33667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33668for as_dir in $PATH
33669do
33670  IFS=$as_save_IFS
33671  test -z "$as_dir" && as_dir=.
33672    for ac_exec_ext in '' $ac_executable_extensions; do
33673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33674    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33676    break 2
33677  fi
33678done
33679  done
33680IFS=$as_save_IFS
33681
33682  ;;
33683esac
33684fi
33685ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33686if test -n "$ac_pt_POTENTIAL_CC"; then
33687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33688$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33689else
33690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33691$as_echo "no" >&6; }
33692fi
33693
33694  if test "x$ac_pt_POTENTIAL_CC" = x; then
33695    POTENTIAL_CC=""
33696  else
33697    case $cross_compiling:$ac_tool_warned in
33698yes:)
33699{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33700$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33701ac_tool_warned=yes ;;
33702esac
33703    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33704  fi
33705else
33706  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33707fi
33708
33709      CC=$POTENTIAL_CC
33710    fi
33711
33712    if test "x$CC" = x; then
33713
33714  # Print a helpful message on how to acquire the necessary build dependency.
33715  # devkit is the help tag: freetype, cups, alsa etc
33716  MISSING_DEPENDENCY=devkit
33717
33718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33719    cygwin_help $MISSING_DEPENDENCY
33720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33721    msys_help $MISSING_DEPENDENCY
33722  else
33723    PKGHANDLER_COMMAND=
33724
33725    case $PKGHANDLER in
33726      apt-get)
33727        apt_help     $MISSING_DEPENDENCY ;;
33728      yum)
33729        yum_help     $MISSING_DEPENDENCY ;;
33730      brew)
33731        brew_help    $MISSING_DEPENDENCY ;;
33732      port)
33733        port_help    $MISSING_DEPENDENCY ;;
33734      pkgutil)
33735        pkgutil_help $MISSING_DEPENDENCY ;;
33736      pkgadd)
33737        pkgadd_help  $MISSING_DEPENDENCY ;;
33738    esac
33739
33740    if test "x$PKGHANDLER_COMMAND" != x; then
33741      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33742    fi
33743  fi
33744
33745      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33746    fi
33747  fi
33748
33749  # Now we have a compiler binary in CC. Make sure it's okay.
33750
33751  # Only process if variable expands to non-empty
33752
33753  if test "x$CC" != x; then
33754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33755
33756  # First separate the path from the arguments. This will split at the first
33757  # space.
33758  complete="$CC"
33759  path="${complete%% *}"
33760  tmp="$complete EOL"
33761  arguments="${tmp#* }"
33762
33763  # Input might be given as Windows format, start by converting to
33764  # unix format.
33765  new_path=`$CYGPATH -u "$path"`
33766
33767  # Now try to locate executable using which
33768  new_path=`$WHICH "$new_path" 2> /dev/null`
33769  # bat and cmd files are not always considered executable in cygwin causing which
33770  # to not find them
33771  if test "x$new_path" = x \
33772      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33773      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33774    new_path=`$CYGPATH -u "$path"`
33775  fi
33776  if test "x$new_path" = x; then
33777    # Oops. Which didn't find the executable.
33778    # The splitting of arguments from the executable at a space might have been incorrect,
33779    # since paths with space are more likely in Windows. Give it another try with the whole
33780    # argument.
33781    path="$complete"
33782    arguments="EOL"
33783    new_path=`$CYGPATH -u "$path"`
33784    new_path=`$WHICH "$new_path" 2> /dev/null`
33785    # bat and cmd files are not always considered executable in cygwin causing which
33786    # to not find them
33787    if test "x$new_path" = x \
33788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33790      new_path=`$CYGPATH -u "$path"`
33791    fi
33792    if test "x$new_path" = x; then
33793      # It's still not found. Now this is an unrecoverable error.
33794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33795$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33796      has_space=`$ECHO "$complete" | $GREP " "`
33797      if test "x$has_space" != x; then
33798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33800      fi
33801      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33802    fi
33803  fi
33804
33805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33808  # "foo.exe" is OK but "foo" is an error.
33809  #
33810  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33811  # It is also a way to make sure we got the proper file name for the real test later on.
33812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33813  if test "x$test_shortpath" = x; then
33814    # Short path failed, file does not exist as specified.
33815    # Try adding .exe or .cmd
33816    if test -f "${new_path}.exe"; then
33817      input_to_shortpath="${new_path}.exe"
33818    elif test -f "${new_path}.cmd"; then
33819      input_to_shortpath="${new_path}.cmd"
33820    else
33821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33822$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33823      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33824$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33825      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33826    fi
33827  else
33828    input_to_shortpath="$new_path"
33829  fi
33830
33831  # Call helper function which possibly converts this using DOS-style short mode.
33832  # If so, the updated path is stored in $new_path.
33833  new_path="$input_to_shortpath"
33834
33835  input_path="$input_to_shortpath"
33836  # Check if we need to convert this using DOS-style short mode. If the path
33837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33838  # take no chances and rewrite it.
33839  # Note: m4 eats our [], so we need to use [ and ] instead.
33840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33841  if test "x$has_forbidden_chars" != x; then
33842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33846      # Going to short mode and back again did indeed matter. Since short mode is
33847      # case insensitive, let's make it lowercase to improve readability.
33848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33849      # Now convert it back to Unix-style (cygpath)
33850      input_path=`$CYGPATH -u "$shortmode_path"`
33851      new_path="$input_path"
33852    fi
33853  fi
33854
33855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33856  if test "x$test_cygdrive_prefix" = x; then
33857    # As a simple fix, exclude /usr/bin since it's not a real path.
33858    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33860      # a path prefixed by /cygdrive for fixpath to work.
33861      new_path="$CYGWIN_ROOT_PATH$input_path"
33862    fi
33863  fi
33864
33865  # remove trailing .exe if any
33866  new_path="${new_path/%.exe/}"
33867
33868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33869
33870  # First separate the path from the arguments. This will split at the first
33871  # space.
33872  complete="$CC"
33873  path="${complete%% *}"
33874  tmp="$complete EOL"
33875  arguments="${tmp#* }"
33876
33877  # Input might be given as Windows format, start by converting to
33878  # unix format.
33879  new_path="$path"
33880
33881  windows_path="$new_path"
33882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33883    unix_path=`$CYGPATH -u "$windows_path"`
33884    new_path="$unix_path"
33885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33887    new_path="$unix_path"
33888  fi
33889
33890
33891  # Now try to locate executable using which
33892  new_path=`$WHICH "$new_path" 2> /dev/null`
33893
33894  if test "x$new_path" = x; then
33895    # Oops. Which didn't find the executable.
33896    # The splitting of arguments from the executable at a space might have been incorrect,
33897    # since paths with space are more likely in Windows. Give it another try with the whole
33898    # argument.
33899    path="$complete"
33900    arguments="EOL"
33901    new_path="$path"
33902
33903  windows_path="$new_path"
33904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33905    unix_path=`$CYGPATH -u "$windows_path"`
33906    new_path="$unix_path"
33907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33909    new_path="$unix_path"
33910  fi
33911
33912
33913    new_path=`$WHICH "$new_path" 2> /dev/null`
33914    # bat and cmd files are not always considered executable in MSYS causing which
33915    # to not find them
33916    if test "x$new_path" = x \
33917        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33918        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33919      new_path="$path"
33920
33921  windows_path="$new_path"
33922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33923    unix_path=`$CYGPATH -u "$windows_path"`
33924    new_path="$unix_path"
33925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33927    new_path="$unix_path"
33928  fi
33929
33930    fi
33931
33932    if test "x$new_path" = x; then
33933      # It's still not found. Now this is an unrecoverable error.
33934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33935$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33936      has_space=`$ECHO "$complete" | $GREP " "`
33937      if test "x$has_space" != x; then
33938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33940      fi
33941      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33942    fi
33943  fi
33944
33945  # Now new_path has a complete unix path to the binary
33946  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33947    # Keep paths in /bin as-is, but remove trailing .exe if any
33948    new_path="${new_path/%.exe/}"
33949    # Do not save /bin paths to all_fixpath_prefixes!
33950  else
33951    # Not in mixed or Windows style, start by that.
33952    new_path=`cmd //c echo $new_path`
33953
33954  input_path="$new_path"
33955  # Check if we need to convert this using DOS-style short mode. If the path
33956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33957  # take no chances and rewrite it.
33958  # Note: m4 eats our [], so we need to use [ and ] instead.
33959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33960  if test "x$has_forbidden_chars" != x; then
33961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33963  fi
33964
33965    # Output is in $new_path
33966
33967  windows_path="$new_path"
33968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33969    unix_path=`$CYGPATH -u "$windows_path"`
33970    new_path="$unix_path"
33971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33973    new_path="$unix_path"
33974  fi
33975
33976    # remove trailing .exe if any
33977    new_path="${new_path/%.exe/}"
33978
33979    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33980    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33981  fi
33982
33983    else
33984      # We're on a unix platform. Hooray! :)
33985      # First separate the path from the arguments. This will split at the first
33986      # space.
33987      complete="$CC"
33988      path="${complete%% *}"
33989      tmp="$complete EOL"
33990      arguments="${tmp#* }"
33991
33992      # Cannot rely on the command "which" here since it doesn't always work.
33993      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33994      if test -z "$is_absolute_path"; then
33995        # Path to executable is not absolute. Find it.
33996        IFS_save="$IFS"
33997        IFS=:
33998        for p in $PATH; do
33999          if test -f "$p/$path" && test -x "$p/$path"; then
34000            new_path="$p/$path"
34001            break
34002          fi
34003        done
34004        IFS="$IFS_save"
34005      else
34006        # This is an absolute path, we can use it without further modifications.
34007        new_path="$path"
34008      fi
34009
34010      if test "x$new_path" = x; then
34011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34012$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34013        has_space=`$ECHO "$complete" | $GREP " "`
34014        if test "x$has_space" != x; then
34015          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34016$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34017        fi
34018        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34019      fi
34020    fi
34021
34022    # Now join together the path and the arguments once again
34023    if test "x$arguments" != xEOL; then
34024      new_complete="$new_path ${arguments% *}"
34025    else
34026      new_complete="$new_path"
34027    fi
34028
34029    if test "x$complete" != "x$new_complete"; then
34030      CC="$new_complete"
34031      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34032$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34033    fi
34034  fi
34035
34036  TEST_COMPILER="$CC"
34037
34038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34039$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34040  SYMLINK_ORIGINAL="$TEST_COMPILER"
34041
34042  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34043    # Follow a chain of symbolic links. Use readlink
34044    # where it exists, else fall back to horribly
34045    # complicated shell code.
34046    if test "x$READLINK_TESTED" != yes; then
34047      # On MacOSX there is a readlink tool with a different
34048      # purpose than the GNU readlink tool. Check the found readlink.
34049      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34050      if test "x$ISGNU" = x; then
34051        # A readlink that we do not know how to use.
34052        # Are there other non-GNU readlinks out there?
34053        READLINK_TESTED=yes
34054        READLINK=
34055      fi
34056    fi
34057
34058    if test "x$READLINK" != x; then
34059      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34060    else
34061      # Save the current directory for restoring afterwards
34062      STARTDIR=$PWD
34063      COUNTER=0
34064      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34065      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34066      cd $sym_link_dir
34067      # Use -P flag to resolve symlinks in directories.
34068      cd `$THEPWDCMD -P`
34069      sym_link_dir=`$THEPWDCMD -P`
34070      # Resolve file symlinks
34071      while test $COUNTER -lt 20; do
34072        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34073        if test "x$ISLINK" == x; then
34074          # This is not a symbolic link! We are done!
34075          break
34076        fi
34077        # Again resolve directory symlinks since the target of the just found
34078        # link could be in a different directory
34079        cd `$DIRNAME $ISLINK`
34080        sym_link_dir=`$THEPWDCMD -P`
34081        sym_link_file=`$BASENAME $ISLINK`
34082        let COUNTER=COUNTER+1
34083      done
34084      cd $STARTDIR
34085      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34086    fi
34087  fi
34088
34089  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34091$as_echo "no symlink" >&6; }
34092  else
34093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34094$as_echo "$SYMLINK_ORIGINAL" >&6; }
34095
34096    # We can't handle ccache by gcc wrappers, since we need to know if we're
34097    # using ccache. Instead ccache usage must be controlled by a configure option.
34098    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34099    if test "x$COMPILER_BASENAME" = "xccache"; then
34100      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34101$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34102      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34103    fi
34104  fi
34105
34106
34107  COMPILER=$CC
34108  COMPILER_NAME=$COMPILER_NAME
34109
34110  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34111    # cc -V output typically looks like
34112    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34113    # or
34114    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34115    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34116    # Check that this is likely to be the Solaris Studio cc.
34117    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34118    if test $? -ne 0; then
34119      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34120      { $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
34121$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34122      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34123$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34124      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34125$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34126      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34127    fi
34128    # Remove usage instructions (if present), and
34129    # collapse compiler output into a single line
34130    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34131        $SED -e 's/ *[Uu]sage:.*//'`
34132    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34133        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34134  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34135    # xlc -qversion output typically looks like
34136    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34137    #     Version: 11.01.0000.0015
34138    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34139    # Check that this is likely to be the IBM XL C compiler.
34140    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34141    if test $? -ne 0; then
34142      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34143      { $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
34144$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34145      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34146$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34147      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34148$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34149      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34150    fi
34151    # Collapse compiler output into a single line
34152    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34153    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34154        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34155  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34156    # There is no specific version flag, but all output starts with a version string.
34157    # First line typically looks something like:
34158    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34159    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34160    # Check that this is likely to be Microsoft CL.EXE.
34161    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34162    if test $? -ne 0; then
34163      { $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
34164$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34165      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34166$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34167      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34168    fi
34169    # Collapse compiler output into a single line
34170    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34172        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34173  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34174    # gcc --version output typically looks like
34175    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34176    #     Copyright (C) 2013 Free Software Foundation, Inc.
34177    #     This is free software; see the source for copying conditions.  There is NO
34178    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34179    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34180    # Check that this is likely to be GCC.
34181    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34182    if test $? -ne 0; then
34183      { $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
34184$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34185      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34186$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34187      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34188    fi
34189    # Remove Copyright and legalese from version string, and
34190    # collapse into a single line
34191    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34192        $SED -e 's/ *Copyright .*//'`
34193    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34194        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34195  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34196    # clang --version output typically looks like
34197    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34198    #    clang version 3.3 (tags/RELEASE_33/final)
34199    # or
34200    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34201    #    Target: x86_64-pc-linux-gnu
34202    #    Thread model: posix
34203    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34204    # Check that this is likely to be clang
34205    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34206    if test $? -ne 0; then
34207      { $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
34208$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34209      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34210$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34211      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34212    fi
34213    # Collapse compiler output into a single line
34214    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34215    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34216        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34217  else
34218      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34219  fi
34220  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34221  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34222  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34223  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34224
34225  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34226$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34227
34228
34229  # Now that we have resolved CC ourself, let autoconf have its go at it
34230  ac_ext=c
34231ac_cpp='$CPP $CPPFLAGS'
34232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34234ac_compiler_gnu=$ac_cv_c_compiler_gnu
34235if test -n "$ac_tool_prefix"; then
34236  for ac_prog in $CC
34237  do
34238    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34239set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34241$as_echo_n "checking for $ac_word... " >&6; }
34242if ${ac_cv_prog_CC+:} false; then :
34243  $as_echo_n "(cached) " >&6
34244else
34245  if test -n "$CC"; then
34246  ac_cv_prog_CC="$CC" # Let the user override the test.
34247else
34248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34249for as_dir in $PATH
34250do
34251  IFS=$as_save_IFS
34252  test -z "$as_dir" && as_dir=.
34253    for ac_exec_ext in '' $ac_executable_extensions; do
34254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34255    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34257    break 2
34258  fi
34259done
34260  done
34261IFS=$as_save_IFS
34262
34263fi
34264fi
34265CC=$ac_cv_prog_CC
34266if test -n "$CC"; then
34267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34268$as_echo "$CC" >&6; }
34269else
34270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34271$as_echo "no" >&6; }
34272fi
34273
34274
34275    test -n "$CC" && break
34276  done
34277fi
34278if test -z "$CC"; then
34279  ac_ct_CC=$CC
34280  for ac_prog in $CC
34281do
34282  # Extract the first word of "$ac_prog", so it can be a program name with args.
34283set dummy $ac_prog; ac_word=$2
34284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34285$as_echo_n "checking for $ac_word... " >&6; }
34286if ${ac_cv_prog_ac_ct_CC+:} false; then :
34287  $as_echo_n "(cached) " >&6
34288else
34289  if test -n "$ac_ct_CC"; then
34290  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34291else
34292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34293for as_dir in $PATH
34294do
34295  IFS=$as_save_IFS
34296  test -z "$as_dir" && as_dir=.
34297    for ac_exec_ext in '' $ac_executable_extensions; do
34298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34299    ac_cv_prog_ac_ct_CC="$ac_prog"
34300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34301    break 2
34302  fi
34303done
34304  done
34305IFS=$as_save_IFS
34306
34307fi
34308fi
34309ac_ct_CC=$ac_cv_prog_ac_ct_CC
34310if test -n "$ac_ct_CC"; then
34311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34312$as_echo "$ac_ct_CC" >&6; }
34313else
34314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34315$as_echo "no" >&6; }
34316fi
34317
34318
34319  test -n "$ac_ct_CC" && break
34320done
34321
34322  if test "x$ac_ct_CC" = x; then
34323    CC=""
34324  else
34325    case $cross_compiling:$ac_tool_warned in
34326yes:)
34327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34329ac_tool_warned=yes ;;
34330esac
34331    CC=$ac_ct_CC
34332  fi
34333fi
34334
34335
34336test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34338as_fn_error $? "no acceptable C compiler found in \$PATH
34339See \`config.log' for more details" "$LINENO" 5; }
34340
34341# Provide some information about the compiler.
34342$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34343set X $ac_compile
34344ac_compiler=$2
34345for ac_option in --version -v -V -qversion; do
34346  { { ac_try="$ac_compiler $ac_option >&5"
34347case "(($ac_try" in
34348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34349  *) ac_try_echo=$ac_try;;
34350esac
34351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34352$as_echo "$ac_try_echo"; } >&5
34353  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34354  ac_status=$?
34355  if test -s conftest.err; then
34356    sed '10a\
34357... rest of stderr output deleted ...
34358         10q' conftest.err >conftest.er1
34359    cat conftest.er1 >&5
34360  fi
34361  rm -f conftest.er1 conftest.err
34362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34363  test $ac_status = 0; }
34364done
34365
34366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34367/* end confdefs.h.  */
34368
34369int
34370main ()
34371{
34372
34373  ;
34374  return 0;
34375}
34376_ACEOF
34377ac_clean_files_save=$ac_clean_files
34378ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34379# Try to create an executable without -o first, disregard a.out.
34380# It will help us diagnose broken compilers, and finding out an intuition
34381# of exeext.
34382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34383$as_echo_n "checking whether the C compiler works... " >&6; }
34384ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34385
34386# The possible output files:
34387ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34388
34389ac_rmfiles=
34390for ac_file in $ac_files
34391do
34392  case $ac_file in
34393    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34394    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34395  esac
34396done
34397rm -f $ac_rmfiles
34398
34399if { { ac_try="$ac_link_default"
34400case "(($ac_try" in
34401  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34402  *) ac_try_echo=$ac_try;;
34403esac
34404eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34405$as_echo "$ac_try_echo"; } >&5
34406  (eval "$ac_link_default") 2>&5
34407  ac_status=$?
34408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34409  test $ac_status = 0; }; then :
34410  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34411# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34412# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34413# so that the user can short-circuit this test for compilers unknown to
34414# Autoconf.
34415for ac_file in $ac_files ''
34416do
34417  test -f "$ac_file" || continue
34418  case $ac_file in
34419    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34420	;;
34421    [ab].out )
34422	# We found the default executable, but exeext='' is most
34423	# certainly right.
34424	break;;
34425    *.* )
34426	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34427	then :; else
34428	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34429	fi
34430	# We set ac_cv_exeext here because the later test for it is not
34431	# safe: cross compilers may not add the suffix if given an `-o'
34432	# argument, so we may need to know it at that point already.
34433	# Even if this section looks crufty: it has the advantage of
34434	# actually working.
34435	break;;
34436    * )
34437	break;;
34438  esac
34439done
34440test "$ac_cv_exeext" = no && ac_cv_exeext=
34441
34442else
34443  ac_file=''
34444fi
34445if test -z "$ac_file"; then :
34446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34447$as_echo "no" >&6; }
34448$as_echo "$as_me: failed program was:" >&5
34449sed 's/^/| /' conftest.$ac_ext >&5
34450
34451{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34453as_fn_error 77 "C compiler cannot create executables
34454See \`config.log' for more details" "$LINENO" 5; }
34455else
34456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34457$as_echo "yes" >&6; }
34458fi
34459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34460$as_echo_n "checking for C compiler default output file name... " >&6; }
34461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34462$as_echo "$ac_file" >&6; }
34463ac_exeext=$ac_cv_exeext
34464
34465rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34466ac_clean_files=$ac_clean_files_save
34467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34468$as_echo_n "checking for suffix of executables... " >&6; }
34469if { { ac_try="$ac_link"
34470case "(($ac_try" in
34471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34472  *) ac_try_echo=$ac_try;;
34473esac
34474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34475$as_echo "$ac_try_echo"; } >&5
34476  (eval "$ac_link") 2>&5
34477  ac_status=$?
34478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34479  test $ac_status = 0; }; then :
34480  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34481# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34482# work properly (i.e., refer to `conftest.exe'), while it won't with
34483# `rm'.
34484for ac_file in conftest.exe conftest conftest.*; do
34485  test -f "$ac_file" || continue
34486  case $ac_file in
34487    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34488    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34489	  break;;
34490    * ) break;;
34491  esac
34492done
34493else
34494  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34496as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34497See \`config.log' for more details" "$LINENO" 5; }
34498fi
34499rm -f conftest conftest$ac_cv_exeext
34500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34501$as_echo "$ac_cv_exeext" >&6; }
34502
34503rm -f conftest.$ac_ext
34504EXEEXT=$ac_cv_exeext
34505ac_exeext=$EXEEXT
34506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34507/* end confdefs.h.  */
34508#include <stdio.h>
34509int
34510main ()
34511{
34512FILE *f = fopen ("conftest.out", "w");
34513 return ferror (f) || fclose (f) != 0;
34514
34515  ;
34516  return 0;
34517}
34518_ACEOF
34519ac_clean_files="$ac_clean_files conftest.out"
34520# Check that the compiler produces executables we can run.  If not, either
34521# the compiler is broken, or we cross compile.
34522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34523$as_echo_n "checking whether we are cross compiling... " >&6; }
34524if test "$cross_compiling" != yes; then
34525  { { ac_try="$ac_link"
34526case "(($ac_try" in
34527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34528  *) ac_try_echo=$ac_try;;
34529esac
34530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34531$as_echo "$ac_try_echo"; } >&5
34532  (eval "$ac_link") 2>&5
34533  ac_status=$?
34534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34535  test $ac_status = 0; }
34536  if { ac_try='./conftest$ac_cv_exeext'
34537  { { case "(($ac_try" in
34538  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34539  *) ac_try_echo=$ac_try;;
34540esac
34541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34542$as_echo "$ac_try_echo"; } >&5
34543  (eval "$ac_try") 2>&5
34544  ac_status=$?
34545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34546  test $ac_status = 0; }; }; then
34547    cross_compiling=no
34548  else
34549    if test "$cross_compiling" = maybe; then
34550	cross_compiling=yes
34551    else
34552	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34554as_fn_error $? "cannot run C compiled programs.
34555If you meant to cross compile, use \`--host'.
34556See \`config.log' for more details" "$LINENO" 5; }
34557    fi
34558  fi
34559fi
34560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34561$as_echo "$cross_compiling" >&6; }
34562
34563rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34564ac_clean_files=$ac_clean_files_save
34565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34566$as_echo_n "checking for suffix of object files... " >&6; }
34567if ${ac_cv_objext+:} false; then :
34568  $as_echo_n "(cached) " >&6
34569else
34570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34571/* end confdefs.h.  */
34572
34573int
34574main ()
34575{
34576
34577  ;
34578  return 0;
34579}
34580_ACEOF
34581rm -f conftest.o conftest.obj
34582if { { ac_try="$ac_compile"
34583case "(($ac_try" in
34584  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34585  *) ac_try_echo=$ac_try;;
34586esac
34587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34588$as_echo "$ac_try_echo"; } >&5
34589  (eval "$ac_compile") 2>&5
34590  ac_status=$?
34591  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34592  test $ac_status = 0; }; then :
34593  for ac_file in conftest.o conftest.obj conftest.*; do
34594  test -f "$ac_file" || continue;
34595  case $ac_file in
34596    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34597    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34598       break;;
34599  esac
34600done
34601else
34602  $as_echo "$as_me: failed program was:" >&5
34603sed 's/^/| /' conftest.$ac_ext >&5
34604
34605{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34607as_fn_error $? "cannot compute suffix of object files: cannot compile
34608See \`config.log' for more details" "$LINENO" 5; }
34609fi
34610rm -f conftest.$ac_cv_objext conftest.$ac_ext
34611fi
34612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34613$as_echo "$ac_cv_objext" >&6; }
34614OBJEXT=$ac_cv_objext
34615ac_objext=$OBJEXT
34616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34617$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34618if ${ac_cv_c_compiler_gnu+:} false; then :
34619  $as_echo_n "(cached) " >&6
34620else
34621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34622/* end confdefs.h.  */
34623
34624int
34625main ()
34626{
34627#ifndef __GNUC__
34628       choke me
34629#endif
34630
34631  ;
34632  return 0;
34633}
34634_ACEOF
34635if ac_fn_c_try_compile "$LINENO"; then :
34636  ac_compiler_gnu=yes
34637else
34638  ac_compiler_gnu=no
34639fi
34640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34641ac_cv_c_compiler_gnu=$ac_compiler_gnu
34642
34643fi
34644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34645$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34646if test $ac_compiler_gnu = yes; then
34647  GCC=yes
34648else
34649  GCC=
34650fi
34651ac_test_CFLAGS=${CFLAGS+set}
34652ac_save_CFLAGS=$CFLAGS
34653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34654$as_echo_n "checking whether $CC accepts -g... " >&6; }
34655if ${ac_cv_prog_cc_g+:} false; then :
34656  $as_echo_n "(cached) " >&6
34657else
34658  ac_save_c_werror_flag=$ac_c_werror_flag
34659   ac_c_werror_flag=yes
34660   ac_cv_prog_cc_g=no
34661   CFLAGS="-g"
34662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34663/* end confdefs.h.  */
34664
34665int
34666main ()
34667{
34668
34669  ;
34670  return 0;
34671}
34672_ACEOF
34673if ac_fn_c_try_compile "$LINENO"; then :
34674  ac_cv_prog_cc_g=yes
34675else
34676  CFLAGS=""
34677      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34678/* end confdefs.h.  */
34679
34680int
34681main ()
34682{
34683
34684  ;
34685  return 0;
34686}
34687_ACEOF
34688if ac_fn_c_try_compile "$LINENO"; then :
34689
34690else
34691  ac_c_werror_flag=$ac_save_c_werror_flag
34692	 CFLAGS="-g"
34693	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34694/* end confdefs.h.  */
34695
34696int
34697main ()
34698{
34699
34700  ;
34701  return 0;
34702}
34703_ACEOF
34704if ac_fn_c_try_compile "$LINENO"; then :
34705  ac_cv_prog_cc_g=yes
34706fi
34707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34708fi
34709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34710fi
34711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34712   ac_c_werror_flag=$ac_save_c_werror_flag
34713fi
34714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34715$as_echo "$ac_cv_prog_cc_g" >&6; }
34716if test "$ac_test_CFLAGS" = set; then
34717  CFLAGS=$ac_save_CFLAGS
34718elif test $ac_cv_prog_cc_g = yes; then
34719  if test "$GCC" = yes; then
34720    CFLAGS="-g -O2"
34721  else
34722    CFLAGS="-g"
34723  fi
34724else
34725  if test "$GCC" = yes; then
34726    CFLAGS="-O2"
34727  else
34728    CFLAGS=
34729  fi
34730fi
34731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34732$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34733if ${ac_cv_prog_cc_c89+:} false; then :
34734  $as_echo_n "(cached) " >&6
34735else
34736  ac_cv_prog_cc_c89=no
34737ac_save_CC=$CC
34738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34739/* end confdefs.h.  */
34740#include <stdarg.h>
34741#include <stdio.h>
34742struct stat;
34743/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34744struct buf { int x; };
34745FILE * (*rcsopen) (struct buf *, struct stat *, int);
34746static char *e (p, i)
34747     char **p;
34748     int i;
34749{
34750  return p[i];
34751}
34752static char *f (char * (*g) (char **, int), char **p, ...)
34753{
34754  char *s;
34755  va_list v;
34756  va_start (v,p);
34757  s = g (p, va_arg (v,int));
34758  va_end (v);
34759  return s;
34760}
34761
34762/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34763   function prototypes and stuff, but not '\xHH' hex character constants.
34764   These don't provoke an error unfortunately, instead are silently treated
34765   as 'x'.  The following induces an error, until -std is added to get
34766   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34767   array size at least.  It's necessary to write '\x00'==0 to get something
34768   that's true only with -std.  */
34769int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34770
34771/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34772   inside strings and character constants.  */
34773#define FOO(x) 'x'
34774int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34775
34776int test (int i, double x);
34777struct s1 {int (*f) (int a);};
34778struct s2 {int (*f) (double a);};
34779int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34780int argc;
34781char **argv;
34782int
34783main ()
34784{
34785return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34786  ;
34787  return 0;
34788}
34789_ACEOF
34790for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34791	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34792do
34793  CC="$ac_save_CC $ac_arg"
34794  if ac_fn_c_try_compile "$LINENO"; then :
34795  ac_cv_prog_cc_c89=$ac_arg
34796fi
34797rm -f core conftest.err conftest.$ac_objext
34798  test "x$ac_cv_prog_cc_c89" != "xno" && break
34799done
34800rm -f conftest.$ac_ext
34801CC=$ac_save_CC
34802
34803fi
34804# AC_CACHE_VAL
34805case "x$ac_cv_prog_cc_c89" in
34806  x)
34807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34808$as_echo "none needed" >&6; } ;;
34809  xno)
34810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34811$as_echo "unsupported" >&6; } ;;
34812  *)
34813    CC="$CC $ac_cv_prog_cc_c89"
34814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34815$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34816esac
34817if test "x$ac_cv_prog_cc_c89" != xno; then :
34818
34819fi
34820
34821ac_ext=cpp
34822ac_cpp='$CXXCPP $CPPFLAGS'
34823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34826
34827
34828
34829  COMPILER_NAME=C++
34830  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34831
34832  if test "x$CXX" != x; then
34833    # User has supplied compiler name already, always let that override.
34834    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34835$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34836    if test "x`basename $CXX`" = "x$CXX"; then
34837      # A command without a complete path is provided, search $PATH.
34838
34839      for ac_prog in $CXX
34840do
34841  # Extract the first word of "$ac_prog", so it can be a program name with args.
34842set dummy $ac_prog; ac_word=$2
34843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34844$as_echo_n "checking for $ac_word... " >&6; }
34845if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34846  $as_echo_n "(cached) " >&6
34847else
34848  case $POTENTIAL_CXX in
34849  [\\/]* | ?:[\\/]*)
34850  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34851  ;;
34852  *)
34853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34854for as_dir in $PATH
34855do
34856  IFS=$as_save_IFS
34857  test -z "$as_dir" && as_dir=.
34858    for ac_exec_ext in '' $ac_executable_extensions; do
34859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34860    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34862    break 2
34863  fi
34864done
34865  done
34866IFS=$as_save_IFS
34867
34868  ;;
34869esac
34870fi
34871POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34872if test -n "$POTENTIAL_CXX"; then
34873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34874$as_echo "$POTENTIAL_CXX" >&6; }
34875else
34876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34877$as_echo "no" >&6; }
34878fi
34879
34880
34881  test -n "$POTENTIAL_CXX" && break
34882done
34883
34884      if test "x$POTENTIAL_CXX" != x; then
34885        CXX=$POTENTIAL_CXX
34886      else
34887        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34888      fi
34889    else
34890      # Otherwise it might already be a complete path
34891      if test ! -x "$CXX"; then
34892        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34893      fi
34894    fi
34895  else
34896    # No user supplied value. Locate compiler ourselves.
34897
34898    # If we are cross compiling, assume cross compilation tools follows the
34899    # cross compilation standard where they are prefixed with the autoconf
34900    # standard name for the target. For example the binary
34901    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34902    # If we are not cross compiling, then the default compiler name will be
34903    # used.
34904
34905    CXX=
34906    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34907    # before checking the rest of the PATH.
34908    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34909    # step, this should not be necessary.
34910    if test -n "$TOOLCHAIN_PATH"; then
34911      PATH_save="$PATH"
34912      PATH="$TOOLCHAIN_PATH"
34913      if test -n "$ac_tool_prefix"; then
34914  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34915set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34917$as_echo_n "checking for $ac_word... " >&6; }
34918if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34919  $as_echo_n "(cached) " >&6
34920else
34921  case $TOOLCHAIN_PATH_CXX in
34922  [\\/]* | ?:[\\/]*)
34923  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34924  ;;
34925  *)
34926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34927for as_dir in $PATH
34928do
34929  IFS=$as_save_IFS
34930  test -z "$as_dir" && as_dir=.
34931    for ac_exec_ext in '' $ac_executable_extensions; do
34932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34933    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34935    break 2
34936  fi
34937done
34938  done
34939IFS=$as_save_IFS
34940
34941  ;;
34942esac
34943fi
34944TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34945if test -n "$TOOLCHAIN_PATH_CXX"; then
34946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34947$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34948else
34949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34950$as_echo "no" >&6; }
34951fi
34952
34953
34954fi
34955if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
34956  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
34957  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34958set dummy $SEARCH_LIST; ac_word=$2
34959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34960$as_echo_n "checking for $ac_word... " >&6; }
34961if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
34962  $as_echo_n "(cached) " >&6
34963else
34964  case $ac_pt_TOOLCHAIN_PATH_CXX in
34965  [\\/]* | ?:[\\/]*)
34966  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34967  ;;
34968  *)
34969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34970for as_dir in $PATH
34971do
34972  IFS=$as_save_IFS
34973  test -z "$as_dir" && as_dir=.
34974    for ac_exec_ext in '' $ac_executable_extensions; do
34975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34976    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34978    break 2
34979  fi
34980done
34981  done
34982IFS=$as_save_IFS
34983
34984  ;;
34985esac
34986fi
34987ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
34988if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
34989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
34990$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
34991else
34992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34993$as_echo "no" >&6; }
34994fi
34995
34996  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
34997    TOOLCHAIN_PATH_CXX=""
34998  else
34999    case $cross_compiling:$ac_tool_warned in
35000yes:)
35001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35003ac_tool_warned=yes ;;
35004esac
35005    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35006  fi
35007else
35008  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35009fi
35010
35011      CXX=$TOOLCHAIN_PATH_CXX
35012      PATH="$PATH_save"
35013    fi
35014
35015    # AC_PATH_TOOL can't be run multiple times with the same variable,
35016    # so create a new name for this run.
35017    if test "x$CXX" = x; then
35018      if test -n "$ac_tool_prefix"; then
35019  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35020set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35022$as_echo_n "checking for $ac_word... " >&6; }
35023if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35024  $as_echo_n "(cached) " >&6
35025else
35026  case $POTENTIAL_CXX in
35027  [\\/]* | ?:[\\/]*)
35028  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35029  ;;
35030  *)
35031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35032for as_dir in $PATH
35033do
35034  IFS=$as_save_IFS
35035  test -z "$as_dir" && as_dir=.
35036    for ac_exec_ext in '' $ac_executable_extensions; do
35037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35038    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35040    break 2
35041  fi
35042done
35043  done
35044IFS=$as_save_IFS
35045
35046  ;;
35047esac
35048fi
35049POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35050if test -n "$POTENTIAL_CXX"; then
35051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35052$as_echo "$POTENTIAL_CXX" >&6; }
35053else
35054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35055$as_echo "no" >&6; }
35056fi
35057
35058
35059fi
35060if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35061  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35062  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35063set dummy $SEARCH_LIST; ac_word=$2
35064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35065$as_echo_n "checking for $ac_word... " >&6; }
35066if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35067  $as_echo_n "(cached) " >&6
35068else
35069  case $ac_pt_POTENTIAL_CXX in
35070  [\\/]* | ?:[\\/]*)
35071  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35072  ;;
35073  *)
35074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35075for as_dir in $PATH
35076do
35077  IFS=$as_save_IFS
35078  test -z "$as_dir" && as_dir=.
35079    for ac_exec_ext in '' $ac_executable_extensions; do
35080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35081    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35083    break 2
35084  fi
35085done
35086  done
35087IFS=$as_save_IFS
35088
35089  ;;
35090esac
35091fi
35092ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35093if test -n "$ac_pt_POTENTIAL_CXX"; then
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35095$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35096else
35097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35098$as_echo "no" >&6; }
35099fi
35100
35101  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35102    POTENTIAL_CXX=""
35103  else
35104    case $cross_compiling:$ac_tool_warned in
35105yes:)
35106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35108ac_tool_warned=yes ;;
35109esac
35110    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35111  fi
35112else
35113  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35114fi
35115
35116      CXX=$POTENTIAL_CXX
35117    fi
35118
35119    if test "x$CXX" = x; then
35120
35121  # Print a helpful message on how to acquire the necessary build dependency.
35122  # devkit is the help tag: freetype, cups, alsa etc
35123  MISSING_DEPENDENCY=devkit
35124
35125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35126    cygwin_help $MISSING_DEPENDENCY
35127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35128    msys_help $MISSING_DEPENDENCY
35129  else
35130    PKGHANDLER_COMMAND=
35131
35132    case $PKGHANDLER in
35133      apt-get)
35134        apt_help     $MISSING_DEPENDENCY ;;
35135      yum)
35136        yum_help     $MISSING_DEPENDENCY ;;
35137      brew)
35138        brew_help    $MISSING_DEPENDENCY ;;
35139      port)
35140        port_help    $MISSING_DEPENDENCY ;;
35141      pkgutil)
35142        pkgutil_help $MISSING_DEPENDENCY ;;
35143      pkgadd)
35144        pkgadd_help  $MISSING_DEPENDENCY ;;
35145    esac
35146
35147    if test "x$PKGHANDLER_COMMAND" != x; then
35148      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35149    fi
35150  fi
35151
35152      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35153    fi
35154  fi
35155
35156  # Now we have a compiler binary in CXX. Make sure it's okay.
35157
35158  # Only process if variable expands to non-empty
35159
35160  if test "x$CXX" != x; then
35161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35162
35163  # First separate the path from the arguments. This will split at the first
35164  # space.
35165  complete="$CXX"
35166  path="${complete%% *}"
35167  tmp="$complete EOL"
35168  arguments="${tmp#* }"
35169
35170  # Input might be given as Windows format, start by converting to
35171  # unix format.
35172  new_path=`$CYGPATH -u "$path"`
35173
35174  # Now try to locate executable using which
35175  new_path=`$WHICH "$new_path" 2> /dev/null`
35176  # bat and cmd files are not always considered executable in cygwin causing which
35177  # to not find them
35178  if test "x$new_path" = x \
35179      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35180      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35181    new_path=`$CYGPATH -u "$path"`
35182  fi
35183  if test "x$new_path" = x; then
35184    # Oops. Which didn't find the executable.
35185    # The splitting of arguments from the executable at a space might have been incorrect,
35186    # since paths with space are more likely in Windows. Give it another try with the whole
35187    # argument.
35188    path="$complete"
35189    arguments="EOL"
35190    new_path=`$CYGPATH -u "$path"`
35191    new_path=`$WHICH "$new_path" 2> /dev/null`
35192    # bat and cmd files are not always considered executable in cygwin causing which
35193    # to not find them
35194    if test "x$new_path" = x \
35195        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35196        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35197      new_path=`$CYGPATH -u "$path"`
35198    fi
35199    if test "x$new_path" = x; then
35200      # It's still not found. Now this is an unrecoverable error.
35201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35202$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35203      has_space=`$ECHO "$complete" | $GREP " "`
35204      if test "x$has_space" != x; then
35205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35207      fi
35208      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35209    fi
35210  fi
35211
35212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35215  # "foo.exe" is OK but "foo" is an error.
35216  #
35217  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35218  # It is also a way to make sure we got the proper file name for the real test later on.
35219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35220  if test "x$test_shortpath" = x; then
35221    # Short path failed, file does not exist as specified.
35222    # Try adding .exe or .cmd
35223    if test -f "${new_path}.exe"; then
35224      input_to_shortpath="${new_path}.exe"
35225    elif test -f "${new_path}.cmd"; then
35226      input_to_shortpath="${new_path}.cmd"
35227    else
35228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35229$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35230      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35231$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35232      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35233    fi
35234  else
35235    input_to_shortpath="$new_path"
35236  fi
35237
35238  # Call helper function which possibly converts this using DOS-style short mode.
35239  # If so, the updated path is stored in $new_path.
35240  new_path="$input_to_shortpath"
35241
35242  input_path="$input_to_shortpath"
35243  # Check if we need to convert this using DOS-style short mode. If the path
35244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35245  # take no chances and rewrite it.
35246  # Note: m4 eats our [], so we need to use [ and ] instead.
35247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35248  if test "x$has_forbidden_chars" != x; then
35249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35253      # Going to short mode and back again did indeed matter. Since short mode is
35254      # case insensitive, let's make it lowercase to improve readability.
35255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35256      # Now convert it back to Unix-style (cygpath)
35257      input_path=`$CYGPATH -u "$shortmode_path"`
35258      new_path="$input_path"
35259    fi
35260  fi
35261
35262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35263  if test "x$test_cygdrive_prefix" = x; then
35264    # As a simple fix, exclude /usr/bin since it's not a real path.
35265    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35267      # a path prefixed by /cygdrive for fixpath to work.
35268      new_path="$CYGWIN_ROOT_PATH$input_path"
35269    fi
35270  fi
35271
35272  # remove trailing .exe if any
35273  new_path="${new_path/%.exe/}"
35274
35275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35276
35277  # First separate the path from the arguments. This will split at the first
35278  # space.
35279  complete="$CXX"
35280  path="${complete%% *}"
35281  tmp="$complete EOL"
35282  arguments="${tmp#* }"
35283
35284  # Input might be given as Windows format, start by converting to
35285  # unix format.
35286  new_path="$path"
35287
35288  windows_path="$new_path"
35289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35290    unix_path=`$CYGPATH -u "$windows_path"`
35291    new_path="$unix_path"
35292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35294    new_path="$unix_path"
35295  fi
35296
35297
35298  # Now try to locate executable using which
35299  new_path=`$WHICH "$new_path" 2> /dev/null`
35300
35301  if test "x$new_path" = x; then
35302    # Oops. Which didn't find the executable.
35303    # The splitting of arguments from the executable at a space might have been incorrect,
35304    # since paths with space are more likely in Windows. Give it another try with the whole
35305    # argument.
35306    path="$complete"
35307    arguments="EOL"
35308    new_path="$path"
35309
35310  windows_path="$new_path"
35311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35312    unix_path=`$CYGPATH -u "$windows_path"`
35313    new_path="$unix_path"
35314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35316    new_path="$unix_path"
35317  fi
35318
35319
35320    new_path=`$WHICH "$new_path" 2> /dev/null`
35321    # bat and cmd files are not always considered executable in MSYS causing which
35322    # to not find them
35323    if test "x$new_path" = x \
35324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35326      new_path="$path"
35327
35328  windows_path="$new_path"
35329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35330    unix_path=`$CYGPATH -u "$windows_path"`
35331    new_path="$unix_path"
35332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35334    new_path="$unix_path"
35335  fi
35336
35337    fi
35338
35339    if test "x$new_path" = x; then
35340      # It's still not found. Now this is an unrecoverable error.
35341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35342$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35343      has_space=`$ECHO "$complete" | $GREP " "`
35344      if test "x$has_space" != x; then
35345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35347      fi
35348      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35349    fi
35350  fi
35351
35352  # Now new_path has a complete unix path to the binary
35353  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35354    # Keep paths in /bin as-is, but remove trailing .exe if any
35355    new_path="${new_path/%.exe/}"
35356    # Do not save /bin paths to all_fixpath_prefixes!
35357  else
35358    # Not in mixed or Windows style, start by that.
35359    new_path=`cmd //c echo $new_path`
35360
35361  input_path="$new_path"
35362  # Check if we need to convert this using DOS-style short mode. If the path
35363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35364  # take no chances and rewrite it.
35365  # Note: m4 eats our [], so we need to use [ and ] instead.
35366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35367  if test "x$has_forbidden_chars" != x; then
35368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35370  fi
35371
35372    # Output is in $new_path
35373
35374  windows_path="$new_path"
35375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35376    unix_path=`$CYGPATH -u "$windows_path"`
35377    new_path="$unix_path"
35378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35380    new_path="$unix_path"
35381  fi
35382
35383    # remove trailing .exe if any
35384    new_path="${new_path/%.exe/}"
35385
35386    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35387    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35388  fi
35389
35390    else
35391      # We're on a unix platform. Hooray! :)
35392      # First separate the path from the arguments. This will split at the first
35393      # space.
35394      complete="$CXX"
35395      path="${complete%% *}"
35396      tmp="$complete EOL"
35397      arguments="${tmp#* }"
35398
35399      # Cannot rely on the command "which" here since it doesn't always work.
35400      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35401      if test -z "$is_absolute_path"; then
35402        # Path to executable is not absolute. Find it.
35403        IFS_save="$IFS"
35404        IFS=:
35405        for p in $PATH; do
35406          if test -f "$p/$path" && test -x "$p/$path"; then
35407            new_path="$p/$path"
35408            break
35409          fi
35410        done
35411        IFS="$IFS_save"
35412      else
35413        # This is an absolute path, we can use it without further modifications.
35414        new_path="$path"
35415      fi
35416
35417      if test "x$new_path" = x; then
35418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35419$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35420        has_space=`$ECHO "$complete" | $GREP " "`
35421        if test "x$has_space" != x; then
35422          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35423$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35424        fi
35425        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35426      fi
35427    fi
35428
35429    # Now join together the path and the arguments once again
35430    if test "x$arguments" != xEOL; then
35431      new_complete="$new_path ${arguments% *}"
35432    else
35433      new_complete="$new_path"
35434    fi
35435
35436    if test "x$complete" != "x$new_complete"; then
35437      CXX="$new_complete"
35438      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35439$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35440    fi
35441  fi
35442
35443  TEST_COMPILER="$CXX"
35444
35445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35446$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35447  SYMLINK_ORIGINAL="$TEST_COMPILER"
35448
35449  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35450    # Follow a chain of symbolic links. Use readlink
35451    # where it exists, else fall back to horribly
35452    # complicated shell code.
35453    if test "x$READLINK_TESTED" != yes; then
35454      # On MacOSX there is a readlink tool with a different
35455      # purpose than the GNU readlink tool. Check the found readlink.
35456      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35457      if test "x$ISGNU" = x; then
35458        # A readlink that we do not know how to use.
35459        # Are there other non-GNU readlinks out there?
35460        READLINK_TESTED=yes
35461        READLINK=
35462      fi
35463    fi
35464
35465    if test "x$READLINK" != x; then
35466      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35467    else
35468      # Save the current directory for restoring afterwards
35469      STARTDIR=$PWD
35470      COUNTER=0
35471      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35472      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35473      cd $sym_link_dir
35474      # Use -P flag to resolve symlinks in directories.
35475      cd `$THEPWDCMD -P`
35476      sym_link_dir=`$THEPWDCMD -P`
35477      # Resolve file symlinks
35478      while test $COUNTER -lt 20; do
35479        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35480        if test "x$ISLINK" == x; then
35481          # This is not a symbolic link! We are done!
35482          break
35483        fi
35484        # Again resolve directory symlinks since the target of the just found
35485        # link could be in a different directory
35486        cd `$DIRNAME $ISLINK`
35487        sym_link_dir=`$THEPWDCMD -P`
35488        sym_link_file=`$BASENAME $ISLINK`
35489        let COUNTER=COUNTER+1
35490      done
35491      cd $STARTDIR
35492      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35493    fi
35494  fi
35495
35496  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35498$as_echo "no symlink" >&6; }
35499  else
35500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35501$as_echo "$SYMLINK_ORIGINAL" >&6; }
35502
35503    # We can't handle ccache by gcc wrappers, since we need to know if we're
35504    # using ccache. Instead ccache usage must be controlled by a configure option.
35505    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35506    if test "x$COMPILER_BASENAME" = "xccache"; then
35507      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35508$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35509      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35510    fi
35511  fi
35512
35513
35514  COMPILER=$CXX
35515  COMPILER_NAME=$COMPILER_NAME
35516
35517  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35518    # cc -V output typically looks like
35519    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35520    # or
35521    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35522    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35523    # Check that this is likely to be the Solaris Studio cc.
35524    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35525    if test $? -ne 0; then
35526      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35527      { $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
35528$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35529      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35530$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35531      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35532$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35533      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35534    fi
35535    # Remove usage instructions (if present), and
35536    # collapse compiler output into a single line
35537    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35538        $SED -e 's/ *[Uu]sage:.*//'`
35539    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35540        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35541  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35542    # xlc -qversion output typically looks like
35543    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35544    #     Version: 11.01.0000.0015
35545    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35546    # Check that this is likely to be the IBM XL C compiler.
35547    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35548    if test $? -ne 0; then
35549      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35550      { $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
35551$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35552      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35553$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35554      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35555$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35556      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35557    fi
35558    # Collapse compiler output into a single line
35559    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35560    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35561        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35562  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35563    # There is no specific version flag, but all output starts with a version string.
35564    # First line typically looks something like:
35565    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35566    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35567    # Check that this is likely to be Microsoft CL.EXE.
35568    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35569    if test $? -ne 0; then
35570      { $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
35571$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35572      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35573$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35574      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35575    fi
35576    # Collapse compiler output into a single line
35577    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35578    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35579        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35580  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35581    # gcc --version output typically looks like
35582    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35583    #     Copyright (C) 2013 Free Software Foundation, Inc.
35584    #     This is free software; see the source for copying conditions.  There is NO
35585    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35586    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35587    # Check that this is likely to be GCC.
35588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35589    if test $? -ne 0; then
35590      { $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
35591$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35593$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35594      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35595    fi
35596    # Remove Copyright and legalese from version string, and
35597    # collapse into a single line
35598    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35599        $SED -e 's/ *Copyright .*//'`
35600    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35601        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35602  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35603    # clang --version output typically looks like
35604    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35605    #    clang version 3.3 (tags/RELEASE_33/final)
35606    # or
35607    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35608    #    Target: x86_64-pc-linux-gnu
35609    #    Thread model: posix
35610    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35611    # Check that this is likely to be clang
35612    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35613    if test $? -ne 0; then
35614      { $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
35615$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35616      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35617$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35618      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35619    fi
35620    # Collapse compiler output into a single line
35621    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35622    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35623        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35624  else
35625      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35626  fi
35627  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35628  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35629  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35630  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35631
35632  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35633$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35634
35635
35636  # Now that we have resolved CXX ourself, let autoconf have its go at it
35637  ac_ext=cpp
35638ac_cpp='$CXXCPP $CPPFLAGS'
35639ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35640ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35641ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35642if test -z "$CXX"; then
35643  if test -n "$CCC"; then
35644    CXX=$CCC
35645  else
35646    if test -n "$ac_tool_prefix"; then
35647  for ac_prog in $CXX
35648  do
35649    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35650set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35652$as_echo_n "checking for $ac_word... " >&6; }
35653if ${ac_cv_prog_CXX+:} false; then :
35654  $as_echo_n "(cached) " >&6
35655else
35656  if test -n "$CXX"; then
35657  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35658else
35659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35660for as_dir in $PATH
35661do
35662  IFS=$as_save_IFS
35663  test -z "$as_dir" && as_dir=.
35664    for ac_exec_ext in '' $ac_executable_extensions; do
35665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35666    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35668    break 2
35669  fi
35670done
35671  done
35672IFS=$as_save_IFS
35673
35674fi
35675fi
35676CXX=$ac_cv_prog_CXX
35677if test -n "$CXX"; then
35678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35679$as_echo "$CXX" >&6; }
35680else
35681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35682$as_echo "no" >&6; }
35683fi
35684
35685
35686    test -n "$CXX" && break
35687  done
35688fi
35689if test -z "$CXX"; then
35690  ac_ct_CXX=$CXX
35691  for ac_prog in $CXX
35692do
35693  # Extract the first word of "$ac_prog", so it can be a program name with args.
35694set dummy $ac_prog; ac_word=$2
35695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35696$as_echo_n "checking for $ac_word... " >&6; }
35697if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35698  $as_echo_n "(cached) " >&6
35699else
35700  if test -n "$ac_ct_CXX"; then
35701  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35702else
35703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35704for as_dir in $PATH
35705do
35706  IFS=$as_save_IFS
35707  test -z "$as_dir" && as_dir=.
35708    for ac_exec_ext in '' $ac_executable_extensions; do
35709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35710    ac_cv_prog_ac_ct_CXX="$ac_prog"
35711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35712    break 2
35713  fi
35714done
35715  done
35716IFS=$as_save_IFS
35717
35718fi
35719fi
35720ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35721if test -n "$ac_ct_CXX"; then
35722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35723$as_echo "$ac_ct_CXX" >&6; }
35724else
35725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35726$as_echo "no" >&6; }
35727fi
35728
35729
35730  test -n "$ac_ct_CXX" && break
35731done
35732
35733  if test "x$ac_ct_CXX" = x; then
35734    CXX="g++"
35735  else
35736    case $cross_compiling:$ac_tool_warned in
35737yes:)
35738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35740ac_tool_warned=yes ;;
35741esac
35742    CXX=$ac_ct_CXX
35743  fi
35744fi
35745
35746  fi
35747fi
35748# Provide some information about the compiler.
35749$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35750set X $ac_compile
35751ac_compiler=$2
35752for ac_option in --version -v -V -qversion; do
35753  { { ac_try="$ac_compiler $ac_option >&5"
35754case "(($ac_try" in
35755  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35756  *) ac_try_echo=$ac_try;;
35757esac
35758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35759$as_echo "$ac_try_echo"; } >&5
35760  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35761  ac_status=$?
35762  if test -s conftest.err; then
35763    sed '10a\
35764... rest of stderr output deleted ...
35765         10q' conftest.err >conftest.er1
35766    cat conftest.er1 >&5
35767  fi
35768  rm -f conftest.er1 conftest.err
35769  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35770  test $ac_status = 0; }
35771done
35772
35773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35774$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35775if ${ac_cv_cxx_compiler_gnu+:} false; then :
35776  $as_echo_n "(cached) " >&6
35777else
35778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35779/* end confdefs.h.  */
35780
35781int
35782main ()
35783{
35784#ifndef __GNUC__
35785       choke me
35786#endif
35787
35788  ;
35789  return 0;
35790}
35791_ACEOF
35792if ac_fn_cxx_try_compile "$LINENO"; then :
35793  ac_compiler_gnu=yes
35794else
35795  ac_compiler_gnu=no
35796fi
35797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35798ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35799
35800fi
35801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35802$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35803if test $ac_compiler_gnu = yes; then
35804  GXX=yes
35805else
35806  GXX=
35807fi
35808ac_test_CXXFLAGS=${CXXFLAGS+set}
35809ac_save_CXXFLAGS=$CXXFLAGS
35810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35811$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35812if ${ac_cv_prog_cxx_g+:} false; then :
35813  $as_echo_n "(cached) " >&6
35814else
35815  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35816   ac_cxx_werror_flag=yes
35817   ac_cv_prog_cxx_g=no
35818   CXXFLAGS="-g"
35819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35820/* end confdefs.h.  */
35821
35822int
35823main ()
35824{
35825
35826  ;
35827  return 0;
35828}
35829_ACEOF
35830if ac_fn_cxx_try_compile "$LINENO"; then :
35831  ac_cv_prog_cxx_g=yes
35832else
35833  CXXFLAGS=""
35834      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35835/* end confdefs.h.  */
35836
35837int
35838main ()
35839{
35840
35841  ;
35842  return 0;
35843}
35844_ACEOF
35845if ac_fn_cxx_try_compile "$LINENO"; then :
35846
35847else
35848  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35849	 CXXFLAGS="-g"
35850	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35851/* end confdefs.h.  */
35852
35853int
35854main ()
35855{
35856
35857  ;
35858  return 0;
35859}
35860_ACEOF
35861if ac_fn_cxx_try_compile "$LINENO"; then :
35862  ac_cv_prog_cxx_g=yes
35863fi
35864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35865fi
35866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35867fi
35868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35869   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35870fi
35871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35872$as_echo "$ac_cv_prog_cxx_g" >&6; }
35873if test "$ac_test_CXXFLAGS" = set; then
35874  CXXFLAGS=$ac_save_CXXFLAGS
35875elif test $ac_cv_prog_cxx_g = yes; then
35876  if test "$GXX" = yes; then
35877    CXXFLAGS="-g -O2"
35878  else
35879    CXXFLAGS="-g"
35880  fi
35881else
35882  if test "$GXX" = yes; then
35883    CXXFLAGS="-O2"
35884  else
35885    CXXFLAGS=
35886  fi
35887fi
35888ac_ext=cpp
35889ac_cpp='$CXXCPP $CPPFLAGS'
35890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35893
35894
35895  # This is the compiler version number on the form X.Y[.Z]
35896
35897
35898
35899
35900  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35901    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35902$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35903    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35904$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35905  fi
35906
35907  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35908  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35909    { $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
35910$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;}
35911  fi
35912
35913  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35914    { $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
35915$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35916  fi
35917
35918  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35919
35920
35921  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35922
35923
35924
35925
35926
35927
35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955
35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971    # Execute function body
35972
35973  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35974  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35975
35976  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35977    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35978  fi
35979
35980  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35981    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35982  fi
35983
35984  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35985  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35986
35987  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35988    :
35989
35990  else
35991    :
35992
35993          { $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
35994$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35995
35996
35997  fi
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012  fi
36013
36014  #
36015  # Setup the preprocessor (CPP and CXXCPP)
36016  #
36017  ac_ext=c
36018ac_cpp='$CPP $CPPFLAGS'
36019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36021ac_compiler_gnu=$ac_cv_c_compiler_gnu
36022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36023$as_echo_n "checking how to run the C preprocessor... " >&6; }
36024# On Suns, sometimes $CPP names a directory.
36025if test -n "$CPP" && test -d "$CPP"; then
36026  CPP=
36027fi
36028if test -z "$CPP"; then
36029  if ${ac_cv_prog_CPP+:} false; then :
36030  $as_echo_n "(cached) " >&6
36031else
36032      # Double quotes because CPP needs to be expanded
36033    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36034    do
36035      ac_preproc_ok=false
36036for ac_c_preproc_warn_flag in '' yes
36037do
36038  # Use a header file that comes with gcc, so configuring glibc
36039  # with a fresh cross-compiler works.
36040  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36041  # <limits.h> exists even on freestanding compilers.
36042  # On the NeXT, cc -E runs the code through the compiler's parser,
36043  # not just through cpp. "Syntax error" is here to catch this case.
36044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36045/* end confdefs.h.  */
36046#ifdef __STDC__
36047# include <limits.h>
36048#else
36049# include <assert.h>
36050#endif
36051		     Syntax error
36052_ACEOF
36053if ac_fn_c_try_cpp "$LINENO"; then :
36054
36055else
36056  # Broken: fails on valid input.
36057continue
36058fi
36059rm -f conftest.err conftest.i conftest.$ac_ext
36060
36061  # OK, works on sane cases.  Now check whether nonexistent headers
36062  # can be detected and how.
36063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36064/* end confdefs.h.  */
36065#include <ac_nonexistent.h>
36066_ACEOF
36067if ac_fn_c_try_cpp "$LINENO"; then :
36068  # Broken: success on invalid input.
36069continue
36070else
36071  # Passes both tests.
36072ac_preproc_ok=:
36073break
36074fi
36075rm -f conftest.err conftest.i conftest.$ac_ext
36076
36077done
36078# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36079rm -f conftest.i conftest.err conftest.$ac_ext
36080if $ac_preproc_ok; then :
36081  break
36082fi
36083
36084    done
36085    ac_cv_prog_CPP=$CPP
36086
36087fi
36088  CPP=$ac_cv_prog_CPP
36089else
36090  ac_cv_prog_CPP=$CPP
36091fi
36092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36093$as_echo "$CPP" >&6; }
36094ac_preproc_ok=false
36095for ac_c_preproc_warn_flag in '' yes
36096do
36097  # Use a header file that comes with gcc, so configuring glibc
36098  # with a fresh cross-compiler works.
36099  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36100  # <limits.h> exists even on freestanding compilers.
36101  # On the NeXT, cc -E runs the code through the compiler's parser,
36102  # not just through cpp. "Syntax error" is here to catch this case.
36103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36104/* end confdefs.h.  */
36105#ifdef __STDC__
36106# include <limits.h>
36107#else
36108# include <assert.h>
36109#endif
36110		     Syntax error
36111_ACEOF
36112if ac_fn_c_try_cpp "$LINENO"; then :
36113
36114else
36115  # Broken: fails on valid input.
36116continue
36117fi
36118rm -f conftest.err conftest.i conftest.$ac_ext
36119
36120  # OK, works on sane cases.  Now check whether nonexistent headers
36121  # can be detected and how.
36122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36123/* end confdefs.h.  */
36124#include <ac_nonexistent.h>
36125_ACEOF
36126if ac_fn_c_try_cpp "$LINENO"; then :
36127  # Broken: success on invalid input.
36128continue
36129else
36130  # Passes both tests.
36131ac_preproc_ok=:
36132break
36133fi
36134rm -f conftest.err conftest.i conftest.$ac_ext
36135
36136done
36137# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36138rm -f conftest.i conftest.err conftest.$ac_ext
36139if $ac_preproc_ok; then :
36140
36141else
36142  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36144as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36145See \`config.log' for more details" "$LINENO" 5; }
36146fi
36147
36148ac_ext=cpp
36149ac_cpp='$CXXCPP $CPPFLAGS'
36150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36153
36154
36155  # Only process if variable expands to non-empty
36156
36157  if test "x$CPP" != x; then
36158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36159
36160  # First separate the path from the arguments. This will split at the first
36161  # space.
36162  complete="$CPP"
36163  path="${complete%% *}"
36164  tmp="$complete EOL"
36165  arguments="${tmp#* }"
36166
36167  # Input might be given as Windows format, start by converting to
36168  # unix format.
36169  new_path=`$CYGPATH -u "$path"`
36170
36171  # Now try to locate executable using which
36172  new_path=`$WHICH "$new_path" 2> /dev/null`
36173  # bat and cmd files are not always considered executable in cygwin causing which
36174  # to not find them
36175  if test "x$new_path" = x \
36176      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36177      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36178    new_path=`$CYGPATH -u "$path"`
36179  fi
36180  if test "x$new_path" = x; then
36181    # Oops. Which didn't find the executable.
36182    # The splitting of arguments from the executable at a space might have been incorrect,
36183    # since paths with space are more likely in Windows. Give it another try with the whole
36184    # argument.
36185    path="$complete"
36186    arguments="EOL"
36187    new_path=`$CYGPATH -u "$path"`
36188    new_path=`$WHICH "$new_path" 2> /dev/null`
36189    # bat and cmd files are not always considered executable in cygwin causing which
36190    # to not find them
36191    if test "x$new_path" = x \
36192        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36193        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36194      new_path=`$CYGPATH -u "$path"`
36195    fi
36196    if test "x$new_path" = x; then
36197      # It's still not found. Now this is an unrecoverable error.
36198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36199$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36200      has_space=`$ECHO "$complete" | $GREP " "`
36201      if test "x$has_space" != x; then
36202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36204      fi
36205      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36206    fi
36207  fi
36208
36209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36212  # "foo.exe" is OK but "foo" is an error.
36213  #
36214  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36215  # It is also a way to make sure we got the proper file name for the real test later on.
36216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36217  if test "x$test_shortpath" = x; then
36218    # Short path failed, file does not exist as specified.
36219    # Try adding .exe or .cmd
36220    if test -f "${new_path}.exe"; then
36221      input_to_shortpath="${new_path}.exe"
36222    elif test -f "${new_path}.cmd"; then
36223      input_to_shortpath="${new_path}.cmd"
36224    else
36225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36226$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36229      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36230    fi
36231  else
36232    input_to_shortpath="$new_path"
36233  fi
36234
36235  # Call helper function which possibly converts this using DOS-style short mode.
36236  # If so, the updated path is stored in $new_path.
36237  new_path="$input_to_shortpath"
36238
36239  input_path="$input_to_shortpath"
36240  # Check if we need to convert this using DOS-style short mode. If the path
36241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36242  # take no chances and rewrite it.
36243  # Note: m4 eats our [], so we need to use [ and ] instead.
36244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36245  if test "x$has_forbidden_chars" != x; then
36246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36250      # Going to short mode and back again did indeed matter. Since short mode is
36251      # case insensitive, let's make it lowercase to improve readability.
36252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36253      # Now convert it back to Unix-style (cygpath)
36254      input_path=`$CYGPATH -u "$shortmode_path"`
36255      new_path="$input_path"
36256    fi
36257  fi
36258
36259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36260  if test "x$test_cygdrive_prefix" = x; then
36261    # As a simple fix, exclude /usr/bin since it's not a real path.
36262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36264      # a path prefixed by /cygdrive for fixpath to work.
36265      new_path="$CYGWIN_ROOT_PATH$input_path"
36266    fi
36267  fi
36268
36269  # remove trailing .exe if any
36270  new_path="${new_path/%.exe/}"
36271
36272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36273
36274  # First separate the path from the arguments. This will split at the first
36275  # space.
36276  complete="$CPP"
36277  path="${complete%% *}"
36278  tmp="$complete EOL"
36279  arguments="${tmp#* }"
36280
36281  # Input might be given as Windows format, start by converting to
36282  # unix format.
36283  new_path="$path"
36284
36285  windows_path="$new_path"
36286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36287    unix_path=`$CYGPATH -u "$windows_path"`
36288    new_path="$unix_path"
36289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36291    new_path="$unix_path"
36292  fi
36293
36294
36295  # Now try to locate executable using which
36296  new_path=`$WHICH "$new_path" 2> /dev/null`
36297
36298  if test "x$new_path" = x; then
36299    # Oops. Which didn't find the executable.
36300    # The splitting of arguments from the executable at a space might have been incorrect,
36301    # since paths with space are more likely in Windows. Give it another try with the whole
36302    # argument.
36303    path="$complete"
36304    arguments="EOL"
36305    new_path="$path"
36306
36307  windows_path="$new_path"
36308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36309    unix_path=`$CYGPATH -u "$windows_path"`
36310    new_path="$unix_path"
36311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36313    new_path="$unix_path"
36314  fi
36315
36316
36317    new_path=`$WHICH "$new_path" 2> /dev/null`
36318    # bat and cmd files are not always considered executable in MSYS causing which
36319    # to not find them
36320    if test "x$new_path" = x \
36321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36323      new_path="$path"
36324
36325  windows_path="$new_path"
36326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36327    unix_path=`$CYGPATH -u "$windows_path"`
36328    new_path="$unix_path"
36329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36331    new_path="$unix_path"
36332  fi
36333
36334    fi
36335
36336    if test "x$new_path" = x; then
36337      # It's still not found. Now this is an unrecoverable error.
36338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36339$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36340      has_space=`$ECHO "$complete" | $GREP " "`
36341      if test "x$has_space" != x; then
36342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36344      fi
36345      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36346    fi
36347  fi
36348
36349  # Now new_path has a complete unix path to the binary
36350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36351    # Keep paths in /bin as-is, but remove trailing .exe if any
36352    new_path="${new_path/%.exe/}"
36353    # Do not save /bin paths to all_fixpath_prefixes!
36354  else
36355    # Not in mixed or Windows style, start by that.
36356    new_path=`cmd //c echo $new_path`
36357
36358  input_path="$new_path"
36359  # Check if we need to convert this using DOS-style short mode. If the path
36360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36361  # take no chances and rewrite it.
36362  # Note: m4 eats our [], so we need to use [ and ] instead.
36363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36364  if test "x$has_forbidden_chars" != x; then
36365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36367  fi
36368
36369    # Output is in $new_path
36370
36371  windows_path="$new_path"
36372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36373    unix_path=`$CYGPATH -u "$windows_path"`
36374    new_path="$unix_path"
36375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36377    new_path="$unix_path"
36378  fi
36379
36380    # remove trailing .exe if any
36381    new_path="${new_path/%.exe/}"
36382
36383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36385  fi
36386
36387    else
36388      # We're on a unix platform. Hooray! :)
36389      # First separate the path from the arguments. This will split at the first
36390      # space.
36391      complete="$CPP"
36392      path="${complete%% *}"
36393      tmp="$complete EOL"
36394      arguments="${tmp#* }"
36395
36396      # Cannot rely on the command "which" here since it doesn't always work.
36397      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36398      if test -z "$is_absolute_path"; then
36399        # Path to executable is not absolute. Find it.
36400        IFS_save="$IFS"
36401        IFS=:
36402        for p in $PATH; do
36403          if test -f "$p/$path" && test -x "$p/$path"; then
36404            new_path="$p/$path"
36405            break
36406          fi
36407        done
36408        IFS="$IFS_save"
36409      else
36410        # This is an absolute path, we can use it without further modifications.
36411        new_path="$path"
36412      fi
36413
36414      if test "x$new_path" = x; then
36415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36416$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36417        has_space=`$ECHO "$complete" | $GREP " "`
36418        if test "x$has_space" != x; then
36419          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36421        fi
36422        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36423      fi
36424    fi
36425
36426    # Now join together the path and the arguments once again
36427    if test "x$arguments" != xEOL; then
36428      new_complete="$new_path ${arguments% *}"
36429    else
36430      new_complete="$new_path"
36431    fi
36432
36433    if test "x$complete" != "x$new_complete"; then
36434      CPP="$new_complete"
36435      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36436$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36437    fi
36438  fi
36439
36440  ac_ext=cpp
36441ac_cpp='$CXXCPP $CPPFLAGS'
36442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36446$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36447if test -z "$CXXCPP"; then
36448  if ${ac_cv_prog_CXXCPP+:} false; then :
36449  $as_echo_n "(cached) " >&6
36450else
36451      # Double quotes because CXXCPP needs to be expanded
36452    for CXXCPP in "$CXX -E" "/lib/cpp"
36453    do
36454      ac_preproc_ok=false
36455for ac_cxx_preproc_warn_flag in '' yes
36456do
36457  # Use a header file that comes with gcc, so configuring glibc
36458  # with a fresh cross-compiler works.
36459  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36460  # <limits.h> exists even on freestanding compilers.
36461  # On the NeXT, cc -E runs the code through the compiler's parser,
36462  # not just through cpp. "Syntax error" is here to catch this case.
36463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36464/* end confdefs.h.  */
36465#ifdef __STDC__
36466# include <limits.h>
36467#else
36468# include <assert.h>
36469#endif
36470		     Syntax error
36471_ACEOF
36472if ac_fn_cxx_try_cpp "$LINENO"; then :
36473
36474else
36475  # Broken: fails on valid input.
36476continue
36477fi
36478rm -f conftest.err conftest.i conftest.$ac_ext
36479
36480  # OK, works on sane cases.  Now check whether nonexistent headers
36481  # can be detected and how.
36482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36483/* end confdefs.h.  */
36484#include <ac_nonexistent.h>
36485_ACEOF
36486if ac_fn_cxx_try_cpp "$LINENO"; then :
36487  # Broken: success on invalid input.
36488continue
36489else
36490  # Passes both tests.
36491ac_preproc_ok=:
36492break
36493fi
36494rm -f conftest.err conftest.i conftest.$ac_ext
36495
36496done
36497# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36498rm -f conftest.i conftest.err conftest.$ac_ext
36499if $ac_preproc_ok; then :
36500  break
36501fi
36502
36503    done
36504    ac_cv_prog_CXXCPP=$CXXCPP
36505
36506fi
36507  CXXCPP=$ac_cv_prog_CXXCPP
36508else
36509  ac_cv_prog_CXXCPP=$CXXCPP
36510fi
36511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36512$as_echo "$CXXCPP" >&6; }
36513ac_preproc_ok=false
36514for ac_cxx_preproc_warn_flag in '' yes
36515do
36516  # Use a header file that comes with gcc, so configuring glibc
36517  # with a fresh cross-compiler works.
36518  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36519  # <limits.h> exists even on freestanding compilers.
36520  # On the NeXT, cc -E runs the code through the compiler's parser,
36521  # not just through cpp. "Syntax error" is here to catch this case.
36522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36523/* end confdefs.h.  */
36524#ifdef __STDC__
36525# include <limits.h>
36526#else
36527# include <assert.h>
36528#endif
36529		     Syntax error
36530_ACEOF
36531if ac_fn_cxx_try_cpp "$LINENO"; then :
36532
36533else
36534  # Broken: fails on valid input.
36535continue
36536fi
36537rm -f conftest.err conftest.i conftest.$ac_ext
36538
36539  # OK, works on sane cases.  Now check whether nonexistent headers
36540  # can be detected and how.
36541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36542/* end confdefs.h.  */
36543#include <ac_nonexistent.h>
36544_ACEOF
36545if ac_fn_cxx_try_cpp "$LINENO"; then :
36546  # Broken: success on invalid input.
36547continue
36548else
36549  # Passes both tests.
36550ac_preproc_ok=:
36551break
36552fi
36553rm -f conftest.err conftest.i conftest.$ac_ext
36554
36555done
36556# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36557rm -f conftest.i conftest.err conftest.$ac_ext
36558if $ac_preproc_ok; then :
36559
36560else
36561  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36563as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36564See \`config.log' for more details" "$LINENO" 5; }
36565fi
36566
36567ac_ext=cpp
36568ac_cpp='$CXXCPP $CPPFLAGS'
36569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36572
36573
36574  # Only process if variable expands to non-empty
36575
36576  if test "x$CXXCPP" != x; then
36577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36578
36579  # First separate the path from the arguments. This will split at the first
36580  # space.
36581  complete="$CXXCPP"
36582  path="${complete%% *}"
36583  tmp="$complete EOL"
36584  arguments="${tmp#* }"
36585
36586  # Input might be given as Windows format, start by converting to
36587  # unix format.
36588  new_path=`$CYGPATH -u "$path"`
36589
36590  # Now try to locate executable using which
36591  new_path=`$WHICH "$new_path" 2> /dev/null`
36592  # bat and cmd files are not always considered executable in cygwin causing which
36593  # to not find them
36594  if test "x$new_path" = x \
36595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36597    new_path=`$CYGPATH -u "$path"`
36598  fi
36599  if test "x$new_path" = x; then
36600    # Oops. Which didn't find the executable.
36601    # The splitting of arguments from the executable at a space might have been incorrect,
36602    # since paths with space are more likely in Windows. Give it another try with the whole
36603    # argument.
36604    path="$complete"
36605    arguments="EOL"
36606    new_path=`$CYGPATH -u "$path"`
36607    new_path=`$WHICH "$new_path" 2> /dev/null`
36608    # bat and cmd files are not always considered executable in cygwin causing which
36609    # to not find them
36610    if test "x$new_path" = x \
36611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36613      new_path=`$CYGPATH -u "$path"`
36614    fi
36615    if test "x$new_path" = x; then
36616      # It's still not found. Now this is an unrecoverable error.
36617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36618$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36619      has_space=`$ECHO "$complete" | $GREP " "`
36620      if test "x$has_space" != x; then
36621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36623      fi
36624      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36625    fi
36626  fi
36627
36628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36631  # "foo.exe" is OK but "foo" is an error.
36632  #
36633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36634  # It is also a way to make sure we got the proper file name for the real test later on.
36635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36636  if test "x$test_shortpath" = x; then
36637    # Short path failed, file does not exist as specified.
36638    # Try adding .exe or .cmd
36639    if test -f "${new_path}.exe"; then
36640      input_to_shortpath="${new_path}.exe"
36641    elif test -f "${new_path}.cmd"; then
36642      input_to_shortpath="${new_path}.cmd"
36643    else
36644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36645$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36648      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36649    fi
36650  else
36651    input_to_shortpath="$new_path"
36652  fi
36653
36654  # Call helper function which possibly converts this using DOS-style short mode.
36655  # If so, the updated path is stored in $new_path.
36656  new_path="$input_to_shortpath"
36657
36658  input_path="$input_to_shortpath"
36659  # Check if we need to convert this using DOS-style short mode. If the path
36660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36661  # take no chances and rewrite it.
36662  # Note: m4 eats our [], so we need to use [ and ] instead.
36663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36664  if test "x$has_forbidden_chars" != x; then
36665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36669      # Going to short mode and back again did indeed matter. Since short mode is
36670      # case insensitive, let's make it lowercase to improve readability.
36671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36672      # Now convert it back to Unix-style (cygpath)
36673      input_path=`$CYGPATH -u "$shortmode_path"`
36674      new_path="$input_path"
36675    fi
36676  fi
36677
36678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36679  if test "x$test_cygdrive_prefix" = x; then
36680    # As a simple fix, exclude /usr/bin since it's not a real path.
36681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36683      # a path prefixed by /cygdrive for fixpath to work.
36684      new_path="$CYGWIN_ROOT_PATH$input_path"
36685    fi
36686  fi
36687
36688  # remove trailing .exe if any
36689  new_path="${new_path/%.exe/}"
36690
36691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36692
36693  # First separate the path from the arguments. This will split at the first
36694  # space.
36695  complete="$CXXCPP"
36696  path="${complete%% *}"
36697  tmp="$complete EOL"
36698  arguments="${tmp#* }"
36699
36700  # Input might be given as Windows format, start by converting to
36701  # unix format.
36702  new_path="$path"
36703
36704  windows_path="$new_path"
36705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36706    unix_path=`$CYGPATH -u "$windows_path"`
36707    new_path="$unix_path"
36708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36710    new_path="$unix_path"
36711  fi
36712
36713
36714  # Now try to locate executable using which
36715  new_path=`$WHICH "$new_path" 2> /dev/null`
36716
36717  if test "x$new_path" = x; then
36718    # Oops. Which didn't find the executable.
36719    # The splitting of arguments from the executable at a space might have been incorrect,
36720    # since paths with space are more likely in Windows. Give it another try with the whole
36721    # argument.
36722    path="$complete"
36723    arguments="EOL"
36724    new_path="$path"
36725
36726  windows_path="$new_path"
36727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36728    unix_path=`$CYGPATH -u "$windows_path"`
36729    new_path="$unix_path"
36730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36732    new_path="$unix_path"
36733  fi
36734
36735
36736    new_path=`$WHICH "$new_path" 2> /dev/null`
36737    # bat and cmd files are not always considered executable in MSYS causing which
36738    # to not find them
36739    if test "x$new_path" = x \
36740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36742      new_path="$path"
36743
36744  windows_path="$new_path"
36745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36746    unix_path=`$CYGPATH -u "$windows_path"`
36747    new_path="$unix_path"
36748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36750    new_path="$unix_path"
36751  fi
36752
36753    fi
36754
36755    if test "x$new_path" = x; then
36756      # It's still not found. Now this is an unrecoverable error.
36757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36758$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36759      has_space=`$ECHO "$complete" | $GREP " "`
36760      if test "x$has_space" != x; then
36761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36763      fi
36764      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36765    fi
36766  fi
36767
36768  # Now new_path has a complete unix path to the binary
36769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36770    # Keep paths in /bin as-is, but remove trailing .exe if any
36771    new_path="${new_path/%.exe/}"
36772    # Do not save /bin paths to all_fixpath_prefixes!
36773  else
36774    # Not in mixed or Windows style, start by that.
36775    new_path=`cmd //c echo $new_path`
36776
36777  input_path="$new_path"
36778  # Check if we need to convert this using DOS-style short mode. If the path
36779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36780  # take no chances and rewrite it.
36781  # Note: m4 eats our [], so we need to use [ and ] instead.
36782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36783  if test "x$has_forbidden_chars" != x; then
36784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36786  fi
36787
36788    # Output is in $new_path
36789
36790  windows_path="$new_path"
36791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36792    unix_path=`$CYGPATH -u "$windows_path"`
36793    new_path="$unix_path"
36794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36796    new_path="$unix_path"
36797  fi
36798
36799    # remove trailing .exe if any
36800    new_path="${new_path/%.exe/}"
36801
36802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36804  fi
36805
36806    else
36807      # We're on a unix platform. Hooray! :)
36808      # First separate the path from the arguments. This will split at the first
36809      # space.
36810      complete="$CXXCPP"
36811      path="${complete%% *}"
36812      tmp="$complete EOL"
36813      arguments="${tmp#* }"
36814
36815      # Cannot rely on the command "which" here since it doesn't always work.
36816      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36817      if test -z "$is_absolute_path"; then
36818        # Path to executable is not absolute. Find it.
36819        IFS_save="$IFS"
36820        IFS=:
36821        for p in $PATH; do
36822          if test -f "$p/$path" && test -x "$p/$path"; then
36823            new_path="$p/$path"
36824            break
36825          fi
36826        done
36827        IFS="$IFS_save"
36828      else
36829        # This is an absolute path, we can use it without further modifications.
36830        new_path="$path"
36831      fi
36832
36833      if test "x$new_path" = x; then
36834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36835$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36836        has_space=`$ECHO "$complete" | $GREP " "`
36837        if test "x$has_space" != x; then
36838          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36839$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36840        fi
36841        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36842      fi
36843    fi
36844
36845    # Now join together the path and the arguments once again
36846    if test "x$arguments" != xEOL; then
36847      new_complete="$new_path ${arguments% *}"
36848    else
36849      new_complete="$new_path"
36850    fi
36851
36852    if test "x$complete" != "x$new_complete"; then
36853      CXXCPP="$new_complete"
36854      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36855$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36856    fi
36857  fi
36858
36859
36860  #
36861  # Setup the linker (LD)
36862  #
36863  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36864    # In the Microsoft toolchain we have a separate LD command "link".
36865    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36866    # a cygwin program for something completely different.
36867    # Extract the first word of "link", so it can be a program name with args.
36868set dummy link; ac_word=$2
36869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36870$as_echo_n "checking for $ac_word... " >&6; }
36871if ${ac_cv_prog_LD+:} false; then :
36872  $as_echo_n "(cached) " >&6
36873else
36874  if test -n "$LD"; then
36875  ac_cv_prog_LD="$LD" # Let the user override the test.
36876else
36877  ac_prog_rejected=no
36878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36879for as_dir in $PATH
36880do
36881  IFS=$as_save_IFS
36882  test -z "$as_dir" && as_dir=.
36883    for ac_exec_ext in '' $ac_executable_extensions; do
36884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36885    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36886       ac_prog_rejected=yes
36887       continue
36888     fi
36889    ac_cv_prog_LD="link"
36890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36891    break 2
36892  fi
36893done
36894  done
36895IFS=$as_save_IFS
36896
36897if test $ac_prog_rejected = yes; then
36898  # We found a bogon in the path, so make sure we never use it.
36899  set dummy $ac_cv_prog_LD
36900  shift
36901  if test $# != 0; then
36902    # We chose a different compiler from the bogus one.
36903    # However, it has the same basename, so the bogon will be chosen
36904    # first if we set LD to just the basename; use the full file name.
36905    shift
36906    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36907  fi
36908fi
36909fi
36910fi
36911LD=$ac_cv_prog_LD
36912if test -n "$LD"; then
36913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36914$as_echo "$LD" >&6; }
36915else
36916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36917$as_echo "no" >&6; }
36918fi
36919
36920
36921
36922  # Only process if variable expands to non-empty
36923
36924  if test "x$LD" != x; then
36925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36926
36927  # First separate the path from the arguments. This will split at the first
36928  # space.
36929  complete="$LD"
36930  path="${complete%% *}"
36931  tmp="$complete EOL"
36932  arguments="${tmp#* }"
36933
36934  # Input might be given as Windows format, start by converting to
36935  # unix format.
36936  new_path=`$CYGPATH -u "$path"`
36937
36938  # Now try to locate executable using which
36939  new_path=`$WHICH "$new_path" 2> /dev/null`
36940  # bat and cmd files are not always considered executable in cygwin causing which
36941  # to not find them
36942  if test "x$new_path" = x \
36943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36945    new_path=`$CYGPATH -u "$path"`
36946  fi
36947  if test "x$new_path" = x; then
36948    # Oops. Which didn't find the executable.
36949    # The splitting of arguments from the executable at a space might have been incorrect,
36950    # since paths with space are more likely in Windows. Give it another try with the whole
36951    # argument.
36952    path="$complete"
36953    arguments="EOL"
36954    new_path=`$CYGPATH -u "$path"`
36955    new_path=`$WHICH "$new_path" 2> /dev/null`
36956    # bat and cmd files are not always considered executable in cygwin causing which
36957    # to not find them
36958    if test "x$new_path" = x \
36959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36961      new_path=`$CYGPATH -u "$path"`
36962    fi
36963    if test "x$new_path" = x; then
36964      # It's still not found. Now this is an unrecoverable error.
36965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36966$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36967      has_space=`$ECHO "$complete" | $GREP " "`
36968      if test "x$has_space" != x; then
36969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36971      fi
36972      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36973    fi
36974  fi
36975
36976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36979  # "foo.exe" is OK but "foo" is an error.
36980  #
36981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36982  # It is also a way to make sure we got the proper file name for the real test later on.
36983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36984  if test "x$test_shortpath" = x; then
36985    # Short path failed, file does not exist as specified.
36986    # Try adding .exe or .cmd
36987    if test -f "${new_path}.exe"; then
36988      input_to_shortpath="${new_path}.exe"
36989    elif test -f "${new_path}.cmd"; then
36990      input_to_shortpath="${new_path}.cmd"
36991    else
36992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36993$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36996      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36997    fi
36998  else
36999    input_to_shortpath="$new_path"
37000  fi
37001
37002  # Call helper function which possibly converts this using DOS-style short mode.
37003  # If so, the updated path is stored in $new_path.
37004  new_path="$input_to_shortpath"
37005
37006  input_path="$input_to_shortpath"
37007  # Check if we need to convert this using DOS-style short mode. If the path
37008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37009  # take no chances and rewrite it.
37010  # Note: m4 eats our [], so we need to use [ and ] instead.
37011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37012  if test "x$has_forbidden_chars" != x; then
37013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37017      # Going to short mode and back again did indeed matter. Since short mode is
37018      # case insensitive, let's make it lowercase to improve readability.
37019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37020      # Now convert it back to Unix-style (cygpath)
37021      input_path=`$CYGPATH -u "$shortmode_path"`
37022      new_path="$input_path"
37023    fi
37024  fi
37025
37026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37027  if test "x$test_cygdrive_prefix" = x; then
37028    # As a simple fix, exclude /usr/bin since it's not a real path.
37029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37031      # a path prefixed by /cygdrive for fixpath to work.
37032      new_path="$CYGWIN_ROOT_PATH$input_path"
37033    fi
37034  fi
37035
37036  # remove trailing .exe if any
37037  new_path="${new_path/%.exe/}"
37038
37039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37040
37041  # First separate the path from the arguments. This will split at the first
37042  # space.
37043  complete="$LD"
37044  path="${complete%% *}"
37045  tmp="$complete EOL"
37046  arguments="${tmp#* }"
37047
37048  # Input might be given as Windows format, start by converting to
37049  # unix format.
37050  new_path="$path"
37051
37052  windows_path="$new_path"
37053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37054    unix_path=`$CYGPATH -u "$windows_path"`
37055    new_path="$unix_path"
37056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37058    new_path="$unix_path"
37059  fi
37060
37061
37062  # Now try to locate executable using which
37063  new_path=`$WHICH "$new_path" 2> /dev/null`
37064
37065  if test "x$new_path" = x; then
37066    # Oops. Which didn't find the executable.
37067    # The splitting of arguments from the executable at a space might have been incorrect,
37068    # since paths with space are more likely in Windows. Give it another try with the whole
37069    # argument.
37070    path="$complete"
37071    arguments="EOL"
37072    new_path="$path"
37073
37074  windows_path="$new_path"
37075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37076    unix_path=`$CYGPATH -u "$windows_path"`
37077    new_path="$unix_path"
37078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37080    new_path="$unix_path"
37081  fi
37082
37083
37084    new_path=`$WHICH "$new_path" 2> /dev/null`
37085    # bat and cmd files are not always considered executable in MSYS causing which
37086    # to not find them
37087    if test "x$new_path" = x \
37088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37090      new_path="$path"
37091
37092  windows_path="$new_path"
37093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37094    unix_path=`$CYGPATH -u "$windows_path"`
37095    new_path="$unix_path"
37096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37098    new_path="$unix_path"
37099  fi
37100
37101    fi
37102
37103    if test "x$new_path" = x; then
37104      # It's still not found. Now this is an unrecoverable error.
37105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37106$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37107      has_space=`$ECHO "$complete" | $GREP " "`
37108      if test "x$has_space" != x; then
37109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37111      fi
37112      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37113    fi
37114  fi
37115
37116  # Now new_path has a complete unix path to the binary
37117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37118    # Keep paths in /bin as-is, but remove trailing .exe if any
37119    new_path="${new_path/%.exe/}"
37120    # Do not save /bin paths to all_fixpath_prefixes!
37121  else
37122    # Not in mixed or Windows style, start by that.
37123    new_path=`cmd //c echo $new_path`
37124
37125  input_path="$new_path"
37126  # Check if we need to convert this using DOS-style short mode. If the path
37127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37128  # take no chances and rewrite it.
37129  # Note: m4 eats our [], so we need to use [ and ] instead.
37130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37131  if test "x$has_forbidden_chars" != x; then
37132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37134  fi
37135
37136    # Output is in $new_path
37137
37138  windows_path="$new_path"
37139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37140    unix_path=`$CYGPATH -u "$windows_path"`
37141    new_path="$unix_path"
37142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37144    new_path="$unix_path"
37145  fi
37146
37147    # remove trailing .exe if any
37148    new_path="${new_path/%.exe/}"
37149
37150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37152  fi
37153
37154    else
37155      # We're on a unix platform. Hooray! :)
37156      # First separate the path from the arguments. This will split at the first
37157      # space.
37158      complete="$LD"
37159      path="${complete%% *}"
37160      tmp="$complete EOL"
37161      arguments="${tmp#* }"
37162
37163      # Cannot rely on the command "which" here since it doesn't always work.
37164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37165      if test -z "$is_absolute_path"; then
37166        # Path to executable is not absolute. Find it.
37167        IFS_save="$IFS"
37168        IFS=:
37169        for p in $PATH; do
37170          if test -f "$p/$path" && test -x "$p/$path"; then
37171            new_path="$p/$path"
37172            break
37173          fi
37174        done
37175        IFS="$IFS_save"
37176      else
37177        # This is an absolute path, we can use it without further modifications.
37178        new_path="$path"
37179      fi
37180
37181      if test "x$new_path" = x; then
37182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37183$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37184        has_space=`$ECHO "$complete" | $GREP " "`
37185        if test "x$has_space" != x; then
37186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37188        fi
37189        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37190      fi
37191    fi
37192
37193    # Now join together the path and the arguments once again
37194    if test "x$arguments" != xEOL; then
37195      new_complete="$new_path ${arguments% *}"
37196    else
37197      new_complete="$new_path"
37198    fi
37199
37200    if test "x$complete" != "x$new_complete"; then
37201      LD="$new_complete"
37202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37203$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37204    fi
37205  fi
37206
37207    # Verify that we indeed succeeded with this trick.
37208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37209$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37210    "$LD" --version > /dev/null
37211    if test $? -eq 0 ; then
37212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37213$as_echo "no" >&6; }
37214      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37215    else
37216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37217$as_echo "yes" >&6; }
37218    fi
37219    LDCXX="$LD"
37220  else
37221    # All other toolchains use the compiler to link.
37222    LD="$CC"
37223    LDCXX="$CXX"
37224  fi
37225
37226  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37227
37228
37229  #
37230  # Setup the assembler (AS)
37231  #
37232  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37233
37234
37235  # Publish this variable in the help.
37236
37237
37238  if [ -z "${AS+x}" ]; then
37239    # The variable is not set by user, try to locate tool using the code snippet
37240    for ac_prog in as
37241do
37242  # Extract the first word of "$ac_prog", so it can be a program name with args.
37243set dummy $ac_prog; ac_word=$2
37244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37245$as_echo_n "checking for $ac_word... " >&6; }
37246if ${ac_cv_path_AS+:} false; then :
37247  $as_echo_n "(cached) " >&6
37248else
37249  case $AS in
37250  [\\/]* | ?:[\\/]*)
37251  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37252  ;;
37253  *)
37254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37255for as_dir in $PATH
37256do
37257  IFS=$as_save_IFS
37258  test -z "$as_dir" && as_dir=.
37259    for ac_exec_ext in '' $ac_executable_extensions; do
37260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37261    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37263    break 2
37264  fi
37265done
37266  done
37267IFS=$as_save_IFS
37268
37269  ;;
37270esac
37271fi
37272AS=$ac_cv_path_AS
37273if test -n "$AS"; then
37274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37275$as_echo "$AS" >&6; }
37276else
37277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37278$as_echo "no" >&6; }
37279fi
37280
37281
37282  test -n "$AS" && break
37283done
37284
37285  else
37286    # The variable is set, but is it from the command line or the environment?
37287
37288    # Try to remove the string !AS! from our list.
37289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37291      # If it failed, the variable was not from the command line. Ignore it,
37292      # but warn the user (except for BASH, which is always set by the calling BASH).
37293      if test "xAS" != xBASH; then
37294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37295$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37296      fi
37297      # Try to locate tool using the code snippet
37298      for ac_prog in as
37299do
37300  # Extract the first word of "$ac_prog", so it can be a program name with args.
37301set dummy $ac_prog; ac_word=$2
37302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37303$as_echo_n "checking for $ac_word... " >&6; }
37304if ${ac_cv_path_AS+:} false; then :
37305  $as_echo_n "(cached) " >&6
37306else
37307  case $AS in
37308  [\\/]* | ?:[\\/]*)
37309  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37310  ;;
37311  *)
37312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37313for as_dir in $PATH
37314do
37315  IFS=$as_save_IFS
37316  test -z "$as_dir" && as_dir=.
37317    for ac_exec_ext in '' $ac_executable_extensions; do
37318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37319    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37321    break 2
37322  fi
37323done
37324  done
37325IFS=$as_save_IFS
37326
37327  ;;
37328esac
37329fi
37330AS=$ac_cv_path_AS
37331if test -n "$AS"; then
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37333$as_echo "$AS" >&6; }
37334else
37335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37336$as_echo "no" >&6; }
37337fi
37338
37339
37340  test -n "$AS" && break
37341done
37342
37343    else
37344      # If it succeeded, then it was overridden by the user. We will use it
37345      # for the tool.
37346
37347      # First remove it from the list of overridden variables, so we can test
37348      # for unknown variables in the end.
37349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37350
37351      # Check if we try to supply an empty value
37352      if test "x$AS" = x; then
37353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37354$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37356$as_echo_n "checking for AS... " >&6; }
37357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37358$as_echo "disabled" >&6; }
37359      else
37360        # Check if the provided tool contains a complete path.
37361        tool_specified="$AS"
37362        tool_basename="${tool_specified##*/}"
37363        if test "x$tool_basename" = "x$tool_specified"; then
37364          # A command without a complete path is provided, search $PATH.
37365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37366$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37367          # Extract the first word of "$tool_basename", so it can be a program name with args.
37368set dummy $tool_basename; ac_word=$2
37369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37370$as_echo_n "checking for $ac_word... " >&6; }
37371if ${ac_cv_path_AS+:} false; then :
37372  $as_echo_n "(cached) " >&6
37373else
37374  case $AS in
37375  [\\/]* | ?:[\\/]*)
37376  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37377  ;;
37378  *)
37379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37380for as_dir in $PATH
37381do
37382  IFS=$as_save_IFS
37383  test -z "$as_dir" && as_dir=.
37384    for ac_exec_ext in '' $ac_executable_extensions; do
37385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37386    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37388    break 2
37389  fi
37390done
37391  done
37392IFS=$as_save_IFS
37393
37394  ;;
37395esac
37396fi
37397AS=$ac_cv_path_AS
37398if test -n "$AS"; then
37399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37400$as_echo "$AS" >&6; }
37401else
37402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37403$as_echo "no" >&6; }
37404fi
37405
37406
37407          if test "x$AS" = x; then
37408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37409          fi
37410        else
37411          # Otherwise we believe it is a complete path. Use it as it is.
37412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37413$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37415$as_echo_n "checking for AS... " >&6; }
37416          if test ! -x "$tool_specified"; then
37417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37418$as_echo "not found" >&6; }
37419            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37420          fi
37421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37422$as_echo "$tool_specified" >&6; }
37423        fi
37424      fi
37425    fi
37426
37427  fi
37428
37429
37430
37431  # Only process if variable expands to non-empty
37432
37433  if test "x$AS" != x; then
37434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37435
37436  # First separate the path from the arguments. This will split at the first
37437  # space.
37438  complete="$AS"
37439  path="${complete%% *}"
37440  tmp="$complete EOL"
37441  arguments="${tmp#* }"
37442
37443  # Input might be given as Windows format, start by converting to
37444  # unix format.
37445  new_path=`$CYGPATH -u "$path"`
37446
37447  # Now try to locate executable using which
37448  new_path=`$WHICH "$new_path" 2> /dev/null`
37449  # bat and cmd files are not always considered executable in cygwin causing which
37450  # to not find them
37451  if test "x$new_path" = x \
37452      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37453      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37454    new_path=`$CYGPATH -u "$path"`
37455  fi
37456  if test "x$new_path" = x; then
37457    # Oops. Which didn't find the executable.
37458    # The splitting of arguments from the executable at a space might have been incorrect,
37459    # since paths with space are more likely in Windows. Give it another try with the whole
37460    # argument.
37461    path="$complete"
37462    arguments="EOL"
37463    new_path=`$CYGPATH -u "$path"`
37464    new_path=`$WHICH "$new_path" 2> /dev/null`
37465    # bat and cmd files are not always considered executable in cygwin causing which
37466    # to not find them
37467    if test "x$new_path" = x \
37468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37470      new_path=`$CYGPATH -u "$path"`
37471    fi
37472    if test "x$new_path" = x; then
37473      # It's still not found. Now this is an unrecoverable error.
37474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37475$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37476      has_space=`$ECHO "$complete" | $GREP " "`
37477      if test "x$has_space" != x; then
37478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37480      fi
37481      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37482    fi
37483  fi
37484
37485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37488  # "foo.exe" is OK but "foo" is an error.
37489  #
37490  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37491  # It is also a way to make sure we got the proper file name for the real test later on.
37492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37493  if test "x$test_shortpath" = x; then
37494    # Short path failed, file does not exist as specified.
37495    # Try adding .exe or .cmd
37496    if test -f "${new_path}.exe"; then
37497      input_to_shortpath="${new_path}.exe"
37498    elif test -f "${new_path}.cmd"; then
37499      input_to_shortpath="${new_path}.cmd"
37500    else
37501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37502$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37503      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37504$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37505      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37506    fi
37507  else
37508    input_to_shortpath="$new_path"
37509  fi
37510
37511  # Call helper function which possibly converts this using DOS-style short mode.
37512  # If so, the updated path is stored in $new_path.
37513  new_path="$input_to_shortpath"
37514
37515  input_path="$input_to_shortpath"
37516  # Check if we need to convert this using DOS-style short mode. If the path
37517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37518  # take no chances and rewrite it.
37519  # Note: m4 eats our [], so we need to use [ and ] instead.
37520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37521  if test "x$has_forbidden_chars" != x; then
37522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37526      # Going to short mode and back again did indeed matter. Since short mode is
37527      # case insensitive, let's make it lowercase to improve readability.
37528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37529      # Now convert it back to Unix-style (cygpath)
37530      input_path=`$CYGPATH -u "$shortmode_path"`
37531      new_path="$input_path"
37532    fi
37533  fi
37534
37535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37536  if test "x$test_cygdrive_prefix" = x; then
37537    # As a simple fix, exclude /usr/bin since it's not a real path.
37538    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37540      # a path prefixed by /cygdrive for fixpath to work.
37541      new_path="$CYGWIN_ROOT_PATH$input_path"
37542    fi
37543  fi
37544
37545  # remove trailing .exe if any
37546  new_path="${new_path/%.exe/}"
37547
37548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37549
37550  # First separate the path from the arguments. This will split at the first
37551  # space.
37552  complete="$AS"
37553  path="${complete%% *}"
37554  tmp="$complete EOL"
37555  arguments="${tmp#* }"
37556
37557  # Input might be given as Windows format, start by converting to
37558  # unix format.
37559  new_path="$path"
37560
37561  windows_path="$new_path"
37562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37563    unix_path=`$CYGPATH -u "$windows_path"`
37564    new_path="$unix_path"
37565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37567    new_path="$unix_path"
37568  fi
37569
37570
37571  # Now try to locate executable using which
37572  new_path=`$WHICH "$new_path" 2> /dev/null`
37573
37574  if test "x$new_path" = x; then
37575    # Oops. Which didn't find the executable.
37576    # The splitting of arguments from the executable at a space might have been incorrect,
37577    # since paths with space are more likely in Windows. Give it another try with the whole
37578    # argument.
37579    path="$complete"
37580    arguments="EOL"
37581    new_path="$path"
37582
37583  windows_path="$new_path"
37584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37585    unix_path=`$CYGPATH -u "$windows_path"`
37586    new_path="$unix_path"
37587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37589    new_path="$unix_path"
37590  fi
37591
37592
37593    new_path=`$WHICH "$new_path" 2> /dev/null`
37594    # bat and cmd files are not always considered executable in MSYS causing which
37595    # to not find them
37596    if test "x$new_path" = x \
37597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37599      new_path="$path"
37600
37601  windows_path="$new_path"
37602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37603    unix_path=`$CYGPATH -u "$windows_path"`
37604    new_path="$unix_path"
37605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37607    new_path="$unix_path"
37608  fi
37609
37610    fi
37611
37612    if test "x$new_path" = x; then
37613      # It's still not found. Now this is an unrecoverable error.
37614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37615$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37616      has_space=`$ECHO "$complete" | $GREP " "`
37617      if test "x$has_space" != x; then
37618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37620      fi
37621      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37622    fi
37623  fi
37624
37625  # Now new_path has a complete unix path to the binary
37626  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37627    # Keep paths in /bin as-is, but remove trailing .exe if any
37628    new_path="${new_path/%.exe/}"
37629    # Do not save /bin paths to all_fixpath_prefixes!
37630  else
37631    # Not in mixed or Windows style, start by that.
37632    new_path=`cmd //c echo $new_path`
37633
37634  input_path="$new_path"
37635  # Check if we need to convert this using DOS-style short mode. If the path
37636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37637  # take no chances and rewrite it.
37638  # Note: m4 eats our [], so we need to use [ and ] instead.
37639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37640  if test "x$has_forbidden_chars" != x; then
37641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37643  fi
37644
37645    # Output is in $new_path
37646
37647  windows_path="$new_path"
37648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37649    unix_path=`$CYGPATH -u "$windows_path"`
37650    new_path="$unix_path"
37651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37653    new_path="$unix_path"
37654  fi
37655
37656    # remove trailing .exe if any
37657    new_path="${new_path/%.exe/}"
37658
37659    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37660    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37661  fi
37662
37663    else
37664      # We're on a unix platform. Hooray! :)
37665      # First separate the path from the arguments. This will split at the first
37666      # space.
37667      complete="$AS"
37668      path="${complete%% *}"
37669      tmp="$complete EOL"
37670      arguments="${tmp#* }"
37671
37672      # Cannot rely on the command "which" here since it doesn't always work.
37673      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37674      if test -z "$is_absolute_path"; then
37675        # Path to executable is not absolute. Find it.
37676        IFS_save="$IFS"
37677        IFS=:
37678        for p in $PATH; do
37679          if test -f "$p/$path" && test -x "$p/$path"; then
37680            new_path="$p/$path"
37681            break
37682          fi
37683        done
37684        IFS="$IFS_save"
37685      else
37686        # This is an absolute path, we can use it without further modifications.
37687        new_path="$path"
37688      fi
37689
37690      if test "x$new_path" = x; then
37691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37692$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37693        has_space=`$ECHO "$complete" | $GREP " "`
37694        if test "x$has_space" != x; then
37695          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37696$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37697        fi
37698        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37699      fi
37700    fi
37701
37702    # Now join together the path and the arguments once again
37703    if test "x$arguments" != xEOL; then
37704      new_complete="$new_path ${arguments% *}"
37705    else
37706      new_complete="$new_path"
37707    fi
37708
37709    if test "x$complete" != "x$new_complete"; then
37710      AS="$new_complete"
37711      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37712$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37713    fi
37714  fi
37715
37716    if test "x$AS" = x; then
37717      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37718    fi
37719  else
37720    # FIXME: is this correct for microsoft?
37721    AS="$CC -c"
37722  fi
37723
37724
37725  #
37726  # Setup the archiver (AR)
37727  #
37728  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37729    # The corresponding ar tool is lib.exe (used to create static libraries)
37730    # Extract the first word of "lib", so it can be a program name with args.
37731set dummy lib; ac_word=$2
37732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37733$as_echo_n "checking for $ac_word... " >&6; }
37734if ${ac_cv_prog_AR+:} false; then :
37735  $as_echo_n "(cached) " >&6
37736else
37737  if test -n "$AR"; then
37738  ac_cv_prog_AR="$AR" # Let the user override the test.
37739else
37740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37741for as_dir in $PATH
37742do
37743  IFS=$as_save_IFS
37744  test -z "$as_dir" && as_dir=.
37745    for ac_exec_ext in '' $ac_executable_extensions; do
37746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37747    ac_cv_prog_AR="lib"
37748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37749    break 2
37750  fi
37751done
37752  done
37753IFS=$as_save_IFS
37754
37755fi
37756fi
37757AR=$ac_cv_prog_AR
37758if test -n "$AR"; then
37759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37760$as_echo "$AR" >&6; }
37761else
37762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37763$as_echo "no" >&6; }
37764fi
37765
37766
37767  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37768
37769
37770  # Publish this variable in the help.
37771
37772
37773  if [ -z "${AR+x}" ]; then
37774    # The variable is not set by user, try to locate tool using the code snippet
37775    if test -n "$ac_tool_prefix"; then
37776  for ac_prog in ar gcc-ar
37777  do
37778    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37779set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37781$as_echo_n "checking for $ac_word... " >&6; }
37782if ${ac_cv_prog_AR+:} false; then :
37783  $as_echo_n "(cached) " >&6
37784else
37785  if test -n "$AR"; then
37786  ac_cv_prog_AR="$AR" # Let the user override the test.
37787else
37788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37789for as_dir in $PATH
37790do
37791  IFS=$as_save_IFS
37792  test -z "$as_dir" && as_dir=.
37793    for ac_exec_ext in '' $ac_executable_extensions; do
37794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37795    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37797    break 2
37798  fi
37799done
37800  done
37801IFS=$as_save_IFS
37802
37803fi
37804fi
37805AR=$ac_cv_prog_AR
37806if test -n "$AR"; then
37807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37808$as_echo "$AR" >&6; }
37809else
37810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37811$as_echo "no" >&6; }
37812fi
37813
37814
37815    test -n "$AR" && break
37816  done
37817fi
37818if test -z "$AR"; then
37819  ac_ct_AR=$AR
37820  for ac_prog in ar gcc-ar
37821do
37822  # Extract the first word of "$ac_prog", so it can be a program name with args.
37823set dummy $ac_prog; ac_word=$2
37824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37825$as_echo_n "checking for $ac_word... " >&6; }
37826if ${ac_cv_prog_ac_ct_AR+:} false; then :
37827  $as_echo_n "(cached) " >&6
37828else
37829  if test -n "$ac_ct_AR"; then
37830  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37831else
37832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37833for as_dir in $PATH
37834do
37835  IFS=$as_save_IFS
37836  test -z "$as_dir" && as_dir=.
37837    for ac_exec_ext in '' $ac_executable_extensions; do
37838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37839    ac_cv_prog_ac_ct_AR="$ac_prog"
37840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37841    break 2
37842  fi
37843done
37844  done
37845IFS=$as_save_IFS
37846
37847fi
37848fi
37849ac_ct_AR=$ac_cv_prog_ac_ct_AR
37850if test -n "$ac_ct_AR"; then
37851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37852$as_echo "$ac_ct_AR" >&6; }
37853else
37854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37855$as_echo "no" >&6; }
37856fi
37857
37858
37859  test -n "$ac_ct_AR" && break
37860done
37861
37862  if test "x$ac_ct_AR" = x; then
37863    AR=""
37864  else
37865    case $cross_compiling:$ac_tool_warned in
37866yes:)
37867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37869ac_tool_warned=yes ;;
37870esac
37871    AR=$ac_ct_AR
37872  fi
37873fi
37874
37875  else
37876    # The variable is set, but is it from the command line or the environment?
37877
37878    # Try to remove the string !AR! from our list.
37879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37881      # If it failed, the variable was not from the command line. Ignore it,
37882      # but warn the user (except for BASH, which is always set by the calling BASH).
37883      if test "xAR" != xBASH; then
37884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37885$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37886      fi
37887      # Try to locate tool using the code snippet
37888      if test -n "$ac_tool_prefix"; then
37889  for ac_prog in ar gcc-ar
37890  do
37891    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37892set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37894$as_echo_n "checking for $ac_word... " >&6; }
37895if ${ac_cv_prog_AR+:} false; then :
37896  $as_echo_n "(cached) " >&6
37897else
37898  if test -n "$AR"; then
37899  ac_cv_prog_AR="$AR" # Let the user override the test.
37900else
37901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37902for as_dir in $PATH
37903do
37904  IFS=$as_save_IFS
37905  test -z "$as_dir" && as_dir=.
37906    for ac_exec_ext in '' $ac_executable_extensions; do
37907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37908    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37910    break 2
37911  fi
37912done
37913  done
37914IFS=$as_save_IFS
37915
37916fi
37917fi
37918AR=$ac_cv_prog_AR
37919if test -n "$AR"; then
37920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37921$as_echo "$AR" >&6; }
37922else
37923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37924$as_echo "no" >&6; }
37925fi
37926
37927
37928    test -n "$AR" && break
37929  done
37930fi
37931if test -z "$AR"; then
37932  ac_ct_AR=$AR
37933  for ac_prog in ar gcc-ar
37934do
37935  # Extract the first word of "$ac_prog", so it can be a program name with args.
37936set dummy $ac_prog; ac_word=$2
37937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37938$as_echo_n "checking for $ac_word... " >&6; }
37939if ${ac_cv_prog_ac_ct_AR+:} false; then :
37940  $as_echo_n "(cached) " >&6
37941else
37942  if test -n "$ac_ct_AR"; then
37943  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37944else
37945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37946for as_dir in $PATH
37947do
37948  IFS=$as_save_IFS
37949  test -z "$as_dir" && as_dir=.
37950    for ac_exec_ext in '' $ac_executable_extensions; do
37951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37952    ac_cv_prog_ac_ct_AR="$ac_prog"
37953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37954    break 2
37955  fi
37956done
37957  done
37958IFS=$as_save_IFS
37959
37960fi
37961fi
37962ac_ct_AR=$ac_cv_prog_ac_ct_AR
37963if test -n "$ac_ct_AR"; then
37964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37965$as_echo "$ac_ct_AR" >&6; }
37966else
37967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37968$as_echo "no" >&6; }
37969fi
37970
37971
37972  test -n "$ac_ct_AR" && break
37973done
37974
37975  if test "x$ac_ct_AR" = x; then
37976    AR=""
37977  else
37978    case $cross_compiling:$ac_tool_warned in
37979yes:)
37980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37982ac_tool_warned=yes ;;
37983esac
37984    AR=$ac_ct_AR
37985  fi
37986fi
37987
37988    else
37989      # If it succeeded, then it was overridden by the user. We will use it
37990      # for the tool.
37991
37992      # First remove it from the list of overridden variables, so we can test
37993      # for unknown variables in the end.
37994      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37995
37996      # Check if we try to supply an empty value
37997      if test "x$AR" = x; then
37998        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37999$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38001$as_echo_n "checking for AR... " >&6; }
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38003$as_echo "disabled" >&6; }
38004      else
38005        # Check if the provided tool contains a complete path.
38006        tool_specified="$AR"
38007        tool_basename="${tool_specified##*/}"
38008        if test "x$tool_basename" = "x$tool_specified"; then
38009          # A command without a complete path is provided, search $PATH.
38010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38011$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38012          # Extract the first word of "$tool_basename", so it can be a program name with args.
38013set dummy $tool_basename; ac_word=$2
38014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38015$as_echo_n "checking for $ac_word... " >&6; }
38016if ${ac_cv_path_AR+:} false; then :
38017  $as_echo_n "(cached) " >&6
38018else
38019  case $AR in
38020  [\\/]* | ?:[\\/]*)
38021  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38022  ;;
38023  *)
38024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38025for as_dir in $PATH
38026do
38027  IFS=$as_save_IFS
38028  test -z "$as_dir" && as_dir=.
38029    for ac_exec_ext in '' $ac_executable_extensions; do
38030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38031    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38033    break 2
38034  fi
38035done
38036  done
38037IFS=$as_save_IFS
38038
38039  ;;
38040esac
38041fi
38042AR=$ac_cv_path_AR
38043if test -n "$AR"; then
38044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38045$as_echo "$AR" >&6; }
38046else
38047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38048$as_echo "no" >&6; }
38049fi
38050
38051
38052          if test "x$AR" = x; then
38053            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38054          fi
38055        else
38056          # Otherwise we believe it is a complete path. Use it as it is.
38057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38058$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38059          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38060$as_echo_n "checking for AR... " >&6; }
38061          if test ! -x "$tool_specified"; then
38062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38063$as_echo "not found" >&6; }
38064            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38065          fi
38066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38067$as_echo "$tool_specified" >&6; }
38068        fi
38069      fi
38070    fi
38071
38072  fi
38073
38074
38075  else
38076
38077
38078  # Publish this variable in the help.
38079
38080
38081  if [ -z "${AR+x}" ]; then
38082    # The variable is not set by user, try to locate tool using the code snippet
38083    if test -n "$ac_tool_prefix"; then
38084  for ac_prog in ar
38085  do
38086    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38089$as_echo_n "checking for $ac_word... " >&6; }
38090if ${ac_cv_prog_AR+:} false; then :
38091  $as_echo_n "(cached) " >&6
38092else
38093  if test -n "$AR"; then
38094  ac_cv_prog_AR="$AR" # Let the user override the test.
38095else
38096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38097for as_dir in $PATH
38098do
38099  IFS=$as_save_IFS
38100  test -z "$as_dir" && as_dir=.
38101    for ac_exec_ext in '' $ac_executable_extensions; do
38102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38103    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38105    break 2
38106  fi
38107done
38108  done
38109IFS=$as_save_IFS
38110
38111fi
38112fi
38113AR=$ac_cv_prog_AR
38114if test -n "$AR"; then
38115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38116$as_echo "$AR" >&6; }
38117else
38118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38119$as_echo "no" >&6; }
38120fi
38121
38122
38123    test -n "$AR" && break
38124  done
38125fi
38126if test -z "$AR"; then
38127  ac_ct_AR=$AR
38128  for ac_prog in ar
38129do
38130  # Extract the first word of "$ac_prog", so it can be a program name with args.
38131set dummy $ac_prog; ac_word=$2
38132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38133$as_echo_n "checking for $ac_word... " >&6; }
38134if ${ac_cv_prog_ac_ct_AR+:} false; then :
38135  $as_echo_n "(cached) " >&6
38136else
38137  if test -n "$ac_ct_AR"; then
38138  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38139else
38140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38141for as_dir in $PATH
38142do
38143  IFS=$as_save_IFS
38144  test -z "$as_dir" && as_dir=.
38145    for ac_exec_ext in '' $ac_executable_extensions; do
38146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38147    ac_cv_prog_ac_ct_AR="$ac_prog"
38148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38149    break 2
38150  fi
38151done
38152  done
38153IFS=$as_save_IFS
38154
38155fi
38156fi
38157ac_ct_AR=$ac_cv_prog_ac_ct_AR
38158if test -n "$ac_ct_AR"; then
38159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38160$as_echo "$ac_ct_AR" >&6; }
38161else
38162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38163$as_echo "no" >&6; }
38164fi
38165
38166
38167  test -n "$ac_ct_AR" && break
38168done
38169
38170  if test "x$ac_ct_AR" = x; then
38171    AR=""
38172  else
38173    case $cross_compiling:$ac_tool_warned in
38174yes:)
38175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38177ac_tool_warned=yes ;;
38178esac
38179    AR=$ac_ct_AR
38180  fi
38181fi
38182
38183  else
38184    # The variable is set, but is it from the command line or the environment?
38185
38186    # Try to remove the string !AR! from our list.
38187    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38188    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38189      # If it failed, the variable was not from the command line. Ignore it,
38190      # but warn the user (except for BASH, which is always set by the calling BASH).
38191      if test "xAR" != xBASH; then
38192        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38193$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38194      fi
38195      # Try to locate tool using the code snippet
38196      if test -n "$ac_tool_prefix"; then
38197  for ac_prog in ar
38198  do
38199    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38200set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38202$as_echo_n "checking for $ac_word... " >&6; }
38203if ${ac_cv_prog_AR+:} false; then :
38204  $as_echo_n "(cached) " >&6
38205else
38206  if test -n "$AR"; then
38207  ac_cv_prog_AR="$AR" # Let the user override the test.
38208else
38209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38210for as_dir in $PATH
38211do
38212  IFS=$as_save_IFS
38213  test -z "$as_dir" && as_dir=.
38214    for ac_exec_ext in '' $ac_executable_extensions; do
38215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38216    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38218    break 2
38219  fi
38220done
38221  done
38222IFS=$as_save_IFS
38223
38224fi
38225fi
38226AR=$ac_cv_prog_AR
38227if test -n "$AR"; then
38228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38229$as_echo "$AR" >&6; }
38230else
38231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38232$as_echo "no" >&6; }
38233fi
38234
38235
38236    test -n "$AR" && break
38237  done
38238fi
38239if test -z "$AR"; then
38240  ac_ct_AR=$AR
38241  for ac_prog in ar
38242do
38243  # Extract the first word of "$ac_prog", so it can be a program name with args.
38244set dummy $ac_prog; ac_word=$2
38245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38246$as_echo_n "checking for $ac_word... " >&6; }
38247if ${ac_cv_prog_ac_ct_AR+:} false; then :
38248  $as_echo_n "(cached) " >&6
38249else
38250  if test -n "$ac_ct_AR"; then
38251  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38252else
38253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38254for as_dir in $PATH
38255do
38256  IFS=$as_save_IFS
38257  test -z "$as_dir" && as_dir=.
38258    for ac_exec_ext in '' $ac_executable_extensions; do
38259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38260    ac_cv_prog_ac_ct_AR="$ac_prog"
38261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38262    break 2
38263  fi
38264done
38265  done
38266IFS=$as_save_IFS
38267
38268fi
38269fi
38270ac_ct_AR=$ac_cv_prog_ac_ct_AR
38271if test -n "$ac_ct_AR"; then
38272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38273$as_echo "$ac_ct_AR" >&6; }
38274else
38275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38276$as_echo "no" >&6; }
38277fi
38278
38279
38280  test -n "$ac_ct_AR" && break
38281done
38282
38283  if test "x$ac_ct_AR" = x; then
38284    AR=""
38285  else
38286    case $cross_compiling:$ac_tool_warned in
38287yes:)
38288{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38289$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38290ac_tool_warned=yes ;;
38291esac
38292    AR=$ac_ct_AR
38293  fi
38294fi
38295
38296    else
38297      # If it succeeded, then it was overridden by the user. We will use it
38298      # for the tool.
38299
38300      # First remove it from the list of overridden variables, so we can test
38301      # for unknown variables in the end.
38302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38303
38304      # Check if we try to supply an empty value
38305      if test "x$AR" = x; then
38306        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38307$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38309$as_echo_n "checking for AR... " >&6; }
38310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38311$as_echo "disabled" >&6; }
38312      else
38313        # Check if the provided tool contains a complete path.
38314        tool_specified="$AR"
38315        tool_basename="${tool_specified##*/}"
38316        if test "x$tool_basename" = "x$tool_specified"; then
38317          # A command without a complete path is provided, search $PATH.
38318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38319$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38320          # Extract the first word of "$tool_basename", so it can be a program name with args.
38321set dummy $tool_basename; ac_word=$2
38322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38323$as_echo_n "checking for $ac_word... " >&6; }
38324if ${ac_cv_path_AR+:} false; then :
38325  $as_echo_n "(cached) " >&6
38326else
38327  case $AR in
38328  [\\/]* | ?:[\\/]*)
38329  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38330  ;;
38331  *)
38332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38333for as_dir in $PATH
38334do
38335  IFS=$as_save_IFS
38336  test -z "$as_dir" && as_dir=.
38337    for ac_exec_ext in '' $ac_executable_extensions; do
38338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38339    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38341    break 2
38342  fi
38343done
38344  done
38345IFS=$as_save_IFS
38346
38347  ;;
38348esac
38349fi
38350AR=$ac_cv_path_AR
38351if test -n "$AR"; then
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38353$as_echo "$AR" >&6; }
38354else
38355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38356$as_echo "no" >&6; }
38357fi
38358
38359
38360          if test "x$AR" = x; then
38361            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38362          fi
38363        else
38364          # Otherwise we believe it is a complete path. Use it as it is.
38365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38366$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38367          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38368$as_echo_n "checking for AR... " >&6; }
38369          if test ! -x "$tool_specified"; then
38370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38371$as_echo "not found" >&6; }
38372            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38373          fi
38374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38375$as_echo "$tool_specified" >&6; }
38376        fi
38377      fi
38378    fi
38379
38380  fi
38381
38382
38383  fi
38384
38385  # Only process if variable expands to non-empty
38386
38387  if test "x$AR" != x; then
38388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38389
38390  # First separate the path from the arguments. This will split at the first
38391  # space.
38392  complete="$AR"
38393  path="${complete%% *}"
38394  tmp="$complete EOL"
38395  arguments="${tmp#* }"
38396
38397  # Input might be given as Windows format, start by converting to
38398  # unix format.
38399  new_path=`$CYGPATH -u "$path"`
38400
38401  # Now try to locate executable using which
38402  new_path=`$WHICH "$new_path" 2> /dev/null`
38403  # bat and cmd files are not always considered executable in cygwin causing which
38404  # to not find them
38405  if test "x$new_path" = x \
38406      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38407      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38408    new_path=`$CYGPATH -u "$path"`
38409  fi
38410  if test "x$new_path" = x; then
38411    # Oops. Which didn't find the executable.
38412    # The splitting of arguments from the executable at a space might have been incorrect,
38413    # since paths with space are more likely in Windows. Give it another try with the whole
38414    # argument.
38415    path="$complete"
38416    arguments="EOL"
38417    new_path=`$CYGPATH -u "$path"`
38418    new_path=`$WHICH "$new_path" 2> /dev/null`
38419    # bat and cmd files are not always considered executable in cygwin causing which
38420    # to not find them
38421    if test "x$new_path" = x \
38422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38424      new_path=`$CYGPATH -u "$path"`
38425    fi
38426    if test "x$new_path" = x; then
38427      # It's still not found. Now this is an unrecoverable error.
38428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38429$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38430      has_space=`$ECHO "$complete" | $GREP " "`
38431      if test "x$has_space" != x; then
38432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38434      fi
38435      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38436    fi
38437  fi
38438
38439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38442  # "foo.exe" is OK but "foo" is an error.
38443  #
38444  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38445  # It is also a way to make sure we got the proper file name for the real test later on.
38446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38447  if test "x$test_shortpath" = x; then
38448    # Short path failed, file does not exist as specified.
38449    # Try adding .exe or .cmd
38450    if test -f "${new_path}.exe"; then
38451      input_to_shortpath="${new_path}.exe"
38452    elif test -f "${new_path}.cmd"; then
38453      input_to_shortpath="${new_path}.cmd"
38454    else
38455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38456$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38457      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38458$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38459      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38460    fi
38461  else
38462    input_to_shortpath="$new_path"
38463  fi
38464
38465  # Call helper function which possibly converts this using DOS-style short mode.
38466  # If so, the updated path is stored in $new_path.
38467  new_path="$input_to_shortpath"
38468
38469  input_path="$input_to_shortpath"
38470  # Check if we need to convert this using DOS-style short mode. If the path
38471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38472  # take no chances and rewrite it.
38473  # Note: m4 eats our [], so we need to use [ and ] instead.
38474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38475  if test "x$has_forbidden_chars" != x; then
38476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38480      # Going to short mode and back again did indeed matter. Since short mode is
38481      # case insensitive, let's make it lowercase to improve readability.
38482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38483      # Now convert it back to Unix-style (cygpath)
38484      input_path=`$CYGPATH -u "$shortmode_path"`
38485      new_path="$input_path"
38486    fi
38487  fi
38488
38489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38490  if test "x$test_cygdrive_prefix" = x; then
38491    # As a simple fix, exclude /usr/bin since it's not a real path.
38492    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38494      # a path prefixed by /cygdrive for fixpath to work.
38495      new_path="$CYGWIN_ROOT_PATH$input_path"
38496    fi
38497  fi
38498
38499  # remove trailing .exe if any
38500  new_path="${new_path/%.exe/}"
38501
38502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38503
38504  # First separate the path from the arguments. This will split at the first
38505  # space.
38506  complete="$AR"
38507  path="${complete%% *}"
38508  tmp="$complete EOL"
38509  arguments="${tmp#* }"
38510
38511  # Input might be given as Windows format, start by converting to
38512  # unix format.
38513  new_path="$path"
38514
38515  windows_path="$new_path"
38516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38517    unix_path=`$CYGPATH -u "$windows_path"`
38518    new_path="$unix_path"
38519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38521    new_path="$unix_path"
38522  fi
38523
38524
38525  # Now try to locate executable using which
38526  new_path=`$WHICH "$new_path" 2> /dev/null`
38527
38528  if test "x$new_path" = x; then
38529    # Oops. Which didn't find the executable.
38530    # The splitting of arguments from the executable at a space might have been incorrect,
38531    # since paths with space are more likely in Windows. Give it another try with the whole
38532    # argument.
38533    path="$complete"
38534    arguments="EOL"
38535    new_path="$path"
38536
38537  windows_path="$new_path"
38538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38539    unix_path=`$CYGPATH -u "$windows_path"`
38540    new_path="$unix_path"
38541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38543    new_path="$unix_path"
38544  fi
38545
38546
38547    new_path=`$WHICH "$new_path" 2> /dev/null`
38548    # bat and cmd files are not always considered executable in MSYS causing which
38549    # to not find them
38550    if test "x$new_path" = x \
38551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38553      new_path="$path"
38554
38555  windows_path="$new_path"
38556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38557    unix_path=`$CYGPATH -u "$windows_path"`
38558    new_path="$unix_path"
38559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38561    new_path="$unix_path"
38562  fi
38563
38564    fi
38565
38566    if test "x$new_path" = x; then
38567      # It's still not found. Now this is an unrecoverable error.
38568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38569$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38570      has_space=`$ECHO "$complete" | $GREP " "`
38571      if test "x$has_space" != x; then
38572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38574      fi
38575      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38576    fi
38577  fi
38578
38579  # Now new_path has a complete unix path to the binary
38580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38581    # Keep paths in /bin as-is, but remove trailing .exe if any
38582    new_path="${new_path/%.exe/}"
38583    # Do not save /bin paths to all_fixpath_prefixes!
38584  else
38585    # Not in mixed or Windows style, start by that.
38586    new_path=`cmd //c echo $new_path`
38587
38588  input_path="$new_path"
38589  # Check if we need to convert this using DOS-style short mode. If the path
38590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38591  # take no chances and rewrite it.
38592  # Note: m4 eats our [], so we need to use [ and ] instead.
38593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38594  if test "x$has_forbidden_chars" != x; then
38595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38597  fi
38598
38599    # Output is in $new_path
38600
38601  windows_path="$new_path"
38602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38603    unix_path=`$CYGPATH -u "$windows_path"`
38604    new_path="$unix_path"
38605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38607    new_path="$unix_path"
38608  fi
38609
38610    # remove trailing .exe if any
38611    new_path="${new_path/%.exe/}"
38612
38613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38615  fi
38616
38617    else
38618      # We're on a unix platform. Hooray! :)
38619      # First separate the path from the arguments. This will split at the first
38620      # space.
38621      complete="$AR"
38622      path="${complete%% *}"
38623      tmp="$complete EOL"
38624      arguments="${tmp#* }"
38625
38626      # Cannot rely on the command "which" here since it doesn't always work.
38627      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38628      if test -z "$is_absolute_path"; then
38629        # Path to executable is not absolute. Find it.
38630        IFS_save="$IFS"
38631        IFS=:
38632        for p in $PATH; do
38633          if test -f "$p/$path" && test -x "$p/$path"; then
38634            new_path="$p/$path"
38635            break
38636          fi
38637        done
38638        IFS="$IFS_save"
38639      else
38640        # This is an absolute path, we can use it without further modifications.
38641        new_path="$path"
38642      fi
38643
38644      if test "x$new_path" = x; then
38645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38646$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38647        has_space=`$ECHO "$complete" | $GREP " "`
38648        if test "x$has_space" != x; then
38649          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38650$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38651        fi
38652        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38653      fi
38654    fi
38655
38656    # Now join together the path and the arguments once again
38657    if test "x$arguments" != xEOL; then
38658      new_complete="$new_path ${arguments% *}"
38659    else
38660      new_complete="$new_path"
38661    fi
38662
38663    if test "x$complete" != "x$new_complete"; then
38664      AR="$new_complete"
38665      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38666$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38667    fi
38668  fi
38669
38670
38671
38672  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38673
38674
38675  # Publish this variable in the help.
38676
38677
38678  if [ -z "${LIPO+x}" ]; then
38679    # The variable is not set by user, try to locate tool using the code snippet
38680    for ac_prog in lipo
38681do
38682  # Extract the first word of "$ac_prog", so it can be a program name with args.
38683set dummy $ac_prog; ac_word=$2
38684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38685$as_echo_n "checking for $ac_word... " >&6; }
38686if ${ac_cv_path_LIPO+:} false; then :
38687  $as_echo_n "(cached) " >&6
38688else
38689  case $LIPO in
38690  [\\/]* | ?:[\\/]*)
38691  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38692  ;;
38693  *)
38694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38695for as_dir in $PATH
38696do
38697  IFS=$as_save_IFS
38698  test -z "$as_dir" && as_dir=.
38699    for ac_exec_ext in '' $ac_executable_extensions; do
38700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38701    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38703    break 2
38704  fi
38705done
38706  done
38707IFS=$as_save_IFS
38708
38709  ;;
38710esac
38711fi
38712LIPO=$ac_cv_path_LIPO
38713if test -n "$LIPO"; then
38714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38715$as_echo "$LIPO" >&6; }
38716else
38717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38718$as_echo "no" >&6; }
38719fi
38720
38721
38722  test -n "$LIPO" && break
38723done
38724
38725  else
38726    # The variable is set, but is it from the command line or the environment?
38727
38728    # Try to remove the string !LIPO! from our list.
38729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38731      # If it failed, the variable was not from the command line. Ignore it,
38732      # but warn the user (except for BASH, which is always set by the calling BASH).
38733      if test "xLIPO" != xBASH; then
38734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38735$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38736      fi
38737      # Try to locate tool using the code snippet
38738      for ac_prog in lipo
38739do
38740  # Extract the first word of "$ac_prog", so it can be a program name with args.
38741set dummy $ac_prog; ac_word=$2
38742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38743$as_echo_n "checking for $ac_word... " >&6; }
38744if ${ac_cv_path_LIPO+:} false; then :
38745  $as_echo_n "(cached) " >&6
38746else
38747  case $LIPO in
38748  [\\/]* | ?:[\\/]*)
38749  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38750  ;;
38751  *)
38752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38753for as_dir in $PATH
38754do
38755  IFS=$as_save_IFS
38756  test -z "$as_dir" && as_dir=.
38757    for ac_exec_ext in '' $ac_executable_extensions; do
38758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38759    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38761    break 2
38762  fi
38763done
38764  done
38765IFS=$as_save_IFS
38766
38767  ;;
38768esac
38769fi
38770LIPO=$ac_cv_path_LIPO
38771if test -n "$LIPO"; then
38772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38773$as_echo "$LIPO" >&6; }
38774else
38775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38776$as_echo "no" >&6; }
38777fi
38778
38779
38780  test -n "$LIPO" && break
38781done
38782
38783    else
38784      # If it succeeded, then it was overridden by the user. We will use it
38785      # for the tool.
38786
38787      # First remove it from the list of overridden variables, so we can test
38788      # for unknown variables in the end.
38789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38790
38791      # Check if we try to supply an empty value
38792      if test "x$LIPO" = x; then
38793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38794$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38796$as_echo_n "checking for LIPO... " >&6; }
38797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38798$as_echo "disabled" >&6; }
38799      else
38800        # Check if the provided tool contains a complete path.
38801        tool_specified="$LIPO"
38802        tool_basename="${tool_specified##*/}"
38803        if test "x$tool_basename" = "x$tool_specified"; then
38804          # A command without a complete path is provided, search $PATH.
38805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38806$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38807          # Extract the first word of "$tool_basename", so it can be a program name with args.
38808set dummy $tool_basename; ac_word=$2
38809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38810$as_echo_n "checking for $ac_word... " >&6; }
38811if ${ac_cv_path_LIPO+:} false; then :
38812  $as_echo_n "(cached) " >&6
38813else
38814  case $LIPO in
38815  [\\/]* | ?:[\\/]*)
38816  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38817  ;;
38818  *)
38819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38820for as_dir in $PATH
38821do
38822  IFS=$as_save_IFS
38823  test -z "$as_dir" && as_dir=.
38824    for ac_exec_ext in '' $ac_executable_extensions; do
38825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38826    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38828    break 2
38829  fi
38830done
38831  done
38832IFS=$as_save_IFS
38833
38834  ;;
38835esac
38836fi
38837LIPO=$ac_cv_path_LIPO
38838if test -n "$LIPO"; then
38839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38840$as_echo "$LIPO" >&6; }
38841else
38842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38843$as_echo "no" >&6; }
38844fi
38845
38846
38847          if test "x$LIPO" = x; then
38848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38849          fi
38850        else
38851          # Otherwise we believe it is a complete path. Use it as it is.
38852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38853$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38855$as_echo_n "checking for LIPO... " >&6; }
38856          if test ! -x "$tool_specified"; then
38857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38858$as_echo "not found" >&6; }
38859            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38860          fi
38861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38862$as_echo "$tool_specified" >&6; }
38863        fi
38864      fi
38865    fi
38866
38867  fi
38868
38869
38870
38871  # Only process if variable expands to non-empty
38872
38873  if test "x$LIPO" != x; then
38874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38875
38876  # First separate the path from the arguments. This will split at the first
38877  # space.
38878  complete="$LIPO"
38879  path="${complete%% *}"
38880  tmp="$complete EOL"
38881  arguments="${tmp#* }"
38882
38883  # Input might be given as Windows format, start by converting to
38884  # unix format.
38885  new_path=`$CYGPATH -u "$path"`
38886
38887  # Now try to locate executable using which
38888  new_path=`$WHICH "$new_path" 2> /dev/null`
38889  # bat and cmd files are not always considered executable in cygwin causing which
38890  # to not find them
38891  if test "x$new_path" = x \
38892      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38893      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38894    new_path=`$CYGPATH -u "$path"`
38895  fi
38896  if test "x$new_path" = x; then
38897    # Oops. Which didn't find the executable.
38898    # The splitting of arguments from the executable at a space might have been incorrect,
38899    # since paths with space are more likely in Windows. Give it another try with the whole
38900    # argument.
38901    path="$complete"
38902    arguments="EOL"
38903    new_path=`$CYGPATH -u "$path"`
38904    new_path=`$WHICH "$new_path" 2> /dev/null`
38905    # bat and cmd files are not always considered executable in cygwin causing which
38906    # to not find them
38907    if test "x$new_path" = x \
38908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38910      new_path=`$CYGPATH -u "$path"`
38911    fi
38912    if test "x$new_path" = x; then
38913      # It's still not found. Now this is an unrecoverable error.
38914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38915$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38916      has_space=`$ECHO "$complete" | $GREP " "`
38917      if test "x$has_space" != x; then
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38920      fi
38921      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38922    fi
38923  fi
38924
38925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38928  # "foo.exe" is OK but "foo" is an error.
38929  #
38930  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38931  # It is also a way to make sure we got the proper file name for the real test later on.
38932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38933  if test "x$test_shortpath" = x; then
38934    # Short path failed, file does not exist as specified.
38935    # Try adding .exe or .cmd
38936    if test -f "${new_path}.exe"; then
38937      input_to_shortpath="${new_path}.exe"
38938    elif test -f "${new_path}.cmd"; then
38939      input_to_shortpath="${new_path}.cmd"
38940    else
38941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38942$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38943      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38944$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38945      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38946    fi
38947  else
38948    input_to_shortpath="$new_path"
38949  fi
38950
38951  # Call helper function which possibly converts this using DOS-style short mode.
38952  # If so, the updated path is stored in $new_path.
38953  new_path="$input_to_shortpath"
38954
38955  input_path="$input_to_shortpath"
38956  # Check if we need to convert this using DOS-style short mode. If the path
38957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38958  # take no chances and rewrite it.
38959  # Note: m4 eats our [], so we need to use [ and ] instead.
38960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38961  if test "x$has_forbidden_chars" != x; then
38962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38966      # Going to short mode and back again did indeed matter. Since short mode is
38967      # case insensitive, let's make it lowercase to improve readability.
38968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38969      # Now convert it back to Unix-style (cygpath)
38970      input_path=`$CYGPATH -u "$shortmode_path"`
38971      new_path="$input_path"
38972    fi
38973  fi
38974
38975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38976  if test "x$test_cygdrive_prefix" = x; then
38977    # As a simple fix, exclude /usr/bin since it's not a real path.
38978    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38980      # a path prefixed by /cygdrive for fixpath to work.
38981      new_path="$CYGWIN_ROOT_PATH$input_path"
38982    fi
38983  fi
38984
38985  # remove trailing .exe if any
38986  new_path="${new_path/%.exe/}"
38987
38988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38989
38990  # First separate the path from the arguments. This will split at the first
38991  # space.
38992  complete="$LIPO"
38993  path="${complete%% *}"
38994  tmp="$complete EOL"
38995  arguments="${tmp#* }"
38996
38997  # Input might be given as Windows format, start by converting to
38998  # unix format.
38999  new_path="$path"
39000
39001  windows_path="$new_path"
39002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39003    unix_path=`$CYGPATH -u "$windows_path"`
39004    new_path="$unix_path"
39005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39007    new_path="$unix_path"
39008  fi
39009
39010
39011  # Now try to locate executable using which
39012  new_path=`$WHICH "$new_path" 2> /dev/null`
39013
39014  if test "x$new_path" = x; then
39015    # Oops. Which didn't find the executable.
39016    # The splitting of arguments from the executable at a space might have been incorrect,
39017    # since paths with space are more likely in Windows. Give it another try with the whole
39018    # argument.
39019    path="$complete"
39020    arguments="EOL"
39021    new_path="$path"
39022
39023  windows_path="$new_path"
39024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39025    unix_path=`$CYGPATH -u "$windows_path"`
39026    new_path="$unix_path"
39027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39029    new_path="$unix_path"
39030  fi
39031
39032
39033    new_path=`$WHICH "$new_path" 2> /dev/null`
39034    # bat and cmd files are not always considered executable in MSYS causing which
39035    # to not find them
39036    if test "x$new_path" = x \
39037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039      new_path="$path"
39040
39041  windows_path="$new_path"
39042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39043    unix_path=`$CYGPATH -u "$windows_path"`
39044    new_path="$unix_path"
39045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39047    new_path="$unix_path"
39048  fi
39049
39050    fi
39051
39052    if test "x$new_path" = x; then
39053      # It's still not found. Now this is an unrecoverable error.
39054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39055$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39056      has_space=`$ECHO "$complete" | $GREP " "`
39057      if test "x$has_space" != x; then
39058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39060      fi
39061      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39062    fi
39063  fi
39064
39065  # Now new_path has a complete unix path to the binary
39066  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39067    # Keep paths in /bin as-is, but remove trailing .exe if any
39068    new_path="${new_path/%.exe/}"
39069    # Do not save /bin paths to all_fixpath_prefixes!
39070  else
39071    # Not in mixed or Windows style, start by that.
39072    new_path=`cmd //c echo $new_path`
39073
39074  input_path="$new_path"
39075  # Check if we need to convert this using DOS-style short mode. If the path
39076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39077  # take no chances and rewrite it.
39078  # Note: m4 eats our [], so we need to use [ and ] instead.
39079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39080  if test "x$has_forbidden_chars" != x; then
39081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39083  fi
39084
39085    # Output is in $new_path
39086
39087  windows_path="$new_path"
39088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39089    unix_path=`$CYGPATH -u "$windows_path"`
39090    new_path="$unix_path"
39091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39093    new_path="$unix_path"
39094  fi
39095
39096    # remove trailing .exe if any
39097    new_path="${new_path/%.exe/}"
39098
39099    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39100    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39101  fi
39102
39103    else
39104      # We're on a unix platform. Hooray! :)
39105      # First separate the path from the arguments. This will split at the first
39106      # space.
39107      complete="$LIPO"
39108      path="${complete%% *}"
39109      tmp="$complete EOL"
39110      arguments="${tmp#* }"
39111
39112      # Cannot rely on the command "which" here since it doesn't always work.
39113      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39114      if test -z "$is_absolute_path"; then
39115        # Path to executable is not absolute. Find it.
39116        IFS_save="$IFS"
39117        IFS=:
39118        for p in $PATH; do
39119          if test -f "$p/$path" && test -x "$p/$path"; then
39120            new_path="$p/$path"
39121            break
39122          fi
39123        done
39124        IFS="$IFS_save"
39125      else
39126        # This is an absolute path, we can use it without further modifications.
39127        new_path="$path"
39128      fi
39129
39130      if test "x$new_path" = x; then
39131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39132$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39133        has_space=`$ECHO "$complete" | $GREP " "`
39134        if test "x$has_space" != x; then
39135          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39137        fi
39138        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39139      fi
39140    fi
39141
39142    # Now join together the path and the arguments once again
39143    if test "x$arguments" != xEOL; then
39144      new_complete="$new_path ${arguments% *}"
39145    else
39146      new_complete="$new_path"
39147    fi
39148
39149    if test "x$complete" != "x$new_complete"; then
39150      LIPO="$new_complete"
39151      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39152$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39153    fi
39154  fi
39155
39156  fi
39157
39158  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39159    # Extract the first word of "mt", so it can be a program name with args.
39160set dummy mt; ac_word=$2
39161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39162$as_echo_n "checking for $ac_word... " >&6; }
39163if ${ac_cv_prog_MT+:} false; then :
39164  $as_echo_n "(cached) " >&6
39165else
39166  if test -n "$MT"; then
39167  ac_cv_prog_MT="$MT" # Let the user override the test.
39168else
39169  ac_prog_rejected=no
39170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39171for as_dir in $PATH
39172do
39173  IFS=$as_save_IFS
39174  test -z "$as_dir" && as_dir=.
39175    for ac_exec_ext in '' $ac_executable_extensions; do
39176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39177    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39178       ac_prog_rejected=yes
39179       continue
39180     fi
39181    ac_cv_prog_MT="mt"
39182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39183    break 2
39184  fi
39185done
39186  done
39187IFS=$as_save_IFS
39188
39189if test $ac_prog_rejected = yes; then
39190  # We found a bogon in the path, so make sure we never use it.
39191  set dummy $ac_cv_prog_MT
39192  shift
39193  if test $# != 0; then
39194    # We chose a different compiler from the bogus one.
39195    # However, it has the same basename, so the bogon will be chosen
39196    # first if we set MT to just the basename; use the full file name.
39197    shift
39198    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39199  fi
39200fi
39201fi
39202fi
39203MT=$ac_cv_prog_MT
39204if test -n "$MT"; then
39205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39206$as_echo "$MT" >&6; }
39207else
39208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39209$as_echo "no" >&6; }
39210fi
39211
39212
39213
39214  # Only process if variable expands to non-empty
39215
39216  if test "x$MT" != x; then
39217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39218
39219  # First separate the path from the arguments. This will split at the first
39220  # space.
39221  complete="$MT"
39222  path="${complete%% *}"
39223  tmp="$complete EOL"
39224  arguments="${tmp#* }"
39225
39226  # Input might be given as Windows format, start by converting to
39227  # unix format.
39228  new_path=`$CYGPATH -u "$path"`
39229
39230  # Now try to locate executable using which
39231  new_path=`$WHICH "$new_path" 2> /dev/null`
39232  # bat and cmd files are not always considered executable in cygwin causing which
39233  # to not find them
39234  if test "x$new_path" = x \
39235      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39236      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39237    new_path=`$CYGPATH -u "$path"`
39238  fi
39239  if test "x$new_path" = x; then
39240    # Oops. Which didn't find the executable.
39241    # The splitting of arguments from the executable at a space might have been incorrect,
39242    # since paths with space are more likely in Windows. Give it another try with the whole
39243    # argument.
39244    path="$complete"
39245    arguments="EOL"
39246    new_path=`$CYGPATH -u "$path"`
39247    new_path=`$WHICH "$new_path" 2> /dev/null`
39248    # bat and cmd files are not always considered executable in cygwin causing which
39249    # to not find them
39250    if test "x$new_path" = x \
39251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39253      new_path=`$CYGPATH -u "$path"`
39254    fi
39255    if test "x$new_path" = x; then
39256      # It's still not found. Now this is an unrecoverable error.
39257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39258$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39259      has_space=`$ECHO "$complete" | $GREP " "`
39260      if test "x$has_space" != x; then
39261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39263      fi
39264      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39265    fi
39266  fi
39267
39268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39271  # "foo.exe" is OK but "foo" is an error.
39272  #
39273  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39274  # It is also a way to make sure we got the proper file name for the real test later on.
39275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39276  if test "x$test_shortpath" = x; then
39277    # Short path failed, file does not exist as specified.
39278    # Try adding .exe or .cmd
39279    if test -f "${new_path}.exe"; then
39280      input_to_shortpath="${new_path}.exe"
39281    elif test -f "${new_path}.cmd"; then
39282      input_to_shortpath="${new_path}.cmd"
39283    else
39284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39285$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39288      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39289    fi
39290  else
39291    input_to_shortpath="$new_path"
39292  fi
39293
39294  # Call helper function which possibly converts this using DOS-style short mode.
39295  # If so, the updated path is stored in $new_path.
39296  new_path="$input_to_shortpath"
39297
39298  input_path="$input_to_shortpath"
39299  # Check if we need to convert this using DOS-style short mode. If the path
39300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39301  # take no chances and rewrite it.
39302  # Note: m4 eats our [], so we need to use [ and ] instead.
39303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39304  if test "x$has_forbidden_chars" != x; then
39305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39309      # Going to short mode and back again did indeed matter. Since short mode is
39310      # case insensitive, let's make it lowercase to improve readability.
39311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39312      # Now convert it back to Unix-style (cygpath)
39313      input_path=`$CYGPATH -u "$shortmode_path"`
39314      new_path="$input_path"
39315    fi
39316  fi
39317
39318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39319  if test "x$test_cygdrive_prefix" = x; then
39320    # As a simple fix, exclude /usr/bin since it's not a real path.
39321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39323      # a path prefixed by /cygdrive for fixpath to work.
39324      new_path="$CYGWIN_ROOT_PATH$input_path"
39325    fi
39326  fi
39327
39328  # remove trailing .exe if any
39329  new_path="${new_path/%.exe/}"
39330
39331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39332
39333  # First separate the path from the arguments. This will split at the first
39334  # space.
39335  complete="$MT"
39336  path="${complete%% *}"
39337  tmp="$complete EOL"
39338  arguments="${tmp#* }"
39339
39340  # Input might be given as Windows format, start by converting to
39341  # unix format.
39342  new_path="$path"
39343
39344  windows_path="$new_path"
39345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39346    unix_path=`$CYGPATH -u "$windows_path"`
39347    new_path="$unix_path"
39348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39350    new_path="$unix_path"
39351  fi
39352
39353
39354  # Now try to locate executable using which
39355  new_path=`$WHICH "$new_path" 2> /dev/null`
39356
39357  if test "x$new_path" = x; then
39358    # Oops. Which didn't find the executable.
39359    # The splitting of arguments from the executable at a space might have been incorrect,
39360    # since paths with space are more likely in Windows. Give it another try with the whole
39361    # argument.
39362    path="$complete"
39363    arguments="EOL"
39364    new_path="$path"
39365
39366  windows_path="$new_path"
39367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39368    unix_path=`$CYGPATH -u "$windows_path"`
39369    new_path="$unix_path"
39370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39372    new_path="$unix_path"
39373  fi
39374
39375
39376    new_path=`$WHICH "$new_path" 2> /dev/null`
39377    # bat and cmd files are not always considered executable in MSYS causing which
39378    # to not find them
39379    if test "x$new_path" = x \
39380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
39394
39395    if test "x$new_path" = x; then
39396      # It's still not found. Now this is an unrecoverable error.
39397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39398$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39399      has_space=`$ECHO "$complete" | $GREP " "`
39400      if test "x$has_space" != x; then
39401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39403      fi
39404      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39405    fi
39406  fi
39407
39408  # Now new_path has a complete unix path to the binary
39409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39410    # Keep paths in /bin as-is, but remove trailing .exe if any
39411    new_path="${new_path/%.exe/}"
39412    # Do not save /bin paths to all_fixpath_prefixes!
39413  else
39414    # Not in mixed or Windows style, start by that.
39415    new_path=`cmd //c echo $new_path`
39416
39417  input_path="$new_path"
39418  # Check if we need to convert this using DOS-style short mode. If the path
39419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39420  # take no chances and rewrite it.
39421  # Note: m4 eats our [], so we need to use [ and ] instead.
39422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39423  if test "x$has_forbidden_chars" != x; then
39424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39426  fi
39427
39428    # Output is in $new_path
39429
39430  windows_path="$new_path"
39431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39432    unix_path=`$CYGPATH -u "$windows_path"`
39433    new_path="$unix_path"
39434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39436    new_path="$unix_path"
39437  fi
39438
39439    # remove trailing .exe if any
39440    new_path="${new_path/%.exe/}"
39441
39442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39444  fi
39445
39446    else
39447      # We're on a unix platform. Hooray! :)
39448      # First separate the path from the arguments. This will split at the first
39449      # space.
39450      complete="$MT"
39451      path="${complete%% *}"
39452      tmp="$complete EOL"
39453      arguments="${tmp#* }"
39454
39455      # Cannot rely on the command "which" here since it doesn't always work.
39456      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39457      if test -z "$is_absolute_path"; then
39458        # Path to executable is not absolute. Find it.
39459        IFS_save="$IFS"
39460        IFS=:
39461        for p in $PATH; do
39462          if test -f "$p/$path" && test -x "$p/$path"; then
39463            new_path="$p/$path"
39464            break
39465          fi
39466        done
39467        IFS="$IFS_save"
39468      else
39469        # This is an absolute path, we can use it without further modifications.
39470        new_path="$path"
39471      fi
39472
39473      if test "x$new_path" = x; then
39474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39475$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39476        has_space=`$ECHO "$complete" | $GREP " "`
39477        if test "x$has_space" != x; then
39478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39480        fi
39481        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39482      fi
39483    fi
39484
39485    # Now join together the path and the arguments once again
39486    if test "x$arguments" != xEOL; then
39487      new_complete="$new_path ${arguments% *}"
39488    else
39489      new_complete="$new_path"
39490    fi
39491
39492    if test "x$complete" != "x$new_complete"; then
39493      MT="$new_complete"
39494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39495$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39496    fi
39497  fi
39498
39499    # Setup the resource compiler (RC)
39500    # Extract the first word of "rc", so it can be a program name with args.
39501set dummy rc; ac_word=$2
39502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39503$as_echo_n "checking for $ac_word... " >&6; }
39504if ${ac_cv_prog_RC+:} false; then :
39505  $as_echo_n "(cached) " >&6
39506else
39507  if test -n "$RC"; then
39508  ac_cv_prog_RC="$RC" # Let the user override the test.
39509else
39510  ac_prog_rejected=no
39511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39512for as_dir in $PATH
39513do
39514  IFS=$as_save_IFS
39515  test -z "$as_dir" && as_dir=.
39516    for ac_exec_ext in '' $ac_executable_extensions; do
39517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39518    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39519       ac_prog_rejected=yes
39520       continue
39521     fi
39522    ac_cv_prog_RC="rc"
39523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39524    break 2
39525  fi
39526done
39527  done
39528IFS=$as_save_IFS
39529
39530if test $ac_prog_rejected = yes; then
39531  # We found a bogon in the path, so make sure we never use it.
39532  set dummy $ac_cv_prog_RC
39533  shift
39534  if test $# != 0; then
39535    # We chose a different compiler from the bogus one.
39536    # However, it has the same basename, so the bogon will be chosen
39537    # first if we set RC to just the basename; use the full file name.
39538    shift
39539    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39540  fi
39541fi
39542fi
39543fi
39544RC=$ac_cv_prog_RC
39545if test -n "$RC"; then
39546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39547$as_echo "$RC" >&6; }
39548else
39549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39550$as_echo "no" >&6; }
39551fi
39552
39553
39554
39555  # Only process if variable expands to non-empty
39556
39557  if test "x$RC" != x; then
39558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39559
39560  # First separate the path from the arguments. This will split at the first
39561  # space.
39562  complete="$RC"
39563  path="${complete%% *}"
39564  tmp="$complete EOL"
39565  arguments="${tmp#* }"
39566
39567  # Input might be given as Windows format, start by converting to
39568  # unix format.
39569  new_path=`$CYGPATH -u "$path"`
39570
39571  # Now try to locate executable using which
39572  new_path=`$WHICH "$new_path" 2> /dev/null`
39573  # bat and cmd files are not always considered executable in cygwin causing which
39574  # to not find them
39575  if test "x$new_path" = x \
39576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39578    new_path=`$CYGPATH -u "$path"`
39579  fi
39580  if test "x$new_path" = x; then
39581    # Oops. Which didn't find the executable.
39582    # The splitting of arguments from the executable at a space might have been incorrect,
39583    # since paths with space are more likely in Windows. Give it another try with the whole
39584    # argument.
39585    path="$complete"
39586    arguments="EOL"
39587    new_path=`$CYGPATH -u "$path"`
39588    new_path=`$WHICH "$new_path" 2> /dev/null`
39589    # bat and cmd files are not always considered executable in cygwin causing which
39590    # to not find them
39591    if test "x$new_path" = x \
39592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39594      new_path=`$CYGPATH -u "$path"`
39595    fi
39596    if test "x$new_path" = x; then
39597      # It's still not found. Now this is an unrecoverable error.
39598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39599$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39600      has_space=`$ECHO "$complete" | $GREP " "`
39601      if test "x$has_space" != x; then
39602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39604      fi
39605      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39606    fi
39607  fi
39608
39609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39612  # "foo.exe" is OK but "foo" is an error.
39613  #
39614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39615  # It is also a way to make sure we got the proper file name for the real test later on.
39616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39617  if test "x$test_shortpath" = x; then
39618    # Short path failed, file does not exist as specified.
39619    # Try adding .exe or .cmd
39620    if test -f "${new_path}.exe"; then
39621      input_to_shortpath="${new_path}.exe"
39622    elif test -f "${new_path}.cmd"; then
39623      input_to_shortpath="${new_path}.cmd"
39624    else
39625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39626$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39629      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39630    fi
39631  else
39632    input_to_shortpath="$new_path"
39633  fi
39634
39635  # Call helper function which possibly converts this using DOS-style short mode.
39636  # If so, the updated path is stored in $new_path.
39637  new_path="$input_to_shortpath"
39638
39639  input_path="$input_to_shortpath"
39640  # Check if we need to convert this using DOS-style short mode. If the path
39641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39642  # take no chances and rewrite it.
39643  # Note: m4 eats our [], so we need to use [ and ] instead.
39644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39645  if test "x$has_forbidden_chars" != x; then
39646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39650      # Going to short mode and back again did indeed matter. Since short mode is
39651      # case insensitive, let's make it lowercase to improve readability.
39652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39653      # Now convert it back to Unix-style (cygpath)
39654      input_path=`$CYGPATH -u "$shortmode_path"`
39655      new_path="$input_path"
39656    fi
39657  fi
39658
39659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39660  if test "x$test_cygdrive_prefix" = x; then
39661    # As a simple fix, exclude /usr/bin since it's not a real path.
39662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39664      # a path prefixed by /cygdrive for fixpath to work.
39665      new_path="$CYGWIN_ROOT_PATH$input_path"
39666    fi
39667  fi
39668
39669  # remove trailing .exe if any
39670  new_path="${new_path/%.exe/}"
39671
39672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39673
39674  # First separate the path from the arguments. This will split at the first
39675  # space.
39676  complete="$RC"
39677  path="${complete%% *}"
39678  tmp="$complete EOL"
39679  arguments="${tmp#* }"
39680
39681  # Input might be given as Windows format, start by converting to
39682  # unix format.
39683  new_path="$path"
39684
39685  windows_path="$new_path"
39686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39687    unix_path=`$CYGPATH -u "$windows_path"`
39688    new_path="$unix_path"
39689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39691    new_path="$unix_path"
39692  fi
39693
39694
39695  # Now try to locate executable using which
39696  new_path=`$WHICH "$new_path" 2> /dev/null`
39697
39698  if test "x$new_path" = x; then
39699    # Oops. Which didn't find the executable.
39700    # The splitting of arguments from the executable at a space might have been incorrect,
39701    # since paths with space are more likely in Windows. Give it another try with the whole
39702    # argument.
39703    path="$complete"
39704    arguments="EOL"
39705    new_path="$path"
39706
39707  windows_path="$new_path"
39708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39709    unix_path=`$CYGPATH -u "$windows_path"`
39710    new_path="$unix_path"
39711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39713    new_path="$unix_path"
39714  fi
39715
39716
39717    new_path=`$WHICH "$new_path" 2> /dev/null`
39718    # bat and cmd files are not always considered executable in MSYS causing which
39719    # to not find them
39720    if test "x$new_path" = x \
39721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39723      new_path="$path"
39724
39725  windows_path="$new_path"
39726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39727    unix_path=`$CYGPATH -u "$windows_path"`
39728    new_path="$unix_path"
39729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39731    new_path="$unix_path"
39732  fi
39733
39734    fi
39735
39736    if test "x$new_path" = x; then
39737      # It's still not found. Now this is an unrecoverable error.
39738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39739$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39740      has_space=`$ECHO "$complete" | $GREP " "`
39741      if test "x$has_space" != x; then
39742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39744      fi
39745      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39746    fi
39747  fi
39748
39749  # Now new_path has a complete unix path to the binary
39750  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39751    # Keep paths in /bin as-is, but remove trailing .exe if any
39752    new_path="${new_path/%.exe/}"
39753    # Do not save /bin paths to all_fixpath_prefixes!
39754  else
39755    # Not in mixed or Windows style, start by that.
39756    new_path=`cmd //c echo $new_path`
39757
39758  input_path="$new_path"
39759  # Check if we need to convert this using DOS-style short mode. If the path
39760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39761  # take no chances and rewrite it.
39762  # Note: m4 eats our [], so we need to use [ and ] instead.
39763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39764  if test "x$has_forbidden_chars" != x; then
39765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39767  fi
39768
39769    # Output is in $new_path
39770
39771  windows_path="$new_path"
39772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39773    unix_path=`$CYGPATH -u "$windows_path"`
39774    new_path="$unix_path"
39775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39777    new_path="$unix_path"
39778  fi
39779
39780    # remove trailing .exe if any
39781    new_path="${new_path/%.exe/}"
39782
39783    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39784    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39785  fi
39786
39787    else
39788      # We're on a unix platform. Hooray! :)
39789      # First separate the path from the arguments. This will split at the first
39790      # space.
39791      complete="$RC"
39792      path="${complete%% *}"
39793      tmp="$complete EOL"
39794      arguments="${tmp#* }"
39795
39796      # Cannot rely on the command "which" here since it doesn't always work.
39797      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39798      if test -z "$is_absolute_path"; then
39799        # Path to executable is not absolute. Find it.
39800        IFS_save="$IFS"
39801        IFS=:
39802        for p in $PATH; do
39803          if test -f "$p/$path" && test -x "$p/$path"; then
39804            new_path="$p/$path"
39805            break
39806          fi
39807        done
39808        IFS="$IFS_save"
39809      else
39810        # This is an absolute path, we can use it without further modifications.
39811        new_path="$path"
39812      fi
39813
39814      if test "x$new_path" = x; then
39815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39816$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39817        has_space=`$ECHO "$complete" | $GREP " "`
39818        if test "x$has_space" != x; then
39819          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39820$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39821        fi
39822        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39823      fi
39824    fi
39825
39826    # Now join together the path and the arguments once again
39827    if test "x$arguments" != xEOL; then
39828      new_complete="$new_path ${arguments% *}"
39829    else
39830      new_complete="$new_path"
39831    fi
39832
39833    if test "x$complete" != "x$new_complete"; then
39834      RC="$new_complete"
39835      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39836$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39837    fi
39838  fi
39839
39840    # Extract the first word of "dumpbin", so it can be a program name with args.
39841set dummy dumpbin; ac_word=$2
39842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39843$as_echo_n "checking for $ac_word... " >&6; }
39844if ${ac_cv_prog_DUMPBIN+:} false; then :
39845  $as_echo_n "(cached) " >&6
39846else
39847  if test -n "$DUMPBIN"; then
39848  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39849else
39850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39851for as_dir in $PATH
39852do
39853  IFS=$as_save_IFS
39854  test -z "$as_dir" && as_dir=.
39855    for ac_exec_ext in '' $ac_executable_extensions; do
39856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39857    ac_cv_prog_DUMPBIN="dumpbin"
39858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39859    break 2
39860  fi
39861done
39862  done
39863IFS=$as_save_IFS
39864
39865fi
39866fi
39867DUMPBIN=$ac_cv_prog_DUMPBIN
39868if test -n "$DUMPBIN"; then
39869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39870$as_echo "$DUMPBIN" >&6; }
39871else
39872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39873$as_echo "no" >&6; }
39874fi
39875
39876
39877
39878  # Only process if variable expands to non-empty
39879
39880  if test "x$DUMPBIN" != x; then
39881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39882
39883  # First separate the path from the arguments. This will split at the first
39884  # space.
39885  complete="$DUMPBIN"
39886  path="${complete%% *}"
39887  tmp="$complete EOL"
39888  arguments="${tmp#* }"
39889
39890  # Input might be given as Windows format, start by converting to
39891  # unix format.
39892  new_path=`$CYGPATH -u "$path"`
39893
39894  # Now try to locate executable using which
39895  new_path=`$WHICH "$new_path" 2> /dev/null`
39896  # bat and cmd files are not always considered executable in cygwin causing which
39897  # to not find them
39898  if test "x$new_path" = x \
39899      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39900      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39901    new_path=`$CYGPATH -u "$path"`
39902  fi
39903  if test "x$new_path" = x; then
39904    # Oops. Which didn't find the executable.
39905    # The splitting of arguments from the executable at a space might have been incorrect,
39906    # since paths with space are more likely in Windows. Give it another try with the whole
39907    # argument.
39908    path="$complete"
39909    arguments="EOL"
39910    new_path=`$CYGPATH -u "$path"`
39911    new_path=`$WHICH "$new_path" 2> /dev/null`
39912    # bat and cmd files are not always considered executable in cygwin causing which
39913    # to not find them
39914    if test "x$new_path" = x \
39915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39917      new_path=`$CYGPATH -u "$path"`
39918    fi
39919    if test "x$new_path" = x; then
39920      # It's still not found. Now this is an unrecoverable error.
39921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39922$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39923      has_space=`$ECHO "$complete" | $GREP " "`
39924      if test "x$has_space" != x; then
39925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39927      fi
39928      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39929    fi
39930  fi
39931
39932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39935  # "foo.exe" is OK but "foo" is an error.
39936  #
39937  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39938  # It is also a way to make sure we got the proper file name for the real test later on.
39939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39940  if test "x$test_shortpath" = x; then
39941    # Short path failed, file does not exist as specified.
39942    # Try adding .exe or .cmd
39943    if test -f "${new_path}.exe"; then
39944      input_to_shortpath="${new_path}.exe"
39945    elif test -f "${new_path}.cmd"; then
39946      input_to_shortpath="${new_path}.cmd"
39947    else
39948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39949$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39950      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39951$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39952      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39953    fi
39954  else
39955    input_to_shortpath="$new_path"
39956  fi
39957
39958  # Call helper function which possibly converts this using DOS-style short mode.
39959  # If so, the updated path is stored in $new_path.
39960  new_path="$input_to_shortpath"
39961
39962  input_path="$input_to_shortpath"
39963  # Check if we need to convert this using DOS-style short mode. If the path
39964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39965  # take no chances and rewrite it.
39966  # Note: m4 eats our [], so we need to use [ and ] instead.
39967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39968  if test "x$has_forbidden_chars" != x; then
39969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39973      # Going to short mode and back again did indeed matter. Since short mode is
39974      # case insensitive, let's make it lowercase to improve readability.
39975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39976      # Now convert it back to Unix-style (cygpath)
39977      input_path=`$CYGPATH -u "$shortmode_path"`
39978      new_path="$input_path"
39979    fi
39980  fi
39981
39982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39983  if test "x$test_cygdrive_prefix" = x; then
39984    # As a simple fix, exclude /usr/bin since it's not a real path.
39985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39987      # a path prefixed by /cygdrive for fixpath to work.
39988      new_path="$CYGWIN_ROOT_PATH$input_path"
39989    fi
39990  fi
39991
39992  # remove trailing .exe if any
39993  new_path="${new_path/%.exe/}"
39994
39995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39996
39997  # First separate the path from the arguments. This will split at the first
39998  # space.
39999  complete="$DUMPBIN"
40000  path="${complete%% *}"
40001  tmp="$complete EOL"
40002  arguments="${tmp#* }"
40003
40004  # Input might be given as Windows format, start by converting to
40005  # unix format.
40006  new_path="$path"
40007
40008  windows_path="$new_path"
40009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40010    unix_path=`$CYGPATH -u "$windows_path"`
40011    new_path="$unix_path"
40012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40014    new_path="$unix_path"
40015  fi
40016
40017
40018  # Now try to locate executable using which
40019  new_path=`$WHICH "$new_path" 2> /dev/null`
40020
40021  if test "x$new_path" = x; then
40022    # Oops. Which didn't find the executable.
40023    # The splitting of arguments from the executable at a space might have been incorrect,
40024    # since paths with space are more likely in Windows. Give it another try with the whole
40025    # argument.
40026    path="$complete"
40027    arguments="EOL"
40028    new_path="$path"
40029
40030  windows_path="$new_path"
40031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40032    unix_path=`$CYGPATH -u "$windows_path"`
40033    new_path="$unix_path"
40034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40036    new_path="$unix_path"
40037  fi
40038
40039
40040    new_path=`$WHICH "$new_path" 2> /dev/null`
40041    # bat and cmd files are not always considered executable in MSYS causing which
40042    # to not find them
40043    if test "x$new_path" = x \
40044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40046      new_path="$path"
40047
40048  windows_path="$new_path"
40049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40050    unix_path=`$CYGPATH -u "$windows_path"`
40051    new_path="$unix_path"
40052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40054    new_path="$unix_path"
40055  fi
40056
40057    fi
40058
40059    if test "x$new_path" = x; then
40060      # It's still not found. Now this is an unrecoverable error.
40061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40062$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40063      has_space=`$ECHO "$complete" | $GREP " "`
40064      if test "x$has_space" != x; then
40065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40067      fi
40068      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40069    fi
40070  fi
40071
40072  # Now new_path has a complete unix path to the binary
40073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40074    # Keep paths in /bin as-is, but remove trailing .exe if any
40075    new_path="${new_path/%.exe/}"
40076    # Do not save /bin paths to all_fixpath_prefixes!
40077  else
40078    # Not in mixed or Windows style, start by that.
40079    new_path=`cmd //c echo $new_path`
40080
40081  input_path="$new_path"
40082  # Check if we need to convert this using DOS-style short mode. If the path
40083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40084  # take no chances and rewrite it.
40085  # Note: m4 eats our [], so we need to use [ and ] instead.
40086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40087  if test "x$has_forbidden_chars" != x; then
40088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40090  fi
40091
40092    # Output is in $new_path
40093
40094  windows_path="$new_path"
40095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40096    unix_path=`$CYGPATH -u "$windows_path"`
40097    new_path="$unix_path"
40098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40100    new_path="$unix_path"
40101  fi
40102
40103    # remove trailing .exe if any
40104    new_path="${new_path/%.exe/}"
40105
40106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40108  fi
40109
40110    else
40111      # We're on a unix platform. Hooray! :)
40112      # First separate the path from the arguments. This will split at the first
40113      # space.
40114      complete="$DUMPBIN"
40115      path="${complete%% *}"
40116      tmp="$complete EOL"
40117      arguments="${tmp#* }"
40118
40119      # Cannot rely on the command "which" here since it doesn't always work.
40120      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40121      if test -z "$is_absolute_path"; then
40122        # Path to executable is not absolute. Find it.
40123        IFS_save="$IFS"
40124        IFS=:
40125        for p in $PATH; do
40126          if test -f "$p/$path" && test -x "$p/$path"; then
40127            new_path="$p/$path"
40128            break
40129          fi
40130        done
40131        IFS="$IFS_save"
40132      else
40133        # This is an absolute path, we can use it without further modifications.
40134        new_path="$path"
40135      fi
40136
40137      if test "x$new_path" = x; then
40138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40139$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40140        has_space=`$ECHO "$complete" | $GREP " "`
40141        if test "x$has_space" != x; then
40142          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40143$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40144        fi
40145        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40146      fi
40147    fi
40148
40149    # Now join together the path and the arguments once again
40150    if test "x$arguments" != xEOL; then
40151      new_complete="$new_path ${arguments% *}"
40152    else
40153      new_complete="$new_path"
40154    fi
40155
40156    if test "x$complete" != "x$new_complete"; then
40157      DUMPBIN="$new_complete"
40158      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40159$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40160    fi
40161  fi
40162
40163    # We need to check for 'msbuild.exe' because at the place where we expect to
40164    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40165    # won't find the 'msbuild.exe' executable in that case (and the
40166    # 'ac_executable_extensions' is unusable due to performance reasons).
40167    # Notice that we intentionally don't fix up the path to MSBUILD because we
40168    # will call it in a DOS shell during freetype detection on Windows (see
40169    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40170    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40171set dummy msbuild.exe; ac_word=$2
40172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40173$as_echo_n "checking for $ac_word... " >&6; }
40174if ${ac_cv_prog_MSBUILD+:} false; then :
40175  $as_echo_n "(cached) " >&6
40176else
40177  if test -n "$MSBUILD"; then
40178  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40179else
40180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40181for as_dir in $PATH
40182do
40183  IFS=$as_save_IFS
40184  test -z "$as_dir" && as_dir=.
40185    for ac_exec_ext in '' $ac_executable_extensions; do
40186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40187    ac_cv_prog_MSBUILD="msbuild.exe"
40188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40189    break 2
40190  fi
40191done
40192  done
40193IFS=$as_save_IFS
40194
40195fi
40196fi
40197MSBUILD=$ac_cv_prog_MSBUILD
40198if test -n "$MSBUILD"; then
40199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40200$as_echo "$MSBUILD" >&6; }
40201else
40202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40203$as_echo "no" >&6; }
40204fi
40205
40206
40207  fi
40208
40209  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40210
40211
40212  # Publish this variable in the help.
40213
40214
40215  if [ -z "${STRIP+x}" ]; then
40216    # The variable is not set by user, try to locate tool using the code snippet
40217    for ac_prog in strip
40218do
40219  # Extract the first word of "$ac_prog", so it can be a program name with args.
40220set dummy $ac_prog; ac_word=$2
40221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40222$as_echo_n "checking for $ac_word... " >&6; }
40223if ${ac_cv_path_STRIP+:} false; then :
40224  $as_echo_n "(cached) " >&6
40225else
40226  case $STRIP in
40227  [\\/]* | ?:[\\/]*)
40228  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40229  ;;
40230  *)
40231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40232for as_dir in $PATH
40233do
40234  IFS=$as_save_IFS
40235  test -z "$as_dir" && as_dir=.
40236    for ac_exec_ext in '' $ac_executable_extensions; do
40237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40238    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40240    break 2
40241  fi
40242done
40243  done
40244IFS=$as_save_IFS
40245
40246  ;;
40247esac
40248fi
40249STRIP=$ac_cv_path_STRIP
40250if test -n "$STRIP"; then
40251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40252$as_echo "$STRIP" >&6; }
40253else
40254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40255$as_echo "no" >&6; }
40256fi
40257
40258
40259  test -n "$STRIP" && break
40260done
40261
40262  else
40263    # The variable is set, but is it from the command line or the environment?
40264
40265    # Try to remove the string !STRIP! from our list.
40266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40268      # If it failed, the variable was not from the command line. Ignore it,
40269      # but warn the user (except for BASH, which is always set by the calling BASH).
40270      if test "xSTRIP" != xBASH; then
40271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40272$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40273      fi
40274      # Try to locate tool using the code snippet
40275      for ac_prog in strip
40276do
40277  # Extract the first word of "$ac_prog", so it can be a program name with args.
40278set dummy $ac_prog; ac_word=$2
40279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40280$as_echo_n "checking for $ac_word... " >&6; }
40281if ${ac_cv_path_STRIP+:} false; then :
40282  $as_echo_n "(cached) " >&6
40283else
40284  case $STRIP in
40285  [\\/]* | ?:[\\/]*)
40286  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40287  ;;
40288  *)
40289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40290for as_dir in $PATH
40291do
40292  IFS=$as_save_IFS
40293  test -z "$as_dir" && as_dir=.
40294    for ac_exec_ext in '' $ac_executable_extensions; do
40295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40296    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40298    break 2
40299  fi
40300done
40301  done
40302IFS=$as_save_IFS
40303
40304  ;;
40305esac
40306fi
40307STRIP=$ac_cv_path_STRIP
40308if test -n "$STRIP"; then
40309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40310$as_echo "$STRIP" >&6; }
40311else
40312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40313$as_echo "no" >&6; }
40314fi
40315
40316
40317  test -n "$STRIP" && break
40318done
40319
40320    else
40321      # If it succeeded, then it was overridden by the user. We will use it
40322      # for the tool.
40323
40324      # First remove it from the list of overridden variables, so we can test
40325      # for unknown variables in the end.
40326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40327
40328      # Check if we try to supply an empty value
40329      if test "x$STRIP" = x; then
40330        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40331$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40333$as_echo_n "checking for STRIP... " >&6; }
40334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40335$as_echo "disabled" >&6; }
40336      else
40337        # Check if the provided tool contains a complete path.
40338        tool_specified="$STRIP"
40339        tool_basename="${tool_specified##*/}"
40340        if test "x$tool_basename" = "x$tool_specified"; then
40341          # A command without a complete path is provided, search $PATH.
40342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40343$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40344          # Extract the first word of "$tool_basename", so it can be a program name with args.
40345set dummy $tool_basename; ac_word=$2
40346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40347$as_echo_n "checking for $ac_word... " >&6; }
40348if ${ac_cv_path_STRIP+:} false; then :
40349  $as_echo_n "(cached) " >&6
40350else
40351  case $STRIP in
40352  [\\/]* | ?:[\\/]*)
40353  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40354  ;;
40355  *)
40356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40357for as_dir in $PATH
40358do
40359  IFS=$as_save_IFS
40360  test -z "$as_dir" && as_dir=.
40361    for ac_exec_ext in '' $ac_executable_extensions; do
40362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40363    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40365    break 2
40366  fi
40367done
40368  done
40369IFS=$as_save_IFS
40370
40371  ;;
40372esac
40373fi
40374STRIP=$ac_cv_path_STRIP
40375if test -n "$STRIP"; then
40376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40377$as_echo "$STRIP" >&6; }
40378else
40379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40380$as_echo "no" >&6; }
40381fi
40382
40383
40384          if test "x$STRIP" = x; then
40385            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40386          fi
40387        else
40388          # Otherwise we believe it is a complete path. Use it as it is.
40389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40390$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40391          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40392$as_echo_n "checking for STRIP... " >&6; }
40393          if test ! -x "$tool_specified"; then
40394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40395$as_echo "not found" >&6; }
40396            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40397          fi
40398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40399$as_echo "$tool_specified" >&6; }
40400        fi
40401      fi
40402    fi
40403
40404  fi
40405
40406
40407
40408  # Only process if variable expands to non-empty
40409
40410  if test "x$STRIP" != x; then
40411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412
40413  # First separate the path from the arguments. This will split at the first
40414  # space.
40415  complete="$STRIP"
40416  path="${complete%% *}"
40417  tmp="$complete EOL"
40418  arguments="${tmp#* }"
40419
40420  # Input might be given as Windows format, start by converting to
40421  # unix format.
40422  new_path=`$CYGPATH -u "$path"`
40423
40424  # Now try to locate executable using which
40425  new_path=`$WHICH "$new_path" 2> /dev/null`
40426  # bat and cmd files are not always considered executable in cygwin causing which
40427  # to not find them
40428  if test "x$new_path" = x \
40429      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40430      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40431    new_path=`$CYGPATH -u "$path"`
40432  fi
40433  if test "x$new_path" = x; then
40434    # Oops. Which didn't find the executable.
40435    # The splitting of arguments from the executable at a space might have been incorrect,
40436    # since paths with space are more likely in Windows. Give it another try with the whole
40437    # argument.
40438    path="$complete"
40439    arguments="EOL"
40440    new_path=`$CYGPATH -u "$path"`
40441    new_path=`$WHICH "$new_path" 2> /dev/null`
40442    # bat and cmd files are not always considered executable in cygwin causing which
40443    # to not find them
40444    if test "x$new_path" = x \
40445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40447      new_path=`$CYGPATH -u "$path"`
40448    fi
40449    if test "x$new_path" = x; then
40450      # It's still not found. Now this is an unrecoverable error.
40451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40452$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40453      has_space=`$ECHO "$complete" | $GREP " "`
40454      if test "x$has_space" != x; then
40455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40457      fi
40458      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40459    fi
40460  fi
40461
40462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40465  # "foo.exe" is OK but "foo" is an error.
40466  #
40467  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40468  # It is also a way to make sure we got the proper file name for the real test later on.
40469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40470  if test "x$test_shortpath" = x; then
40471    # Short path failed, file does not exist as specified.
40472    # Try adding .exe or .cmd
40473    if test -f "${new_path}.exe"; then
40474      input_to_shortpath="${new_path}.exe"
40475    elif test -f "${new_path}.cmd"; then
40476      input_to_shortpath="${new_path}.cmd"
40477    else
40478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40479$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40480      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40481$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40482      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40483    fi
40484  else
40485    input_to_shortpath="$new_path"
40486  fi
40487
40488  # Call helper function which possibly converts this using DOS-style short mode.
40489  # If so, the updated path is stored in $new_path.
40490  new_path="$input_to_shortpath"
40491
40492  input_path="$input_to_shortpath"
40493  # Check if we need to convert this using DOS-style short mode. If the path
40494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40495  # take no chances and rewrite it.
40496  # Note: m4 eats our [], so we need to use [ and ] instead.
40497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40498  if test "x$has_forbidden_chars" != x; then
40499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40503      # Going to short mode and back again did indeed matter. Since short mode is
40504      # case insensitive, let's make it lowercase to improve readability.
40505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40506      # Now convert it back to Unix-style (cygpath)
40507      input_path=`$CYGPATH -u "$shortmode_path"`
40508      new_path="$input_path"
40509    fi
40510  fi
40511
40512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40513  if test "x$test_cygdrive_prefix" = x; then
40514    # As a simple fix, exclude /usr/bin since it's not a real path.
40515    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40517      # a path prefixed by /cygdrive for fixpath to work.
40518      new_path="$CYGWIN_ROOT_PATH$input_path"
40519    fi
40520  fi
40521
40522  # remove trailing .exe if any
40523  new_path="${new_path/%.exe/}"
40524
40525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40526
40527  # First separate the path from the arguments. This will split at the first
40528  # space.
40529  complete="$STRIP"
40530  path="${complete%% *}"
40531  tmp="$complete EOL"
40532  arguments="${tmp#* }"
40533
40534  # Input might be given as Windows format, start by converting to
40535  # unix format.
40536  new_path="$path"
40537
40538  windows_path="$new_path"
40539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40540    unix_path=`$CYGPATH -u "$windows_path"`
40541    new_path="$unix_path"
40542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40544    new_path="$unix_path"
40545  fi
40546
40547
40548  # Now try to locate executable using which
40549  new_path=`$WHICH "$new_path" 2> /dev/null`
40550
40551  if test "x$new_path" = x; then
40552    # Oops. Which didn't find the executable.
40553    # The splitting of arguments from the executable at a space might have been incorrect,
40554    # since paths with space are more likely in Windows. Give it another try with the whole
40555    # argument.
40556    path="$complete"
40557    arguments="EOL"
40558    new_path="$path"
40559
40560  windows_path="$new_path"
40561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40562    unix_path=`$CYGPATH -u "$windows_path"`
40563    new_path="$unix_path"
40564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40566    new_path="$unix_path"
40567  fi
40568
40569
40570    new_path=`$WHICH "$new_path" 2> /dev/null`
40571    # bat and cmd files are not always considered executable in MSYS causing which
40572    # to not find them
40573    if test "x$new_path" = x \
40574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40576      new_path="$path"
40577
40578  windows_path="$new_path"
40579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40580    unix_path=`$CYGPATH -u "$windows_path"`
40581    new_path="$unix_path"
40582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40584    new_path="$unix_path"
40585  fi
40586
40587    fi
40588
40589    if test "x$new_path" = x; then
40590      # It's still not found. Now this is an unrecoverable error.
40591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40592$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40593      has_space=`$ECHO "$complete" | $GREP " "`
40594      if test "x$has_space" != x; then
40595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40597      fi
40598      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40599    fi
40600  fi
40601
40602  # Now new_path has a complete unix path to the binary
40603  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40604    # Keep paths in /bin as-is, but remove trailing .exe if any
40605    new_path="${new_path/%.exe/}"
40606    # Do not save /bin paths to all_fixpath_prefixes!
40607  else
40608    # Not in mixed or Windows style, start by that.
40609    new_path=`cmd //c echo $new_path`
40610
40611  input_path="$new_path"
40612  # Check if we need to convert this using DOS-style short mode. If the path
40613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40614  # take no chances and rewrite it.
40615  # Note: m4 eats our [], so we need to use [ and ] instead.
40616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40617  if test "x$has_forbidden_chars" != x; then
40618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40620  fi
40621
40622    # Output is in $new_path
40623
40624  windows_path="$new_path"
40625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40626    unix_path=`$CYGPATH -u "$windows_path"`
40627    new_path="$unix_path"
40628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40630    new_path="$unix_path"
40631  fi
40632
40633    # remove trailing .exe if any
40634    new_path="${new_path/%.exe/}"
40635
40636    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40637    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40638  fi
40639
40640    else
40641      # We're on a unix platform. Hooray! :)
40642      # First separate the path from the arguments. This will split at the first
40643      # space.
40644      complete="$STRIP"
40645      path="${complete%% *}"
40646      tmp="$complete EOL"
40647      arguments="${tmp#* }"
40648
40649      # Cannot rely on the command "which" here since it doesn't always work.
40650      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40651      if test -z "$is_absolute_path"; then
40652        # Path to executable is not absolute. Find it.
40653        IFS_save="$IFS"
40654        IFS=:
40655        for p in $PATH; do
40656          if test -f "$p/$path" && test -x "$p/$path"; then
40657            new_path="$p/$path"
40658            break
40659          fi
40660        done
40661        IFS="$IFS_save"
40662      else
40663        # This is an absolute path, we can use it without further modifications.
40664        new_path="$path"
40665      fi
40666
40667      if test "x$new_path" = x; then
40668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40669$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40670        has_space=`$ECHO "$complete" | $GREP " "`
40671        if test "x$has_space" != x; then
40672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40674        fi
40675        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40676      fi
40677    fi
40678
40679    # Now join together the path and the arguments once again
40680    if test "x$arguments" != xEOL; then
40681      new_complete="$new_path ${arguments% *}"
40682    else
40683      new_complete="$new_path"
40684    fi
40685
40686    if test "x$complete" != "x$new_complete"; then
40687      STRIP="$new_complete"
40688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40689$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40690    fi
40691  fi
40692
40693
40694
40695  # Publish this variable in the help.
40696
40697
40698  if [ -z "${NM+x}" ]; then
40699    # The variable is not set by user, try to locate tool using the code snippet
40700    for ac_prog in nm
40701do
40702  # Extract the first word of "$ac_prog", so it can be a program name with args.
40703set dummy $ac_prog; ac_word=$2
40704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40705$as_echo_n "checking for $ac_word... " >&6; }
40706if ${ac_cv_path_NM+:} false; then :
40707  $as_echo_n "(cached) " >&6
40708else
40709  case $NM in
40710  [\\/]* | ?:[\\/]*)
40711  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40712  ;;
40713  *)
40714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40715for as_dir in $PATH
40716do
40717  IFS=$as_save_IFS
40718  test -z "$as_dir" && as_dir=.
40719    for ac_exec_ext in '' $ac_executable_extensions; do
40720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40721    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40723    break 2
40724  fi
40725done
40726  done
40727IFS=$as_save_IFS
40728
40729  ;;
40730esac
40731fi
40732NM=$ac_cv_path_NM
40733if test -n "$NM"; then
40734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40735$as_echo "$NM" >&6; }
40736else
40737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40738$as_echo "no" >&6; }
40739fi
40740
40741
40742  test -n "$NM" && break
40743done
40744
40745  else
40746    # The variable is set, but is it from the command line or the environment?
40747
40748    # Try to remove the string !NM! from our list.
40749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40751      # If it failed, the variable was not from the command line. Ignore it,
40752      # but warn the user (except for BASH, which is always set by the calling BASH).
40753      if test "xNM" != xBASH; then
40754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40755$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40756      fi
40757      # Try to locate tool using the code snippet
40758      for ac_prog in nm
40759do
40760  # Extract the first word of "$ac_prog", so it can be a program name with args.
40761set dummy $ac_prog; ac_word=$2
40762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40763$as_echo_n "checking for $ac_word... " >&6; }
40764if ${ac_cv_path_NM+:} false; then :
40765  $as_echo_n "(cached) " >&6
40766else
40767  case $NM in
40768  [\\/]* | ?:[\\/]*)
40769  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40770  ;;
40771  *)
40772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40773for as_dir in $PATH
40774do
40775  IFS=$as_save_IFS
40776  test -z "$as_dir" && as_dir=.
40777    for ac_exec_ext in '' $ac_executable_extensions; do
40778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40779    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40781    break 2
40782  fi
40783done
40784  done
40785IFS=$as_save_IFS
40786
40787  ;;
40788esac
40789fi
40790NM=$ac_cv_path_NM
40791if test -n "$NM"; then
40792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40793$as_echo "$NM" >&6; }
40794else
40795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40796$as_echo "no" >&6; }
40797fi
40798
40799
40800  test -n "$NM" && break
40801done
40802
40803    else
40804      # If it succeeded, then it was overridden by the user. We will use it
40805      # for the tool.
40806
40807      # First remove it from the list of overridden variables, so we can test
40808      # for unknown variables in the end.
40809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40810
40811      # Check if we try to supply an empty value
40812      if test "x$NM" = x; then
40813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40814$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40816$as_echo_n "checking for NM... " >&6; }
40817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40818$as_echo "disabled" >&6; }
40819      else
40820        # Check if the provided tool contains a complete path.
40821        tool_specified="$NM"
40822        tool_basename="${tool_specified##*/}"
40823        if test "x$tool_basename" = "x$tool_specified"; then
40824          # A command without a complete path is provided, search $PATH.
40825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40826$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40827          # Extract the first word of "$tool_basename", so it can be a program name with args.
40828set dummy $tool_basename; ac_word=$2
40829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40830$as_echo_n "checking for $ac_word... " >&6; }
40831if ${ac_cv_path_NM+:} false; then :
40832  $as_echo_n "(cached) " >&6
40833else
40834  case $NM in
40835  [\\/]* | ?:[\\/]*)
40836  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40837  ;;
40838  *)
40839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40840for as_dir in $PATH
40841do
40842  IFS=$as_save_IFS
40843  test -z "$as_dir" && as_dir=.
40844    for ac_exec_ext in '' $ac_executable_extensions; do
40845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40846    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40848    break 2
40849  fi
40850done
40851  done
40852IFS=$as_save_IFS
40853
40854  ;;
40855esac
40856fi
40857NM=$ac_cv_path_NM
40858if test -n "$NM"; then
40859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40860$as_echo "$NM" >&6; }
40861else
40862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40863$as_echo "no" >&6; }
40864fi
40865
40866
40867          if test "x$NM" = x; then
40868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40869          fi
40870        else
40871          # Otherwise we believe it is a complete path. Use it as it is.
40872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40873$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40875$as_echo_n "checking for NM... " >&6; }
40876          if test ! -x "$tool_specified"; then
40877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40878$as_echo "not found" >&6; }
40879            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40880          fi
40881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40882$as_echo "$tool_specified" >&6; }
40883        fi
40884      fi
40885    fi
40886
40887  fi
40888
40889
40890
40891  # Only process if variable expands to non-empty
40892
40893  if test "x$NM" != x; then
40894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895
40896  # First separate the path from the arguments. This will split at the first
40897  # space.
40898  complete="$NM"
40899  path="${complete%% *}"
40900  tmp="$complete EOL"
40901  arguments="${tmp#* }"
40902
40903  # Input might be given as Windows format, start by converting to
40904  # unix format.
40905  new_path=`$CYGPATH -u "$path"`
40906
40907  # Now try to locate executable using which
40908  new_path=`$WHICH "$new_path" 2> /dev/null`
40909  # bat and cmd files are not always considered executable in cygwin causing which
40910  # to not find them
40911  if test "x$new_path" = x \
40912      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40913      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40914    new_path=`$CYGPATH -u "$path"`
40915  fi
40916  if test "x$new_path" = x; then
40917    # Oops. Which didn't find the executable.
40918    # The splitting of arguments from the executable at a space might have been incorrect,
40919    # since paths with space are more likely in Windows. Give it another try with the whole
40920    # argument.
40921    path="$complete"
40922    arguments="EOL"
40923    new_path=`$CYGPATH -u "$path"`
40924    new_path=`$WHICH "$new_path" 2> /dev/null`
40925    # bat and cmd files are not always considered executable in cygwin causing which
40926    # to not find them
40927    if test "x$new_path" = x \
40928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40930      new_path=`$CYGPATH -u "$path"`
40931    fi
40932    if test "x$new_path" = x; then
40933      # It's still not found. Now this is an unrecoverable error.
40934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40935$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40936      has_space=`$ECHO "$complete" | $GREP " "`
40937      if test "x$has_space" != x; then
40938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40940      fi
40941      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40942    fi
40943  fi
40944
40945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40948  # "foo.exe" is OK but "foo" is an error.
40949  #
40950  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40951  # It is also a way to make sure we got the proper file name for the real test later on.
40952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40953  if test "x$test_shortpath" = x; then
40954    # Short path failed, file does not exist as specified.
40955    # Try adding .exe or .cmd
40956    if test -f "${new_path}.exe"; then
40957      input_to_shortpath="${new_path}.exe"
40958    elif test -f "${new_path}.cmd"; then
40959      input_to_shortpath="${new_path}.cmd"
40960    else
40961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40962$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40963      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40964$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40965      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40966    fi
40967  else
40968    input_to_shortpath="$new_path"
40969  fi
40970
40971  # Call helper function which possibly converts this using DOS-style short mode.
40972  # If so, the updated path is stored in $new_path.
40973  new_path="$input_to_shortpath"
40974
40975  input_path="$input_to_shortpath"
40976  # Check if we need to convert this using DOS-style short mode. If the path
40977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40978  # take no chances and rewrite it.
40979  # Note: m4 eats our [], so we need to use [ and ] instead.
40980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40981  if test "x$has_forbidden_chars" != x; then
40982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40986      # Going to short mode and back again did indeed matter. Since short mode is
40987      # case insensitive, let's make it lowercase to improve readability.
40988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40989      # Now convert it back to Unix-style (cygpath)
40990      input_path=`$CYGPATH -u "$shortmode_path"`
40991      new_path="$input_path"
40992    fi
40993  fi
40994
40995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40996  if test "x$test_cygdrive_prefix" = x; then
40997    # As a simple fix, exclude /usr/bin since it's not a real path.
40998    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41000      # a path prefixed by /cygdrive for fixpath to work.
41001      new_path="$CYGWIN_ROOT_PATH$input_path"
41002    fi
41003  fi
41004
41005  # remove trailing .exe if any
41006  new_path="${new_path/%.exe/}"
41007
41008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41009
41010  # First separate the path from the arguments. This will split at the first
41011  # space.
41012  complete="$NM"
41013  path="${complete%% *}"
41014  tmp="$complete EOL"
41015  arguments="${tmp#* }"
41016
41017  # Input might be given as Windows format, start by converting to
41018  # unix format.
41019  new_path="$path"
41020
41021  windows_path="$new_path"
41022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41023    unix_path=`$CYGPATH -u "$windows_path"`
41024    new_path="$unix_path"
41025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41027    new_path="$unix_path"
41028  fi
41029
41030
41031  # Now try to locate executable using which
41032  new_path=`$WHICH "$new_path" 2> /dev/null`
41033
41034  if test "x$new_path" = x; then
41035    # Oops. Which didn't find the executable.
41036    # The splitting of arguments from the executable at a space might have been incorrect,
41037    # since paths with space are more likely in Windows. Give it another try with the whole
41038    # argument.
41039    path="$complete"
41040    arguments="EOL"
41041    new_path="$path"
41042
41043  windows_path="$new_path"
41044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41045    unix_path=`$CYGPATH -u "$windows_path"`
41046    new_path="$unix_path"
41047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41049    new_path="$unix_path"
41050  fi
41051
41052
41053    new_path=`$WHICH "$new_path" 2> /dev/null`
41054    # bat and cmd files are not always considered executable in MSYS causing which
41055    # to not find them
41056    if test "x$new_path" = x \
41057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41059      new_path="$path"
41060
41061  windows_path="$new_path"
41062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41063    unix_path=`$CYGPATH -u "$windows_path"`
41064    new_path="$unix_path"
41065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41067    new_path="$unix_path"
41068  fi
41069
41070    fi
41071
41072    if test "x$new_path" = x; then
41073      # It's still not found. Now this is an unrecoverable error.
41074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41075$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41076      has_space=`$ECHO "$complete" | $GREP " "`
41077      if test "x$has_space" != x; then
41078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41080      fi
41081      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41082    fi
41083  fi
41084
41085  # Now new_path has a complete unix path to the binary
41086  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41087    # Keep paths in /bin as-is, but remove trailing .exe if any
41088    new_path="${new_path/%.exe/}"
41089    # Do not save /bin paths to all_fixpath_prefixes!
41090  else
41091    # Not in mixed or Windows style, start by that.
41092    new_path=`cmd //c echo $new_path`
41093
41094  input_path="$new_path"
41095  # Check if we need to convert this using DOS-style short mode. If the path
41096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41097  # take no chances and rewrite it.
41098  # Note: m4 eats our [], so we need to use [ and ] instead.
41099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41100  if test "x$has_forbidden_chars" != x; then
41101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41103  fi
41104
41105    # Output is in $new_path
41106
41107  windows_path="$new_path"
41108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41109    unix_path=`$CYGPATH -u "$windows_path"`
41110    new_path="$unix_path"
41111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41113    new_path="$unix_path"
41114  fi
41115
41116    # remove trailing .exe if any
41117    new_path="${new_path/%.exe/}"
41118
41119    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41120    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41121  fi
41122
41123    else
41124      # We're on a unix platform. Hooray! :)
41125      # First separate the path from the arguments. This will split at the first
41126      # space.
41127      complete="$NM"
41128      path="${complete%% *}"
41129      tmp="$complete EOL"
41130      arguments="${tmp#* }"
41131
41132      # Cannot rely on the command "which" here since it doesn't always work.
41133      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41134      if test -z "$is_absolute_path"; then
41135        # Path to executable is not absolute. Find it.
41136        IFS_save="$IFS"
41137        IFS=:
41138        for p in $PATH; do
41139          if test -f "$p/$path" && test -x "$p/$path"; then
41140            new_path="$p/$path"
41141            break
41142          fi
41143        done
41144        IFS="$IFS_save"
41145      else
41146        # This is an absolute path, we can use it without further modifications.
41147        new_path="$path"
41148      fi
41149
41150      if test "x$new_path" = x; then
41151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41152$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41153        has_space=`$ECHO "$complete" | $GREP " "`
41154        if test "x$has_space" != x; then
41155          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41156$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41157        fi
41158        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41159      fi
41160    fi
41161
41162    # Now join together the path and the arguments once again
41163    if test "x$arguments" != xEOL; then
41164      new_complete="$new_path ${arguments% *}"
41165    else
41166      new_complete="$new_path"
41167    fi
41168
41169    if test "x$complete" != "x$new_complete"; then
41170      NM="$new_complete"
41171      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41172$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41173    fi
41174  fi
41175
41176
41177
41178  # Publish this variable in the help.
41179
41180
41181  if [ -z "${GNM+x}" ]; then
41182    # The variable is not set by user, try to locate tool using the code snippet
41183    for ac_prog in gnm
41184do
41185  # Extract the first word of "$ac_prog", so it can be a program name with args.
41186set dummy $ac_prog; ac_word=$2
41187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41188$as_echo_n "checking for $ac_word... " >&6; }
41189if ${ac_cv_path_GNM+:} false; then :
41190  $as_echo_n "(cached) " >&6
41191else
41192  case $GNM in
41193  [\\/]* | ?:[\\/]*)
41194  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41195  ;;
41196  *)
41197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41198for as_dir in $PATH
41199do
41200  IFS=$as_save_IFS
41201  test -z "$as_dir" && as_dir=.
41202    for ac_exec_ext in '' $ac_executable_extensions; do
41203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41204    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41206    break 2
41207  fi
41208done
41209  done
41210IFS=$as_save_IFS
41211
41212  ;;
41213esac
41214fi
41215GNM=$ac_cv_path_GNM
41216if test -n "$GNM"; then
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41218$as_echo "$GNM" >&6; }
41219else
41220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41221$as_echo "no" >&6; }
41222fi
41223
41224
41225  test -n "$GNM" && break
41226done
41227
41228  else
41229    # The variable is set, but is it from the command line or the environment?
41230
41231    # Try to remove the string !GNM! from our list.
41232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41234      # If it failed, the variable was not from the command line. Ignore it,
41235      # but warn the user (except for BASH, which is always set by the calling BASH).
41236      if test "xGNM" != xBASH; then
41237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41238$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41239      fi
41240      # Try to locate tool using the code snippet
41241      for ac_prog in gnm
41242do
41243  # Extract the first word of "$ac_prog", so it can be a program name with args.
41244set dummy $ac_prog; ac_word=$2
41245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41246$as_echo_n "checking for $ac_word... " >&6; }
41247if ${ac_cv_path_GNM+:} false; then :
41248  $as_echo_n "(cached) " >&6
41249else
41250  case $GNM in
41251  [\\/]* | ?:[\\/]*)
41252  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41253  ;;
41254  *)
41255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41256for as_dir in $PATH
41257do
41258  IFS=$as_save_IFS
41259  test -z "$as_dir" && as_dir=.
41260    for ac_exec_ext in '' $ac_executable_extensions; do
41261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41262    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41264    break 2
41265  fi
41266done
41267  done
41268IFS=$as_save_IFS
41269
41270  ;;
41271esac
41272fi
41273GNM=$ac_cv_path_GNM
41274if test -n "$GNM"; then
41275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41276$as_echo "$GNM" >&6; }
41277else
41278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41279$as_echo "no" >&6; }
41280fi
41281
41282
41283  test -n "$GNM" && break
41284done
41285
41286    else
41287      # If it succeeded, then it was overridden by the user. We will use it
41288      # for the tool.
41289
41290      # First remove it from the list of overridden variables, so we can test
41291      # for unknown variables in the end.
41292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41293
41294      # Check if we try to supply an empty value
41295      if test "x$GNM" = x; then
41296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41297$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41299$as_echo_n "checking for GNM... " >&6; }
41300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41301$as_echo "disabled" >&6; }
41302      else
41303        # Check if the provided tool contains a complete path.
41304        tool_specified="$GNM"
41305        tool_basename="${tool_specified##*/}"
41306        if test "x$tool_basename" = "x$tool_specified"; then
41307          # A command without a complete path is provided, search $PATH.
41308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41309$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41310          # Extract the first word of "$tool_basename", so it can be a program name with args.
41311set dummy $tool_basename; ac_word=$2
41312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41313$as_echo_n "checking for $ac_word... " >&6; }
41314if ${ac_cv_path_GNM+:} false; then :
41315  $as_echo_n "(cached) " >&6
41316else
41317  case $GNM in
41318  [\\/]* | ?:[\\/]*)
41319  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41320  ;;
41321  *)
41322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41323for as_dir in $PATH
41324do
41325  IFS=$as_save_IFS
41326  test -z "$as_dir" && as_dir=.
41327    for ac_exec_ext in '' $ac_executable_extensions; do
41328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41329    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41331    break 2
41332  fi
41333done
41334  done
41335IFS=$as_save_IFS
41336
41337  ;;
41338esac
41339fi
41340GNM=$ac_cv_path_GNM
41341if test -n "$GNM"; then
41342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41343$as_echo "$GNM" >&6; }
41344else
41345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41346$as_echo "no" >&6; }
41347fi
41348
41349
41350          if test "x$GNM" = x; then
41351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41352          fi
41353        else
41354          # Otherwise we believe it is a complete path. Use it as it is.
41355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41356$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41358$as_echo_n "checking for GNM... " >&6; }
41359          if test ! -x "$tool_specified"; then
41360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41361$as_echo "not found" >&6; }
41362            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41363          fi
41364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41365$as_echo "$tool_specified" >&6; }
41366        fi
41367      fi
41368    fi
41369
41370  fi
41371
41372
41373
41374  # Only process if variable expands to non-empty
41375
41376  if test "x$GNM" != x; then
41377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41378
41379  # First separate the path from the arguments. This will split at the first
41380  # space.
41381  complete="$GNM"
41382  path="${complete%% *}"
41383  tmp="$complete EOL"
41384  arguments="${tmp#* }"
41385
41386  # Input might be given as Windows format, start by converting to
41387  # unix format.
41388  new_path=`$CYGPATH -u "$path"`
41389
41390  # Now try to locate executable using which
41391  new_path=`$WHICH "$new_path" 2> /dev/null`
41392  # bat and cmd files are not always considered executable in cygwin causing which
41393  # to not find them
41394  if test "x$new_path" = x \
41395      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41396      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41397    new_path=`$CYGPATH -u "$path"`
41398  fi
41399  if test "x$new_path" = x; then
41400    # Oops. Which didn't find the executable.
41401    # The splitting of arguments from the executable at a space might have been incorrect,
41402    # since paths with space are more likely in Windows. Give it another try with the whole
41403    # argument.
41404    path="$complete"
41405    arguments="EOL"
41406    new_path=`$CYGPATH -u "$path"`
41407    new_path=`$WHICH "$new_path" 2> /dev/null`
41408    # bat and cmd files are not always considered executable in cygwin causing which
41409    # to not find them
41410    if test "x$new_path" = x \
41411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41413      new_path=`$CYGPATH -u "$path"`
41414    fi
41415    if test "x$new_path" = x; then
41416      # It's still not found. Now this is an unrecoverable error.
41417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41418$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41419      has_space=`$ECHO "$complete" | $GREP " "`
41420      if test "x$has_space" != x; then
41421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41423      fi
41424      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41425    fi
41426  fi
41427
41428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41431  # "foo.exe" is OK but "foo" is an error.
41432  #
41433  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41434  # It is also a way to make sure we got the proper file name for the real test later on.
41435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41436  if test "x$test_shortpath" = x; then
41437    # Short path failed, file does not exist as specified.
41438    # Try adding .exe or .cmd
41439    if test -f "${new_path}.exe"; then
41440      input_to_shortpath="${new_path}.exe"
41441    elif test -f "${new_path}.cmd"; then
41442      input_to_shortpath="${new_path}.cmd"
41443    else
41444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41445$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41446      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41447$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41448      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41449    fi
41450  else
41451    input_to_shortpath="$new_path"
41452  fi
41453
41454  # Call helper function which possibly converts this using DOS-style short mode.
41455  # If so, the updated path is stored in $new_path.
41456  new_path="$input_to_shortpath"
41457
41458  input_path="$input_to_shortpath"
41459  # Check if we need to convert this using DOS-style short mode. If the path
41460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41461  # take no chances and rewrite it.
41462  # Note: m4 eats our [], so we need to use [ and ] instead.
41463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41464  if test "x$has_forbidden_chars" != x; then
41465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41469      # Going to short mode and back again did indeed matter. Since short mode is
41470      # case insensitive, let's make it lowercase to improve readability.
41471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41472      # Now convert it back to Unix-style (cygpath)
41473      input_path=`$CYGPATH -u "$shortmode_path"`
41474      new_path="$input_path"
41475    fi
41476  fi
41477
41478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41479  if test "x$test_cygdrive_prefix" = x; then
41480    # As a simple fix, exclude /usr/bin since it's not a real path.
41481    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41483      # a path prefixed by /cygdrive for fixpath to work.
41484      new_path="$CYGWIN_ROOT_PATH$input_path"
41485    fi
41486  fi
41487
41488  # remove trailing .exe if any
41489  new_path="${new_path/%.exe/}"
41490
41491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41492
41493  # First separate the path from the arguments. This will split at the first
41494  # space.
41495  complete="$GNM"
41496  path="${complete%% *}"
41497  tmp="$complete EOL"
41498  arguments="${tmp#* }"
41499
41500  # Input might be given as Windows format, start by converting to
41501  # unix format.
41502  new_path="$path"
41503
41504  windows_path="$new_path"
41505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41506    unix_path=`$CYGPATH -u "$windows_path"`
41507    new_path="$unix_path"
41508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41510    new_path="$unix_path"
41511  fi
41512
41513
41514  # Now try to locate executable using which
41515  new_path=`$WHICH "$new_path" 2> /dev/null`
41516
41517  if test "x$new_path" = x; then
41518    # Oops. Which didn't find the executable.
41519    # The splitting of arguments from the executable at a space might have been incorrect,
41520    # since paths with space are more likely in Windows. Give it another try with the whole
41521    # argument.
41522    path="$complete"
41523    arguments="EOL"
41524    new_path="$path"
41525
41526  windows_path="$new_path"
41527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41528    unix_path=`$CYGPATH -u "$windows_path"`
41529    new_path="$unix_path"
41530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41532    new_path="$unix_path"
41533  fi
41534
41535
41536    new_path=`$WHICH "$new_path" 2> /dev/null`
41537    # bat and cmd files are not always considered executable in MSYS causing which
41538    # to not find them
41539    if test "x$new_path" = x \
41540        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41541        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41542      new_path="$path"
41543
41544  windows_path="$new_path"
41545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41546    unix_path=`$CYGPATH -u "$windows_path"`
41547    new_path="$unix_path"
41548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41550    new_path="$unix_path"
41551  fi
41552
41553    fi
41554
41555    if test "x$new_path" = x; then
41556      # It's still not found. Now this is an unrecoverable error.
41557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41558$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41559      has_space=`$ECHO "$complete" | $GREP " "`
41560      if test "x$has_space" != x; then
41561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41563      fi
41564      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41565    fi
41566  fi
41567
41568  # Now new_path has a complete unix path to the binary
41569  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41570    # Keep paths in /bin as-is, but remove trailing .exe if any
41571    new_path="${new_path/%.exe/}"
41572    # Do not save /bin paths to all_fixpath_prefixes!
41573  else
41574    # Not in mixed or Windows style, start by that.
41575    new_path=`cmd //c echo $new_path`
41576
41577  input_path="$new_path"
41578  # Check if we need to convert this using DOS-style short mode. If the path
41579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41580  # take no chances and rewrite it.
41581  # Note: m4 eats our [], so we need to use [ and ] instead.
41582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41583  if test "x$has_forbidden_chars" != x; then
41584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41586  fi
41587
41588    # Output is in $new_path
41589
41590  windows_path="$new_path"
41591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41592    unix_path=`$CYGPATH -u "$windows_path"`
41593    new_path="$unix_path"
41594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41596    new_path="$unix_path"
41597  fi
41598
41599    # remove trailing .exe if any
41600    new_path="${new_path/%.exe/}"
41601
41602    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41603    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41604  fi
41605
41606    else
41607      # We're on a unix platform. Hooray! :)
41608      # First separate the path from the arguments. This will split at the first
41609      # space.
41610      complete="$GNM"
41611      path="${complete%% *}"
41612      tmp="$complete EOL"
41613      arguments="${tmp#* }"
41614
41615      # Cannot rely on the command "which" here since it doesn't always work.
41616      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41617      if test -z "$is_absolute_path"; then
41618        # Path to executable is not absolute. Find it.
41619        IFS_save="$IFS"
41620        IFS=:
41621        for p in $PATH; do
41622          if test -f "$p/$path" && test -x "$p/$path"; then
41623            new_path="$p/$path"
41624            break
41625          fi
41626        done
41627        IFS="$IFS_save"
41628      else
41629        # This is an absolute path, we can use it without further modifications.
41630        new_path="$path"
41631      fi
41632
41633      if test "x$new_path" = x; then
41634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41635$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41636        has_space=`$ECHO "$complete" | $GREP " "`
41637        if test "x$has_space" != x; then
41638          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41639$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41640        fi
41641        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41642      fi
41643    fi
41644
41645    # Now join together the path and the arguments once again
41646    if test "x$arguments" != xEOL; then
41647      new_complete="$new_path ${arguments% *}"
41648    else
41649      new_complete="$new_path"
41650    fi
41651
41652    if test "x$complete" != "x$new_complete"; then
41653      GNM="$new_complete"
41654      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41655$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41656    fi
41657  fi
41658
41659  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41660    # FIXME: we should unify this with the solaris case above.
41661
41662
41663  # Publish this variable in the help.
41664
41665
41666  if [ -z "${STRIP+x}" ]; then
41667    # The variable is not set by user, try to locate tool using the code snippet
41668    if test -n "$ac_tool_prefix"; then
41669  for ac_prog in strip
41670  do
41671    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41672set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41674$as_echo_n "checking for $ac_word... " >&6; }
41675if ${ac_cv_prog_STRIP+:} false; then :
41676  $as_echo_n "(cached) " >&6
41677else
41678  if test -n "$STRIP"; then
41679  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41680else
41681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41682for as_dir in $PATH
41683do
41684  IFS=$as_save_IFS
41685  test -z "$as_dir" && as_dir=.
41686    for ac_exec_ext in '' $ac_executable_extensions; do
41687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41688    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41690    break 2
41691  fi
41692done
41693  done
41694IFS=$as_save_IFS
41695
41696fi
41697fi
41698STRIP=$ac_cv_prog_STRIP
41699if test -n "$STRIP"; then
41700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41701$as_echo "$STRIP" >&6; }
41702else
41703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41704$as_echo "no" >&6; }
41705fi
41706
41707
41708    test -n "$STRIP" && break
41709  done
41710fi
41711if test -z "$STRIP"; then
41712  ac_ct_STRIP=$STRIP
41713  for ac_prog in strip
41714do
41715  # Extract the first word of "$ac_prog", so it can be a program name with args.
41716set dummy $ac_prog; ac_word=$2
41717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41718$as_echo_n "checking for $ac_word... " >&6; }
41719if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41720  $as_echo_n "(cached) " >&6
41721else
41722  if test -n "$ac_ct_STRIP"; then
41723  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41724else
41725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41726for as_dir in $PATH
41727do
41728  IFS=$as_save_IFS
41729  test -z "$as_dir" && as_dir=.
41730    for ac_exec_ext in '' $ac_executable_extensions; do
41731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41732    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41734    break 2
41735  fi
41736done
41737  done
41738IFS=$as_save_IFS
41739
41740fi
41741fi
41742ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41743if test -n "$ac_ct_STRIP"; then
41744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41745$as_echo "$ac_ct_STRIP" >&6; }
41746else
41747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41748$as_echo "no" >&6; }
41749fi
41750
41751
41752  test -n "$ac_ct_STRIP" && break
41753done
41754
41755  if test "x$ac_ct_STRIP" = x; then
41756    STRIP=""
41757  else
41758    case $cross_compiling:$ac_tool_warned in
41759yes:)
41760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41762ac_tool_warned=yes ;;
41763esac
41764    STRIP=$ac_ct_STRIP
41765  fi
41766fi
41767
41768  else
41769    # The variable is set, but is it from the command line or the environment?
41770
41771    # Try to remove the string !STRIP! from our list.
41772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41774      # If it failed, the variable was not from the command line. Ignore it,
41775      # but warn the user (except for BASH, which is always set by the calling BASH).
41776      if test "xSTRIP" != xBASH; then
41777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41778$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41779      fi
41780      # Try to locate tool using the code snippet
41781      if test -n "$ac_tool_prefix"; then
41782  for ac_prog in strip
41783  do
41784    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41787$as_echo_n "checking for $ac_word... " >&6; }
41788if ${ac_cv_prog_STRIP+:} false; then :
41789  $as_echo_n "(cached) " >&6
41790else
41791  if test -n "$STRIP"; then
41792  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41793else
41794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41795for as_dir in $PATH
41796do
41797  IFS=$as_save_IFS
41798  test -z "$as_dir" && as_dir=.
41799    for ac_exec_ext in '' $ac_executable_extensions; do
41800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41801    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41803    break 2
41804  fi
41805done
41806  done
41807IFS=$as_save_IFS
41808
41809fi
41810fi
41811STRIP=$ac_cv_prog_STRIP
41812if test -n "$STRIP"; then
41813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41814$as_echo "$STRIP" >&6; }
41815else
41816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41817$as_echo "no" >&6; }
41818fi
41819
41820
41821    test -n "$STRIP" && break
41822  done
41823fi
41824if test -z "$STRIP"; then
41825  ac_ct_STRIP=$STRIP
41826  for ac_prog in strip
41827do
41828  # Extract the first word of "$ac_prog", so it can be a program name with args.
41829set dummy $ac_prog; ac_word=$2
41830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41831$as_echo_n "checking for $ac_word... " >&6; }
41832if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41833  $as_echo_n "(cached) " >&6
41834else
41835  if test -n "$ac_ct_STRIP"; then
41836  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41837else
41838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41839for as_dir in $PATH
41840do
41841  IFS=$as_save_IFS
41842  test -z "$as_dir" && as_dir=.
41843    for ac_exec_ext in '' $ac_executable_extensions; do
41844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41845    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41847    break 2
41848  fi
41849done
41850  done
41851IFS=$as_save_IFS
41852
41853fi
41854fi
41855ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41856if test -n "$ac_ct_STRIP"; then
41857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41858$as_echo "$ac_ct_STRIP" >&6; }
41859else
41860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41861$as_echo "no" >&6; }
41862fi
41863
41864
41865  test -n "$ac_ct_STRIP" && break
41866done
41867
41868  if test "x$ac_ct_STRIP" = x; then
41869    STRIP=""
41870  else
41871    case $cross_compiling:$ac_tool_warned in
41872yes:)
41873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41875ac_tool_warned=yes ;;
41876esac
41877    STRIP=$ac_ct_STRIP
41878  fi
41879fi
41880
41881    else
41882      # If it succeeded, then it was overridden by the user. We will use it
41883      # for the tool.
41884
41885      # First remove it from the list of overridden variables, so we can test
41886      # for unknown variables in the end.
41887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41888
41889      # Check if we try to supply an empty value
41890      if test "x$STRIP" = x; then
41891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41892$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41894$as_echo_n "checking for STRIP... " >&6; }
41895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41896$as_echo "disabled" >&6; }
41897      else
41898        # Check if the provided tool contains a complete path.
41899        tool_specified="$STRIP"
41900        tool_basename="${tool_specified##*/}"
41901        if test "x$tool_basename" = "x$tool_specified"; then
41902          # A command without a complete path is provided, search $PATH.
41903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41904$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41905          # Extract the first word of "$tool_basename", so it can be a program name with args.
41906set dummy $tool_basename; ac_word=$2
41907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41908$as_echo_n "checking for $ac_word... " >&6; }
41909if ${ac_cv_path_STRIP+:} false; then :
41910  $as_echo_n "(cached) " >&6
41911else
41912  case $STRIP in
41913  [\\/]* | ?:[\\/]*)
41914  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41915  ;;
41916  *)
41917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41918for as_dir in $PATH
41919do
41920  IFS=$as_save_IFS
41921  test -z "$as_dir" && as_dir=.
41922    for ac_exec_ext in '' $ac_executable_extensions; do
41923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41924    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41926    break 2
41927  fi
41928done
41929  done
41930IFS=$as_save_IFS
41931
41932  ;;
41933esac
41934fi
41935STRIP=$ac_cv_path_STRIP
41936if test -n "$STRIP"; then
41937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41938$as_echo "$STRIP" >&6; }
41939else
41940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41941$as_echo "no" >&6; }
41942fi
41943
41944
41945          if test "x$STRIP" = x; then
41946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41947          fi
41948        else
41949          # Otherwise we believe it is a complete path. Use it as it is.
41950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41951$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41953$as_echo_n "checking for STRIP... " >&6; }
41954          if test ! -x "$tool_specified"; then
41955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41956$as_echo "not found" >&6; }
41957            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41958          fi
41959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41960$as_echo "$tool_specified" >&6; }
41961        fi
41962      fi
41963    fi
41964
41965  fi
41966
41967
41968
41969  # Only process if variable expands to non-empty
41970
41971  if test "x$STRIP" != x; then
41972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41973
41974  # First separate the path from the arguments. This will split at the first
41975  # space.
41976  complete="$STRIP"
41977  path="${complete%% *}"
41978  tmp="$complete EOL"
41979  arguments="${tmp#* }"
41980
41981  # Input might be given as Windows format, start by converting to
41982  # unix format.
41983  new_path=`$CYGPATH -u "$path"`
41984
41985  # Now try to locate executable using which
41986  new_path=`$WHICH "$new_path" 2> /dev/null`
41987  # bat and cmd files are not always considered executable in cygwin causing which
41988  # to not find them
41989  if test "x$new_path" = x \
41990      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41991      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41992    new_path=`$CYGPATH -u "$path"`
41993  fi
41994  if test "x$new_path" = x; then
41995    # Oops. Which didn't find the executable.
41996    # The splitting of arguments from the executable at a space might have been incorrect,
41997    # since paths with space are more likely in Windows. Give it another try with the whole
41998    # argument.
41999    path="$complete"
42000    arguments="EOL"
42001    new_path=`$CYGPATH -u "$path"`
42002    new_path=`$WHICH "$new_path" 2> /dev/null`
42003    # bat and cmd files are not always considered executable in cygwin causing which
42004    # to not find them
42005    if test "x$new_path" = x \
42006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42008      new_path=`$CYGPATH -u "$path"`
42009    fi
42010    if test "x$new_path" = x; then
42011      # It's still not found. Now this is an unrecoverable error.
42012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42013$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42014      has_space=`$ECHO "$complete" | $GREP " "`
42015      if test "x$has_space" != x; then
42016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42018      fi
42019      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42020    fi
42021  fi
42022
42023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42026  # "foo.exe" is OK but "foo" is an error.
42027  #
42028  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42029  # It is also a way to make sure we got the proper file name for the real test later on.
42030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42031  if test "x$test_shortpath" = x; then
42032    # Short path failed, file does not exist as specified.
42033    # Try adding .exe or .cmd
42034    if test -f "${new_path}.exe"; then
42035      input_to_shortpath="${new_path}.exe"
42036    elif test -f "${new_path}.cmd"; then
42037      input_to_shortpath="${new_path}.cmd"
42038    else
42039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42040$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42041      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42042$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42043      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42044    fi
42045  else
42046    input_to_shortpath="$new_path"
42047  fi
42048
42049  # Call helper function which possibly converts this using DOS-style short mode.
42050  # If so, the updated path is stored in $new_path.
42051  new_path="$input_to_shortpath"
42052
42053  input_path="$input_to_shortpath"
42054  # Check if we need to convert this using DOS-style short mode. If the path
42055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42056  # take no chances and rewrite it.
42057  # Note: m4 eats our [], so we need to use [ and ] instead.
42058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42059  if test "x$has_forbidden_chars" != x; then
42060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42064      # Going to short mode and back again did indeed matter. Since short mode is
42065      # case insensitive, let's make it lowercase to improve readability.
42066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42067      # Now convert it back to Unix-style (cygpath)
42068      input_path=`$CYGPATH -u "$shortmode_path"`
42069      new_path="$input_path"
42070    fi
42071  fi
42072
42073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42074  if test "x$test_cygdrive_prefix" = x; then
42075    # As a simple fix, exclude /usr/bin since it's not a real path.
42076    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42078      # a path prefixed by /cygdrive for fixpath to work.
42079      new_path="$CYGWIN_ROOT_PATH$input_path"
42080    fi
42081  fi
42082
42083  # remove trailing .exe if any
42084  new_path="${new_path/%.exe/}"
42085
42086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42087
42088  # First separate the path from the arguments. This will split at the first
42089  # space.
42090  complete="$STRIP"
42091  path="${complete%% *}"
42092  tmp="$complete EOL"
42093  arguments="${tmp#* }"
42094
42095  # Input might be given as Windows format, start by converting to
42096  # unix format.
42097  new_path="$path"
42098
42099  windows_path="$new_path"
42100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42101    unix_path=`$CYGPATH -u "$windows_path"`
42102    new_path="$unix_path"
42103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42105    new_path="$unix_path"
42106  fi
42107
42108
42109  # Now try to locate executable using which
42110  new_path=`$WHICH "$new_path" 2> /dev/null`
42111
42112  if test "x$new_path" = x; then
42113    # Oops. Which didn't find the executable.
42114    # The splitting of arguments from the executable at a space might have been incorrect,
42115    # since paths with space are more likely in Windows. Give it another try with the whole
42116    # argument.
42117    path="$complete"
42118    arguments="EOL"
42119    new_path="$path"
42120
42121  windows_path="$new_path"
42122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42123    unix_path=`$CYGPATH -u "$windows_path"`
42124    new_path="$unix_path"
42125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42127    new_path="$unix_path"
42128  fi
42129
42130
42131    new_path=`$WHICH "$new_path" 2> /dev/null`
42132    # bat and cmd files are not always considered executable in MSYS causing which
42133    # to not find them
42134    if test "x$new_path" = x \
42135        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42136        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42137      new_path="$path"
42138
42139  windows_path="$new_path"
42140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42141    unix_path=`$CYGPATH -u "$windows_path"`
42142    new_path="$unix_path"
42143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42145    new_path="$unix_path"
42146  fi
42147
42148    fi
42149
42150    if test "x$new_path" = x; then
42151      # It's still not found. Now this is an unrecoverable error.
42152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42153$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42154      has_space=`$ECHO "$complete" | $GREP " "`
42155      if test "x$has_space" != x; then
42156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42158      fi
42159      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42160    fi
42161  fi
42162
42163  # Now new_path has a complete unix path to the binary
42164  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42165    # Keep paths in /bin as-is, but remove trailing .exe if any
42166    new_path="${new_path/%.exe/}"
42167    # Do not save /bin paths to all_fixpath_prefixes!
42168  else
42169    # Not in mixed or Windows style, start by that.
42170    new_path=`cmd //c echo $new_path`
42171
42172  input_path="$new_path"
42173  # Check if we need to convert this using DOS-style short mode. If the path
42174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42175  # take no chances and rewrite it.
42176  # Note: m4 eats our [], so we need to use [ and ] instead.
42177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42178  if test "x$has_forbidden_chars" != x; then
42179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42181  fi
42182
42183    # Output is in $new_path
42184
42185  windows_path="$new_path"
42186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42187    unix_path=`$CYGPATH -u "$windows_path"`
42188    new_path="$unix_path"
42189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42191    new_path="$unix_path"
42192  fi
42193
42194    # remove trailing .exe if any
42195    new_path="${new_path/%.exe/}"
42196
42197    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42198    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42199  fi
42200
42201    else
42202      # We're on a unix platform. Hooray! :)
42203      # First separate the path from the arguments. This will split at the first
42204      # space.
42205      complete="$STRIP"
42206      path="${complete%% *}"
42207      tmp="$complete EOL"
42208      arguments="${tmp#* }"
42209
42210      # Cannot rely on the command "which" here since it doesn't always work.
42211      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42212      if test -z "$is_absolute_path"; then
42213        # Path to executable is not absolute. Find it.
42214        IFS_save="$IFS"
42215        IFS=:
42216        for p in $PATH; do
42217          if test -f "$p/$path" && test -x "$p/$path"; then
42218            new_path="$p/$path"
42219            break
42220          fi
42221        done
42222        IFS="$IFS_save"
42223      else
42224        # This is an absolute path, we can use it without further modifications.
42225        new_path="$path"
42226      fi
42227
42228      if test "x$new_path" = x; then
42229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42230$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42231        has_space=`$ECHO "$complete" | $GREP " "`
42232        if test "x$has_space" != x; then
42233          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42234$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42235        fi
42236        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42237      fi
42238    fi
42239
42240    # Now join together the path and the arguments once again
42241    if test "x$arguments" != xEOL; then
42242      new_complete="$new_path ${arguments% *}"
42243    else
42244      new_complete="$new_path"
42245    fi
42246
42247    if test "x$complete" != "x$new_complete"; then
42248      STRIP="$new_complete"
42249      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42250$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42251    fi
42252  fi
42253
42254    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42255
42256
42257  # Publish this variable in the help.
42258
42259
42260  if [ -z "${NM+x}" ]; then
42261    # The variable is not set by user, try to locate tool using the code snippet
42262    if test -n "$ac_tool_prefix"; then
42263  for ac_prog in nm gcc-nm
42264  do
42265    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42266set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42268$as_echo_n "checking for $ac_word... " >&6; }
42269if ${ac_cv_prog_NM+:} false; then :
42270  $as_echo_n "(cached) " >&6
42271else
42272  if test -n "$NM"; then
42273  ac_cv_prog_NM="$NM" # Let the user override the test.
42274else
42275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42276for as_dir in $PATH
42277do
42278  IFS=$as_save_IFS
42279  test -z "$as_dir" && as_dir=.
42280    for ac_exec_ext in '' $ac_executable_extensions; do
42281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42282    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42284    break 2
42285  fi
42286done
42287  done
42288IFS=$as_save_IFS
42289
42290fi
42291fi
42292NM=$ac_cv_prog_NM
42293if test -n "$NM"; then
42294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42295$as_echo "$NM" >&6; }
42296else
42297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42298$as_echo "no" >&6; }
42299fi
42300
42301
42302    test -n "$NM" && break
42303  done
42304fi
42305if test -z "$NM"; then
42306  ac_ct_NM=$NM
42307  for ac_prog in nm gcc-nm
42308do
42309  # Extract the first word of "$ac_prog", so it can be a program name with args.
42310set dummy $ac_prog; ac_word=$2
42311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42312$as_echo_n "checking for $ac_word... " >&6; }
42313if ${ac_cv_prog_ac_ct_NM+:} false; then :
42314  $as_echo_n "(cached) " >&6
42315else
42316  if test -n "$ac_ct_NM"; then
42317  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42318else
42319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42320for as_dir in $PATH
42321do
42322  IFS=$as_save_IFS
42323  test -z "$as_dir" && as_dir=.
42324    for ac_exec_ext in '' $ac_executable_extensions; do
42325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42326    ac_cv_prog_ac_ct_NM="$ac_prog"
42327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42328    break 2
42329  fi
42330done
42331  done
42332IFS=$as_save_IFS
42333
42334fi
42335fi
42336ac_ct_NM=$ac_cv_prog_ac_ct_NM
42337if test -n "$ac_ct_NM"; then
42338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42339$as_echo "$ac_ct_NM" >&6; }
42340else
42341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42342$as_echo "no" >&6; }
42343fi
42344
42345
42346  test -n "$ac_ct_NM" && break
42347done
42348
42349  if test "x$ac_ct_NM" = x; then
42350    NM=""
42351  else
42352    case $cross_compiling:$ac_tool_warned in
42353yes:)
42354{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42355$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42356ac_tool_warned=yes ;;
42357esac
42358    NM=$ac_ct_NM
42359  fi
42360fi
42361
42362  else
42363    # The variable is set, but is it from the command line or the environment?
42364
42365    # Try to remove the string !NM! from our list.
42366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42368      # If it failed, the variable was not from the command line. Ignore it,
42369      # but warn the user (except for BASH, which is always set by the calling BASH).
42370      if test "xNM" != xBASH; then
42371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42372$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42373      fi
42374      # Try to locate tool using the code snippet
42375      if test -n "$ac_tool_prefix"; then
42376  for ac_prog in nm gcc-nm
42377  do
42378    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42379set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42381$as_echo_n "checking for $ac_word... " >&6; }
42382if ${ac_cv_prog_NM+:} false; then :
42383  $as_echo_n "(cached) " >&6
42384else
42385  if test -n "$NM"; then
42386  ac_cv_prog_NM="$NM" # Let the user override the test.
42387else
42388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42389for as_dir in $PATH
42390do
42391  IFS=$as_save_IFS
42392  test -z "$as_dir" && as_dir=.
42393    for ac_exec_ext in '' $ac_executable_extensions; do
42394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42395    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42397    break 2
42398  fi
42399done
42400  done
42401IFS=$as_save_IFS
42402
42403fi
42404fi
42405NM=$ac_cv_prog_NM
42406if test -n "$NM"; then
42407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42408$as_echo "$NM" >&6; }
42409else
42410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42411$as_echo "no" >&6; }
42412fi
42413
42414
42415    test -n "$NM" && break
42416  done
42417fi
42418if test -z "$NM"; then
42419  ac_ct_NM=$NM
42420  for ac_prog in nm gcc-nm
42421do
42422  # Extract the first word of "$ac_prog", so it can be a program name with args.
42423set dummy $ac_prog; ac_word=$2
42424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42425$as_echo_n "checking for $ac_word... " >&6; }
42426if ${ac_cv_prog_ac_ct_NM+:} false; then :
42427  $as_echo_n "(cached) " >&6
42428else
42429  if test -n "$ac_ct_NM"; then
42430  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42431else
42432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42433for as_dir in $PATH
42434do
42435  IFS=$as_save_IFS
42436  test -z "$as_dir" && as_dir=.
42437    for ac_exec_ext in '' $ac_executable_extensions; do
42438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42439    ac_cv_prog_ac_ct_NM="$ac_prog"
42440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42441    break 2
42442  fi
42443done
42444  done
42445IFS=$as_save_IFS
42446
42447fi
42448fi
42449ac_ct_NM=$ac_cv_prog_ac_ct_NM
42450if test -n "$ac_ct_NM"; then
42451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42452$as_echo "$ac_ct_NM" >&6; }
42453else
42454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42455$as_echo "no" >&6; }
42456fi
42457
42458
42459  test -n "$ac_ct_NM" && break
42460done
42461
42462  if test "x$ac_ct_NM" = x; then
42463    NM=""
42464  else
42465    case $cross_compiling:$ac_tool_warned in
42466yes:)
42467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42469ac_tool_warned=yes ;;
42470esac
42471    NM=$ac_ct_NM
42472  fi
42473fi
42474
42475    else
42476      # If it succeeded, then it was overridden by the user. We will use it
42477      # for the tool.
42478
42479      # First remove it from the list of overridden variables, so we can test
42480      # for unknown variables in the end.
42481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42482
42483      # Check if we try to supply an empty value
42484      if test "x$NM" = x; then
42485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42486$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42488$as_echo_n "checking for NM... " >&6; }
42489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42490$as_echo "disabled" >&6; }
42491      else
42492        # Check if the provided tool contains a complete path.
42493        tool_specified="$NM"
42494        tool_basename="${tool_specified##*/}"
42495        if test "x$tool_basename" = "x$tool_specified"; then
42496          # A command without a complete path is provided, search $PATH.
42497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42498$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42499          # Extract the first word of "$tool_basename", so it can be a program name with args.
42500set dummy $tool_basename; ac_word=$2
42501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42502$as_echo_n "checking for $ac_word... " >&6; }
42503if ${ac_cv_path_NM+:} false; then :
42504  $as_echo_n "(cached) " >&6
42505else
42506  case $NM in
42507  [\\/]* | ?:[\\/]*)
42508  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42509  ;;
42510  *)
42511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42512for as_dir in $PATH
42513do
42514  IFS=$as_save_IFS
42515  test -z "$as_dir" && as_dir=.
42516    for ac_exec_ext in '' $ac_executable_extensions; do
42517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42518    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42520    break 2
42521  fi
42522done
42523  done
42524IFS=$as_save_IFS
42525
42526  ;;
42527esac
42528fi
42529NM=$ac_cv_path_NM
42530if test -n "$NM"; then
42531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42532$as_echo "$NM" >&6; }
42533else
42534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42535$as_echo "no" >&6; }
42536fi
42537
42538
42539          if test "x$NM" = x; then
42540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42541          fi
42542        else
42543          # Otherwise we believe it is a complete path. Use it as it is.
42544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42545$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42547$as_echo_n "checking for NM... " >&6; }
42548          if test ! -x "$tool_specified"; then
42549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42550$as_echo "not found" >&6; }
42551            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42552          fi
42553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42554$as_echo "$tool_specified" >&6; }
42555        fi
42556      fi
42557    fi
42558
42559  fi
42560
42561
42562    else
42563
42564
42565  # Publish this variable in the help.
42566
42567
42568  if [ -z "${NM+x}" ]; then
42569    # The variable is not set by user, try to locate tool using the code snippet
42570    if test -n "$ac_tool_prefix"; then
42571  for ac_prog in nm
42572  do
42573    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42574set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42576$as_echo_n "checking for $ac_word... " >&6; }
42577if ${ac_cv_prog_NM+:} false; then :
42578  $as_echo_n "(cached) " >&6
42579else
42580  if test -n "$NM"; then
42581  ac_cv_prog_NM="$NM" # Let the user override the test.
42582else
42583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42584for as_dir in $PATH
42585do
42586  IFS=$as_save_IFS
42587  test -z "$as_dir" && as_dir=.
42588    for ac_exec_ext in '' $ac_executable_extensions; do
42589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42590    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42592    break 2
42593  fi
42594done
42595  done
42596IFS=$as_save_IFS
42597
42598fi
42599fi
42600NM=$ac_cv_prog_NM
42601if test -n "$NM"; then
42602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42603$as_echo "$NM" >&6; }
42604else
42605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42606$as_echo "no" >&6; }
42607fi
42608
42609
42610    test -n "$NM" && break
42611  done
42612fi
42613if test -z "$NM"; then
42614  ac_ct_NM=$NM
42615  for ac_prog in nm
42616do
42617  # Extract the first word of "$ac_prog", so it can be a program name with args.
42618set dummy $ac_prog; ac_word=$2
42619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42620$as_echo_n "checking for $ac_word... " >&6; }
42621if ${ac_cv_prog_ac_ct_NM+:} false; then :
42622  $as_echo_n "(cached) " >&6
42623else
42624  if test -n "$ac_ct_NM"; then
42625  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42626else
42627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42628for as_dir in $PATH
42629do
42630  IFS=$as_save_IFS
42631  test -z "$as_dir" && as_dir=.
42632    for ac_exec_ext in '' $ac_executable_extensions; do
42633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42634    ac_cv_prog_ac_ct_NM="$ac_prog"
42635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42636    break 2
42637  fi
42638done
42639  done
42640IFS=$as_save_IFS
42641
42642fi
42643fi
42644ac_ct_NM=$ac_cv_prog_ac_ct_NM
42645if test -n "$ac_ct_NM"; then
42646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42647$as_echo "$ac_ct_NM" >&6; }
42648else
42649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42650$as_echo "no" >&6; }
42651fi
42652
42653
42654  test -n "$ac_ct_NM" && break
42655done
42656
42657  if test "x$ac_ct_NM" = x; then
42658    NM=""
42659  else
42660    case $cross_compiling:$ac_tool_warned in
42661yes:)
42662{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42663$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42664ac_tool_warned=yes ;;
42665esac
42666    NM=$ac_ct_NM
42667  fi
42668fi
42669
42670  else
42671    # The variable is set, but is it from the command line or the environment?
42672
42673    # Try to remove the string !NM! from our list.
42674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42676      # If it failed, the variable was not from the command line. Ignore it,
42677      # but warn the user (except for BASH, which is always set by the calling BASH).
42678      if test "xNM" != xBASH; then
42679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42680$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42681      fi
42682      # Try to locate tool using the code snippet
42683      if test -n "$ac_tool_prefix"; then
42684  for ac_prog in nm
42685  do
42686    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42689$as_echo_n "checking for $ac_word... " >&6; }
42690if ${ac_cv_prog_NM+:} false; then :
42691  $as_echo_n "(cached) " >&6
42692else
42693  if test -n "$NM"; then
42694  ac_cv_prog_NM="$NM" # Let the user override the test.
42695else
42696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42697for as_dir in $PATH
42698do
42699  IFS=$as_save_IFS
42700  test -z "$as_dir" && as_dir=.
42701    for ac_exec_ext in '' $ac_executable_extensions; do
42702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42703    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42705    break 2
42706  fi
42707done
42708  done
42709IFS=$as_save_IFS
42710
42711fi
42712fi
42713NM=$ac_cv_prog_NM
42714if test -n "$NM"; then
42715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42716$as_echo "$NM" >&6; }
42717else
42718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42719$as_echo "no" >&6; }
42720fi
42721
42722
42723    test -n "$NM" && break
42724  done
42725fi
42726if test -z "$NM"; then
42727  ac_ct_NM=$NM
42728  for ac_prog in nm
42729do
42730  # Extract the first word of "$ac_prog", so it can be a program name with args.
42731set dummy $ac_prog; ac_word=$2
42732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42733$as_echo_n "checking for $ac_word... " >&6; }
42734if ${ac_cv_prog_ac_ct_NM+:} false; then :
42735  $as_echo_n "(cached) " >&6
42736else
42737  if test -n "$ac_ct_NM"; then
42738  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42739else
42740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42741for as_dir in $PATH
42742do
42743  IFS=$as_save_IFS
42744  test -z "$as_dir" && as_dir=.
42745    for ac_exec_ext in '' $ac_executable_extensions; do
42746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42747    ac_cv_prog_ac_ct_NM="$ac_prog"
42748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42749    break 2
42750  fi
42751done
42752  done
42753IFS=$as_save_IFS
42754
42755fi
42756fi
42757ac_ct_NM=$ac_cv_prog_ac_ct_NM
42758if test -n "$ac_ct_NM"; then
42759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42760$as_echo "$ac_ct_NM" >&6; }
42761else
42762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42763$as_echo "no" >&6; }
42764fi
42765
42766
42767  test -n "$ac_ct_NM" && break
42768done
42769
42770  if test "x$ac_ct_NM" = x; then
42771    NM=""
42772  else
42773    case $cross_compiling:$ac_tool_warned in
42774yes:)
42775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42777ac_tool_warned=yes ;;
42778esac
42779    NM=$ac_ct_NM
42780  fi
42781fi
42782
42783    else
42784      # If it succeeded, then it was overridden by the user. We will use it
42785      # for the tool.
42786
42787      # First remove it from the list of overridden variables, so we can test
42788      # for unknown variables in the end.
42789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42790
42791      # Check if we try to supply an empty value
42792      if test "x$NM" = x; then
42793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42794$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42796$as_echo_n "checking for NM... " >&6; }
42797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42798$as_echo "disabled" >&6; }
42799      else
42800        # Check if the provided tool contains a complete path.
42801        tool_specified="$NM"
42802        tool_basename="${tool_specified##*/}"
42803        if test "x$tool_basename" = "x$tool_specified"; then
42804          # A command without a complete path is provided, search $PATH.
42805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42806$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42807          # Extract the first word of "$tool_basename", so it can be a program name with args.
42808set dummy $tool_basename; ac_word=$2
42809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42810$as_echo_n "checking for $ac_word... " >&6; }
42811if ${ac_cv_path_NM+:} false; then :
42812  $as_echo_n "(cached) " >&6
42813else
42814  case $NM in
42815  [\\/]* | ?:[\\/]*)
42816  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42817  ;;
42818  *)
42819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42820for as_dir in $PATH
42821do
42822  IFS=$as_save_IFS
42823  test -z "$as_dir" && as_dir=.
42824    for ac_exec_ext in '' $ac_executable_extensions; do
42825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42826    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42828    break 2
42829  fi
42830done
42831  done
42832IFS=$as_save_IFS
42833
42834  ;;
42835esac
42836fi
42837NM=$ac_cv_path_NM
42838if test -n "$NM"; then
42839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42840$as_echo "$NM" >&6; }
42841else
42842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42843$as_echo "no" >&6; }
42844fi
42845
42846
42847          if test "x$NM" = x; then
42848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42849          fi
42850        else
42851          # Otherwise we believe it is a complete path. Use it as it is.
42852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42853$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42855$as_echo_n "checking for NM... " >&6; }
42856          if test ! -x "$tool_specified"; then
42857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42858$as_echo "not found" >&6; }
42859            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42860          fi
42861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42862$as_echo "$tool_specified" >&6; }
42863        fi
42864      fi
42865    fi
42866
42867  fi
42868
42869
42870    fi
42871
42872  # Only process if variable expands to non-empty
42873
42874  if test "x$NM" != x; then
42875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42876
42877  # First separate the path from the arguments. This will split at the first
42878  # space.
42879  complete="$NM"
42880  path="${complete%% *}"
42881  tmp="$complete EOL"
42882  arguments="${tmp#* }"
42883
42884  # Input might be given as Windows format, start by converting to
42885  # unix format.
42886  new_path=`$CYGPATH -u "$path"`
42887
42888  # Now try to locate executable using which
42889  new_path=`$WHICH "$new_path" 2> /dev/null`
42890  # bat and cmd files are not always considered executable in cygwin causing which
42891  # to not find them
42892  if test "x$new_path" = x \
42893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42895    new_path=`$CYGPATH -u "$path"`
42896  fi
42897  if test "x$new_path" = x; then
42898    # Oops. Which didn't find the executable.
42899    # The splitting of arguments from the executable at a space might have been incorrect,
42900    # since paths with space are more likely in Windows. Give it another try with the whole
42901    # argument.
42902    path="$complete"
42903    arguments="EOL"
42904    new_path=`$CYGPATH -u "$path"`
42905    new_path=`$WHICH "$new_path" 2> /dev/null`
42906    # bat and cmd files are not always considered executable in cygwin causing which
42907    # to not find them
42908    if test "x$new_path" = x \
42909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42911      new_path=`$CYGPATH -u "$path"`
42912    fi
42913    if test "x$new_path" = x; then
42914      # It's still not found. Now this is an unrecoverable error.
42915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42916$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42917      has_space=`$ECHO "$complete" | $GREP " "`
42918      if test "x$has_space" != x; then
42919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42921      fi
42922      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42923    fi
42924  fi
42925
42926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42929  # "foo.exe" is OK but "foo" is an error.
42930  #
42931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42932  # It is also a way to make sure we got the proper file name for the real test later on.
42933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42934  if test "x$test_shortpath" = x; then
42935    # Short path failed, file does not exist as specified.
42936    # Try adding .exe or .cmd
42937    if test -f "${new_path}.exe"; then
42938      input_to_shortpath="${new_path}.exe"
42939    elif test -f "${new_path}.cmd"; then
42940      input_to_shortpath="${new_path}.cmd"
42941    else
42942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42943$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42946      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42947    fi
42948  else
42949    input_to_shortpath="$new_path"
42950  fi
42951
42952  # Call helper function which possibly converts this using DOS-style short mode.
42953  # If so, the updated path is stored in $new_path.
42954  new_path="$input_to_shortpath"
42955
42956  input_path="$input_to_shortpath"
42957  # Check if we need to convert this using DOS-style short mode. If the path
42958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42959  # take no chances and rewrite it.
42960  # Note: m4 eats our [], so we need to use [ and ] instead.
42961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42962  if test "x$has_forbidden_chars" != x; then
42963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42967      # Going to short mode and back again did indeed matter. Since short mode is
42968      # case insensitive, let's make it lowercase to improve readability.
42969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42970      # Now convert it back to Unix-style (cygpath)
42971      input_path=`$CYGPATH -u "$shortmode_path"`
42972      new_path="$input_path"
42973    fi
42974  fi
42975
42976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42977  if test "x$test_cygdrive_prefix" = x; then
42978    # As a simple fix, exclude /usr/bin since it's not a real path.
42979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42981      # a path prefixed by /cygdrive for fixpath to work.
42982      new_path="$CYGWIN_ROOT_PATH$input_path"
42983    fi
42984  fi
42985
42986  # remove trailing .exe if any
42987  new_path="${new_path/%.exe/}"
42988
42989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42990
42991  # First separate the path from the arguments. This will split at the first
42992  # space.
42993  complete="$NM"
42994  path="${complete%% *}"
42995  tmp="$complete EOL"
42996  arguments="${tmp#* }"
42997
42998  # Input might be given as Windows format, start by converting to
42999  # unix format.
43000  new_path="$path"
43001
43002  windows_path="$new_path"
43003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43004    unix_path=`$CYGPATH -u "$windows_path"`
43005    new_path="$unix_path"
43006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43008    new_path="$unix_path"
43009  fi
43010
43011
43012  # Now try to locate executable using which
43013  new_path=`$WHICH "$new_path" 2> /dev/null`
43014
43015  if test "x$new_path" = x; then
43016    # Oops. Which didn't find the executable.
43017    # The splitting of arguments from the executable at a space might have been incorrect,
43018    # since paths with space are more likely in Windows. Give it another try with the whole
43019    # argument.
43020    path="$complete"
43021    arguments="EOL"
43022    new_path="$path"
43023
43024  windows_path="$new_path"
43025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43026    unix_path=`$CYGPATH -u "$windows_path"`
43027    new_path="$unix_path"
43028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43030    new_path="$unix_path"
43031  fi
43032
43033
43034    new_path=`$WHICH "$new_path" 2> /dev/null`
43035    # bat and cmd files are not always considered executable in MSYS causing which
43036    # to not find them
43037    if test "x$new_path" = x \
43038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43040      new_path="$path"
43041
43042  windows_path="$new_path"
43043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43044    unix_path=`$CYGPATH -u "$windows_path"`
43045    new_path="$unix_path"
43046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43048    new_path="$unix_path"
43049  fi
43050
43051    fi
43052
43053    if test "x$new_path" = x; then
43054      # It's still not found. Now this is an unrecoverable error.
43055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43056$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43057      has_space=`$ECHO "$complete" | $GREP " "`
43058      if test "x$has_space" != x; then
43059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43061      fi
43062      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43063    fi
43064  fi
43065
43066  # Now new_path has a complete unix path to the binary
43067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43068    # Keep paths in /bin as-is, but remove trailing .exe if any
43069    new_path="${new_path/%.exe/}"
43070    # Do not save /bin paths to all_fixpath_prefixes!
43071  else
43072    # Not in mixed or Windows style, start by that.
43073    new_path=`cmd //c echo $new_path`
43074
43075  input_path="$new_path"
43076  # Check if we need to convert this using DOS-style short mode. If the path
43077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43078  # take no chances and rewrite it.
43079  # Note: m4 eats our [], so we need to use [ and ] instead.
43080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43081  if test "x$has_forbidden_chars" != x; then
43082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43084  fi
43085
43086    # Output is in $new_path
43087
43088  windows_path="$new_path"
43089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43090    unix_path=`$CYGPATH -u "$windows_path"`
43091    new_path="$unix_path"
43092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43094    new_path="$unix_path"
43095  fi
43096
43097    # remove trailing .exe if any
43098    new_path="${new_path/%.exe/}"
43099
43100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43102  fi
43103
43104    else
43105      # We're on a unix platform. Hooray! :)
43106      # First separate the path from the arguments. This will split at the first
43107      # space.
43108      complete="$NM"
43109      path="${complete%% *}"
43110      tmp="$complete EOL"
43111      arguments="${tmp#* }"
43112
43113      # Cannot rely on the command "which" here since it doesn't always work.
43114      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43115      if test -z "$is_absolute_path"; then
43116        # Path to executable is not absolute. Find it.
43117        IFS_save="$IFS"
43118        IFS=:
43119        for p in $PATH; do
43120          if test -f "$p/$path" && test -x "$p/$path"; then
43121            new_path="$p/$path"
43122            break
43123          fi
43124        done
43125        IFS="$IFS_save"
43126      else
43127        # This is an absolute path, we can use it without further modifications.
43128        new_path="$path"
43129      fi
43130
43131      if test "x$new_path" = x; then
43132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43133$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43134        has_space=`$ECHO "$complete" | $GREP " "`
43135        if test "x$has_space" != x; then
43136          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43137$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43138        fi
43139        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43140      fi
43141    fi
43142
43143    # Now join together the path and the arguments once again
43144    if test "x$arguments" != xEOL; then
43145      new_complete="$new_path ${arguments% *}"
43146    else
43147      new_complete="$new_path"
43148    fi
43149
43150    if test "x$complete" != "x$new_complete"; then
43151      NM="$new_complete"
43152      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43153$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43154    fi
43155  fi
43156
43157    GNM="$NM"
43158
43159  fi
43160
43161  # objcopy is used for moving debug symbols to separate files when
43162  # full debug symbols are enabled.
43163  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43164
43165
43166  # Publish this variable in the help.
43167
43168
43169  if [ -z "${OBJCOPY+x}" ]; then
43170    # The variable is not set by user, try to locate tool using the code snippet
43171    if test -n "$ac_tool_prefix"; then
43172  for ac_prog in gobjcopy objcopy
43173  do
43174    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43175set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43177$as_echo_n "checking for $ac_word... " >&6; }
43178if ${ac_cv_prog_OBJCOPY+:} false; then :
43179  $as_echo_n "(cached) " >&6
43180else
43181  if test -n "$OBJCOPY"; then
43182  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43183else
43184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43185for as_dir in $PATH
43186do
43187  IFS=$as_save_IFS
43188  test -z "$as_dir" && as_dir=.
43189    for ac_exec_ext in '' $ac_executable_extensions; do
43190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43191    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43193    break 2
43194  fi
43195done
43196  done
43197IFS=$as_save_IFS
43198
43199fi
43200fi
43201OBJCOPY=$ac_cv_prog_OBJCOPY
43202if test -n "$OBJCOPY"; then
43203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43204$as_echo "$OBJCOPY" >&6; }
43205else
43206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43207$as_echo "no" >&6; }
43208fi
43209
43210
43211    test -n "$OBJCOPY" && break
43212  done
43213fi
43214if test -z "$OBJCOPY"; then
43215  ac_ct_OBJCOPY=$OBJCOPY
43216  for ac_prog in gobjcopy objcopy
43217do
43218  # Extract the first word of "$ac_prog", so it can be a program name with args.
43219set dummy $ac_prog; ac_word=$2
43220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43221$as_echo_n "checking for $ac_word... " >&6; }
43222if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43223  $as_echo_n "(cached) " >&6
43224else
43225  if test -n "$ac_ct_OBJCOPY"; then
43226  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43227else
43228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43229for as_dir in $PATH
43230do
43231  IFS=$as_save_IFS
43232  test -z "$as_dir" && as_dir=.
43233    for ac_exec_ext in '' $ac_executable_extensions; do
43234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43235    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43237    break 2
43238  fi
43239done
43240  done
43241IFS=$as_save_IFS
43242
43243fi
43244fi
43245ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43246if test -n "$ac_ct_OBJCOPY"; then
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43248$as_echo "$ac_ct_OBJCOPY" >&6; }
43249else
43250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43251$as_echo "no" >&6; }
43252fi
43253
43254
43255  test -n "$ac_ct_OBJCOPY" && break
43256done
43257
43258  if test "x$ac_ct_OBJCOPY" = x; then
43259    OBJCOPY=""
43260  else
43261    case $cross_compiling:$ac_tool_warned in
43262yes:)
43263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43265ac_tool_warned=yes ;;
43266esac
43267    OBJCOPY=$ac_ct_OBJCOPY
43268  fi
43269fi
43270
43271  else
43272    # The variable is set, but is it from the command line or the environment?
43273
43274    # Try to remove the string !OBJCOPY! from our list.
43275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43277      # If it failed, the variable was not from the command line. Ignore it,
43278      # but warn the user (except for BASH, which is always set by the calling BASH).
43279      if test "xOBJCOPY" != xBASH; then
43280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43281$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43282      fi
43283      # Try to locate tool using the code snippet
43284      if test -n "$ac_tool_prefix"; then
43285  for ac_prog in gobjcopy objcopy
43286  do
43287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43290$as_echo_n "checking for $ac_word... " >&6; }
43291if ${ac_cv_prog_OBJCOPY+:} false; then :
43292  $as_echo_n "(cached) " >&6
43293else
43294  if test -n "$OBJCOPY"; then
43295  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43296else
43297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43298for as_dir in $PATH
43299do
43300  IFS=$as_save_IFS
43301  test -z "$as_dir" && as_dir=.
43302    for ac_exec_ext in '' $ac_executable_extensions; do
43303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43304    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43306    break 2
43307  fi
43308done
43309  done
43310IFS=$as_save_IFS
43311
43312fi
43313fi
43314OBJCOPY=$ac_cv_prog_OBJCOPY
43315if test -n "$OBJCOPY"; then
43316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43317$as_echo "$OBJCOPY" >&6; }
43318else
43319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43320$as_echo "no" >&6; }
43321fi
43322
43323
43324    test -n "$OBJCOPY" && break
43325  done
43326fi
43327if test -z "$OBJCOPY"; then
43328  ac_ct_OBJCOPY=$OBJCOPY
43329  for ac_prog in gobjcopy objcopy
43330do
43331  # Extract the first word of "$ac_prog", so it can be a program name with args.
43332set dummy $ac_prog; ac_word=$2
43333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43334$as_echo_n "checking for $ac_word... " >&6; }
43335if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43336  $as_echo_n "(cached) " >&6
43337else
43338  if test -n "$ac_ct_OBJCOPY"; then
43339  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43340else
43341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43342for as_dir in $PATH
43343do
43344  IFS=$as_save_IFS
43345  test -z "$as_dir" && as_dir=.
43346    for ac_exec_ext in '' $ac_executable_extensions; do
43347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43348    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43350    break 2
43351  fi
43352done
43353  done
43354IFS=$as_save_IFS
43355
43356fi
43357fi
43358ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43359if test -n "$ac_ct_OBJCOPY"; then
43360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43361$as_echo "$ac_ct_OBJCOPY" >&6; }
43362else
43363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43364$as_echo "no" >&6; }
43365fi
43366
43367
43368  test -n "$ac_ct_OBJCOPY" && break
43369done
43370
43371  if test "x$ac_ct_OBJCOPY" = x; then
43372    OBJCOPY=""
43373  else
43374    case $cross_compiling:$ac_tool_warned in
43375yes:)
43376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43378ac_tool_warned=yes ;;
43379esac
43380    OBJCOPY=$ac_ct_OBJCOPY
43381  fi
43382fi
43383
43384    else
43385      # If it succeeded, then it was overridden by the user. We will use it
43386      # for the tool.
43387
43388      # First remove it from the list of overridden variables, so we can test
43389      # for unknown variables in the end.
43390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43391
43392      # Check if we try to supply an empty value
43393      if test "x$OBJCOPY" = x; then
43394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43395$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43397$as_echo_n "checking for OBJCOPY... " >&6; }
43398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43399$as_echo "disabled" >&6; }
43400      else
43401        # Check if the provided tool contains a complete path.
43402        tool_specified="$OBJCOPY"
43403        tool_basename="${tool_specified##*/}"
43404        if test "x$tool_basename" = "x$tool_specified"; then
43405          # A command without a complete path is provided, search $PATH.
43406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43407$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43408          # Extract the first word of "$tool_basename", so it can be a program name with args.
43409set dummy $tool_basename; ac_word=$2
43410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43411$as_echo_n "checking for $ac_word... " >&6; }
43412if ${ac_cv_path_OBJCOPY+:} false; then :
43413  $as_echo_n "(cached) " >&6
43414else
43415  case $OBJCOPY in
43416  [\\/]* | ?:[\\/]*)
43417  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43418  ;;
43419  *)
43420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43421for as_dir in $PATH
43422do
43423  IFS=$as_save_IFS
43424  test -z "$as_dir" && as_dir=.
43425    for ac_exec_ext in '' $ac_executable_extensions; do
43426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43427    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43429    break 2
43430  fi
43431done
43432  done
43433IFS=$as_save_IFS
43434
43435  ;;
43436esac
43437fi
43438OBJCOPY=$ac_cv_path_OBJCOPY
43439if test -n "$OBJCOPY"; then
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43441$as_echo "$OBJCOPY" >&6; }
43442else
43443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43444$as_echo "no" >&6; }
43445fi
43446
43447
43448          if test "x$OBJCOPY" = x; then
43449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43450          fi
43451        else
43452          # Otherwise we believe it is a complete path. Use it as it is.
43453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43454$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43456$as_echo_n "checking for OBJCOPY... " >&6; }
43457          if test ! -x "$tool_specified"; then
43458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43459$as_echo "not found" >&6; }
43460            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43461          fi
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43463$as_echo "$tool_specified" >&6; }
43464        fi
43465      fi
43466    fi
43467
43468  fi
43469
43470
43471    # Only call fixup if objcopy was found.
43472    if test -n "$OBJCOPY"; then
43473
43474  # Only process if variable expands to non-empty
43475
43476  if test "x$OBJCOPY" != x; then
43477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43478
43479  # First separate the path from the arguments. This will split at the first
43480  # space.
43481  complete="$OBJCOPY"
43482  path="${complete%% *}"
43483  tmp="$complete EOL"
43484  arguments="${tmp#* }"
43485
43486  # Input might be given as Windows format, start by converting to
43487  # unix format.
43488  new_path=`$CYGPATH -u "$path"`
43489
43490  # Now try to locate executable using which
43491  new_path=`$WHICH "$new_path" 2> /dev/null`
43492  # bat and cmd files are not always considered executable in cygwin causing which
43493  # to not find them
43494  if test "x$new_path" = x \
43495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43497    new_path=`$CYGPATH -u "$path"`
43498  fi
43499  if test "x$new_path" = x; then
43500    # Oops. Which didn't find the executable.
43501    # The splitting of arguments from the executable at a space might have been incorrect,
43502    # since paths with space are more likely in Windows. Give it another try with the whole
43503    # argument.
43504    path="$complete"
43505    arguments="EOL"
43506    new_path=`$CYGPATH -u "$path"`
43507    new_path=`$WHICH "$new_path" 2> /dev/null`
43508    # bat and cmd files are not always considered executable in cygwin causing which
43509    # to not find them
43510    if test "x$new_path" = x \
43511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43513      new_path=`$CYGPATH -u "$path"`
43514    fi
43515    if test "x$new_path" = x; then
43516      # It's still not found. Now this is an unrecoverable error.
43517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43518$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43519      has_space=`$ECHO "$complete" | $GREP " "`
43520      if test "x$has_space" != x; then
43521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43523      fi
43524      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43525    fi
43526  fi
43527
43528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43531  # "foo.exe" is OK but "foo" is an error.
43532  #
43533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43534  # It is also a way to make sure we got the proper file name for the real test later on.
43535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43536  if test "x$test_shortpath" = x; then
43537    # Short path failed, file does not exist as specified.
43538    # Try adding .exe or .cmd
43539    if test -f "${new_path}.exe"; then
43540      input_to_shortpath="${new_path}.exe"
43541    elif test -f "${new_path}.cmd"; then
43542      input_to_shortpath="${new_path}.cmd"
43543    else
43544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43545$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43548      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43549    fi
43550  else
43551    input_to_shortpath="$new_path"
43552  fi
43553
43554  # Call helper function which possibly converts this using DOS-style short mode.
43555  # If so, the updated path is stored in $new_path.
43556  new_path="$input_to_shortpath"
43557
43558  input_path="$input_to_shortpath"
43559  # Check if we need to convert this using DOS-style short mode. If the path
43560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43561  # take no chances and rewrite it.
43562  # Note: m4 eats our [], so we need to use [ and ] instead.
43563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43564  if test "x$has_forbidden_chars" != x; then
43565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43569      # Going to short mode and back again did indeed matter. Since short mode is
43570      # case insensitive, let's make it lowercase to improve readability.
43571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43572      # Now convert it back to Unix-style (cygpath)
43573      input_path=`$CYGPATH -u "$shortmode_path"`
43574      new_path="$input_path"
43575    fi
43576  fi
43577
43578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43579  if test "x$test_cygdrive_prefix" = x; then
43580    # As a simple fix, exclude /usr/bin since it's not a real path.
43581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43583      # a path prefixed by /cygdrive for fixpath to work.
43584      new_path="$CYGWIN_ROOT_PATH$input_path"
43585    fi
43586  fi
43587
43588  # remove trailing .exe if any
43589  new_path="${new_path/%.exe/}"
43590
43591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43592
43593  # First separate the path from the arguments. This will split at the first
43594  # space.
43595  complete="$OBJCOPY"
43596  path="${complete%% *}"
43597  tmp="$complete EOL"
43598  arguments="${tmp#* }"
43599
43600  # Input might be given as Windows format, start by converting to
43601  # unix format.
43602  new_path="$path"
43603
43604  windows_path="$new_path"
43605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43606    unix_path=`$CYGPATH -u "$windows_path"`
43607    new_path="$unix_path"
43608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43610    new_path="$unix_path"
43611  fi
43612
43613
43614  # Now try to locate executable using which
43615  new_path=`$WHICH "$new_path" 2> /dev/null`
43616
43617  if test "x$new_path" = x; then
43618    # Oops. Which didn't find the executable.
43619    # The splitting of arguments from the executable at a space might have been incorrect,
43620    # since paths with space are more likely in Windows. Give it another try with the whole
43621    # argument.
43622    path="$complete"
43623    arguments="EOL"
43624    new_path="$path"
43625
43626  windows_path="$new_path"
43627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43628    unix_path=`$CYGPATH -u "$windows_path"`
43629    new_path="$unix_path"
43630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43632    new_path="$unix_path"
43633  fi
43634
43635
43636    new_path=`$WHICH "$new_path" 2> /dev/null`
43637    # bat and cmd files are not always considered executable in MSYS causing which
43638    # to not find them
43639    if test "x$new_path" = x \
43640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43642      new_path="$path"
43643
43644  windows_path="$new_path"
43645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43646    unix_path=`$CYGPATH -u "$windows_path"`
43647    new_path="$unix_path"
43648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43650    new_path="$unix_path"
43651  fi
43652
43653    fi
43654
43655    if test "x$new_path" = x; then
43656      # It's still not found. Now this is an unrecoverable error.
43657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43658$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43659      has_space=`$ECHO "$complete" | $GREP " "`
43660      if test "x$has_space" != x; then
43661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43663      fi
43664      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43665    fi
43666  fi
43667
43668  # Now new_path has a complete unix path to the binary
43669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43670    # Keep paths in /bin as-is, but remove trailing .exe if any
43671    new_path="${new_path/%.exe/}"
43672    # Do not save /bin paths to all_fixpath_prefixes!
43673  else
43674    # Not in mixed or Windows style, start by that.
43675    new_path=`cmd //c echo $new_path`
43676
43677  input_path="$new_path"
43678  # Check if we need to convert this using DOS-style short mode. If the path
43679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43680  # take no chances and rewrite it.
43681  # Note: m4 eats our [], so we need to use [ and ] instead.
43682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43683  if test "x$has_forbidden_chars" != x; then
43684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43686  fi
43687
43688    # Output is in $new_path
43689
43690  windows_path="$new_path"
43691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43692    unix_path=`$CYGPATH -u "$windows_path"`
43693    new_path="$unix_path"
43694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43696    new_path="$unix_path"
43697  fi
43698
43699    # remove trailing .exe if any
43700    new_path="${new_path/%.exe/}"
43701
43702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43704  fi
43705
43706    else
43707      # We're on a unix platform. Hooray! :)
43708      # First separate the path from the arguments. This will split at the first
43709      # space.
43710      complete="$OBJCOPY"
43711      path="${complete%% *}"
43712      tmp="$complete EOL"
43713      arguments="${tmp#* }"
43714
43715      # Cannot rely on the command "which" here since it doesn't always work.
43716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43717      if test -z "$is_absolute_path"; then
43718        # Path to executable is not absolute. Find it.
43719        IFS_save="$IFS"
43720        IFS=:
43721        for p in $PATH; do
43722          if test -f "$p/$path" && test -x "$p/$path"; then
43723            new_path="$p/$path"
43724            break
43725          fi
43726        done
43727        IFS="$IFS_save"
43728      else
43729        # This is an absolute path, we can use it without further modifications.
43730        new_path="$path"
43731      fi
43732
43733      if test "x$new_path" = x; then
43734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43735$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43736        has_space=`$ECHO "$complete" | $GREP " "`
43737        if test "x$has_space" != x; then
43738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43740        fi
43741        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43742      fi
43743    fi
43744
43745    # Now join together the path and the arguments once again
43746    if test "x$arguments" != xEOL; then
43747      new_complete="$new_path ${arguments% *}"
43748    else
43749      new_complete="$new_path"
43750    fi
43751
43752    if test "x$complete" != "x$new_complete"; then
43753      OBJCOPY="$new_complete"
43754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43755$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43756    fi
43757  fi
43758
43759      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43760        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43761        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43762        # - version number is last blank separate word on first line
43763        # - version number formats that have been seen:
43764        #   - <major>.<minor>
43765        #   - <major>.<minor>.<micro>
43766        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43767        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43768         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43769              -e 's/.* //' \
43770              -e '/^[01]\./b bad' \
43771              -e '/^2\./{' \
43772              -e '  s/^2\.//' \
43773              -e '  /^[0-9]$/b bad' \
43774              -e '  /^[0-9]\./b bad' \
43775              -e '  /^1[0-9]$/b bad' \
43776              -e '  /^1[0-9]\./b bad' \
43777              -e '  /^20\./b bad' \
43778              -e '  /^21\.0$/b bad' \
43779              -e '  /^21\.0\./b bad' \
43780              -e '}' \
43781              -e ':good' \
43782              -e 's/.*/VALID_VERSION/p' \
43783              -e 'q' \
43784              -e ':bad' \
43785              -e 's/.*/BAD_VERSION/p' \
43786              -e 'q'`
43787        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43788          OBJCOPY=
43789          { $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
43790$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43791          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43792$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43793          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43794$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43795          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43796$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43797          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43798$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43799        fi
43800      fi
43801    fi
43802  fi
43803
43804
43805
43806  # Publish this variable in the help.
43807
43808
43809  if [ -z "${OBJDUMP+x}" ]; then
43810    # The variable is not set by user, try to locate tool using the code snippet
43811    if test -n "$ac_tool_prefix"; then
43812  for ac_prog in gobjdump objdump
43813  do
43814    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43815set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43817$as_echo_n "checking for $ac_word... " >&6; }
43818if ${ac_cv_prog_OBJDUMP+:} false; then :
43819  $as_echo_n "(cached) " >&6
43820else
43821  if test -n "$OBJDUMP"; then
43822  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43823else
43824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43825for as_dir in $PATH
43826do
43827  IFS=$as_save_IFS
43828  test -z "$as_dir" && as_dir=.
43829    for ac_exec_ext in '' $ac_executable_extensions; do
43830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43831    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43833    break 2
43834  fi
43835done
43836  done
43837IFS=$as_save_IFS
43838
43839fi
43840fi
43841OBJDUMP=$ac_cv_prog_OBJDUMP
43842if test -n "$OBJDUMP"; then
43843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43844$as_echo "$OBJDUMP" >&6; }
43845else
43846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43847$as_echo "no" >&6; }
43848fi
43849
43850
43851    test -n "$OBJDUMP" && break
43852  done
43853fi
43854if test -z "$OBJDUMP"; then
43855  ac_ct_OBJDUMP=$OBJDUMP
43856  for ac_prog in gobjdump objdump
43857do
43858  # Extract the first word of "$ac_prog", so it can be a program name with args.
43859set dummy $ac_prog; ac_word=$2
43860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43861$as_echo_n "checking for $ac_word... " >&6; }
43862if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43863  $as_echo_n "(cached) " >&6
43864else
43865  if test -n "$ac_ct_OBJDUMP"; then
43866  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43867else
43868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43869for as_dir in $PATH
43870do
43871  IFS=$as_save_IFS
43872  test -z "$as_dir" && as_dir=.
43873    for ac_exec_ext in '' $ac_executable_extensions; do
43874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43875    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43877    break 2
43878  fi
43879done
43880  done
43881IFS=$as_save_IFS
43882
43883fi
43884fi
43885ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43886if test -n "$ac_ct_OBJDUMP"; then
43887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43888$as_echo "$ac_ct_OBJDUMP" >&6; }
43889else
43890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43891$as_echo "no" >&6; }
43892fi
43893
43894
43895  test -n "$ac_ct_OBJDUMP" && break
43896done
43897
43898  if test "x$ac_ct_OBJDUMP" = x; then
43899    OBJDUMP=""
43900  else
43901    case $cross_compiling:$ac_tool_warned in
43902yes:)
43903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43905ac_tool_warned=yes ;;
43906esac
43907    OBJDUMP=$ac_ct_OBJDUMP
43908  fi
43909fi
43910
43911  else
43912    # The variable is set, but is it from the command line or the environment?
43913
43914    # Try to remove the string !OBJDUMP! from our list.
43915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43917      # If it failed, the variable was not from the command line. Ignore it,
43918      # but warn the user (except for BASH, which is always set by the calling BASH).
43919      if test "xOBJDUMP" != xBASH; then
43920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43921$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43922      fi
43923      # Try to locate tool using the code snippet
43924      if test -n "$ac_tool_prefix"; then
43925  for ac_prog in gobjdump objdump
43926  do
43927    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43928set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43930$as_echo_n "checking for $ac_word... " >&6; }
43931if ${ac_cv_prog_OBJDUMP+:} false; then :
43932  $as_echo_n "(cached) " >&6
43933else
43934  if test -n "$OBJDUMP"; then
43935  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43936else
43937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43938for as_dir in $PATH
43939do
43940  IFS=$as_save_IFS
43941  test -z "$as_dir" && as_dir=.
43942    for ac_exec_ext in '' $ac_executable_extensions; do
43943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43944    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43946    break 2
43947  fi
43948done
43949  done
43950IFS=$as_save_IFS
43951
43952fi
43953fi
43954OBJDUMP=$ac_cv_prog_OBJDUMP
43955if test -n "$OBJDUMP"; then
43956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43957$as_echo "$OBJDUMP" >&6; }
43958else
43959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43960$as_echo "no" >&6; }
43961fi
43962
43963
43964    test -n "$OBJDUMP" && break
43965  done
43966fi
43967if test -z "$OBJDUMP"; then
43968  ac_ct_OBJDUMP=$OBJDUMP
43969  for ac_prog in gobjdump objdump
43970do
43971  # Extract the first word of "$ac_prog", so it can be a program name with args.
43972set dummy $ac_prog; ac_word=$2
43973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43974$as_echo_n "checking for $ac_word... " >&6; }
43975if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43976  $as_echo_n "(cached) " >&6
43977else
43978  if test -n "$ac_ct_OBJDUMP"; then
43979  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43980else
43981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43982for as_dir in $PATH
43983do
43984  IFS=$as_save_IFS
43985  test -z "$as_dir" && as_dir=.
43986    for ac_exec_ext in '' $ac_executable_extensions; do
43987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43988    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43990    break 2
43991  fi
43992done
43993  done
43994IFS=$as_save_IFS
43995
43996fi
43997fi
43998ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43999if test -n "$ac_ct_OBJDUMP"; then
44000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44001$as_echo "$ac_ct_OBJDUMP" >&6; }
44002else
44003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44004$as_echo "no" >&6; }
44005fi
44006
44007
44008  test -n "$ac_ct_OBJDUMP" && break
44009done
44010
44011  if test "x$ac_ct_OBJDUMP" = x; then
44012    OBJDUMP=""
44013  else
44014    case $cross_compiling:$ac_tool_warned in
44015yes:)
44016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44018ac_tool_warned=yes ;;
44019esac
44020    OBJDUMP=$ac_ct_OBJDUMP
44021  fi
44022fi
44023
44024    else
44025      # If it succeeded, then it was overridden by the user. We will use it
44026      # for the tool.
44027
44028      # First remove it from the list of overridden variables, so we can test
44029      # for unknown variables in the end.
44030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44031
44032      # Check if we try to supply an empty value
44033      if test "x$OBJDUMP" = x; then
44034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44035$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44037$as_echo_n "checking for OBJDUMP... " >&6; }
44038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44039$as_echo "disabled" >&6; }
44040      else
44041        # Check if the provided tool contains a complete path.
44042        tool_specified="$OBJDUMP"
44043        tool_basename="${tool_specified##*/}"
44044        if test "x$tool_basename" = "x$tool_specified"; then
44045          # A command without a complete path is provided, search $PATH.
44046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44047$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44048          # Extract the first word of "$tool_basename", so it can be a program name with args.
44049set dummy $tool_basename; ac_word=$2
44050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44051$as_echo_n "checking for $ac_word... " >&6; }
44052if ${ac_cv_path_OBJDUMP+:} false; then :
44053  $as_echo_n "(cached) " >&6
44054else
44055  case $OBJDUMP in
44056  [\\/]* | ?:[\\/]*)
44057  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44058  ;;
44059  *)
44060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44061for as_dir in $PATH
44062do
44063  IFS=$as_save_IFS
44064  test -z "$as_dir" && as_dir=.
44065    for ac_exec_ext in '' $ac_executable_extensions; do
44066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44067    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44069    break 2
44070  fi
44071done
44072  done
44073IFS=$as_save_IFS
44074
44075  ;;
44076esac
44077fi
44078OBJDUMP=$ac_cv_path_OBJDUMP
44079if test -n "$OBJDUMP"; then
44080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44081$as_echo "$OBJDUMP" >&6; }
44082else
44083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44084$as_echo "no" >&6; }
44085fi
44086
44087
44088          if test "x$OBJDUMP" = x; then
44089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44090          fi
44091        else
44092          # Otherwise we believe it is a complete path. Use it as it is.
44093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44094$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44096$as_echo_n "checking for OBJDUMP... " >&6; }
44097          if test ! -x "$tool_specified"; then
44098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44099$as_echo "not found" >&6; }
44100            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44101          fi
44102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44103$as_echo "$tool_specified" >&6; }
44104        fi
44105      fi
44106    fi
44107
44108  fi
44109
44110
44111  if test "x$OBJDUMP" != x; then
44112    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44113    # bails if argument is missing.
44114
44115  # Only process if variable expands to non-empty
44116
44117  if test "x$OBJDUMP" != x; then
44118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44119
44120  # First separate the path from the arguments. This will split at the first
44121  # space.
44122  complete="$OBJDUMP"
44123  path="${complete%% *}"
44124  tmp="$complete EOL"
44125  arguments="${tmp#* }"
44126
44127  # Input might be given as Windows format, start by converting to
44128  # unix format.
44129  new_path=`$CYGPATH -u "$path"`
44130
44131  # Now try to locate executable using which
44132  new_path=`$WHICH "$new_path" 2> /dev/null`
44133  # bat and cmd files are not always considered executable in cygwin causing which
44134  # to not find them
44135  if test "x$new_path" = x \
44136      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44137      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44138    new_path=`$CYGPATH -u "$path"`
44139  fi
44140  if test "x$new_path" = x; then
44141    # Oops. Which didn't find the executable.
44142    # The splitting of arguments from the executable at a space might have been incorrect,
44143    # since paths with space are more likely in Windows. Give it another try with the whole
44144    # argument.
44145    path="$complete"
44146    arguments="EOL"
44147    new_path=`$CYGPATH -u "$path"`
44148    new_path=`$WHICH "$new_path" 2> /dev/null`
44149    # bat and cmd files are not always considered executable in cygwin causing which
44150    # to not find them
44151    if test "x$new_path" = x \
44152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44154      new_path=`$CYGPATH -u "$path"`
44155    fi
44156    if test "x$new_path" = x; then
44157      # It's still not found. Now this is an unrecoverable error.
44158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44159$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44160      has_space=`$ECHO "$complete" | $GREP " "`
44161      if test "x$has_space" != x; then
44162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44164      fi
44165      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44166    fi
44167  fi
44168
44169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44172  # "foo.exe" is OK but "foo" is an error.
44173  #
44174  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44175  # It is also a way to make sure we got the proper file name for the real test later on.
44176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44177  if test "x$test_shortpath" = x; then
44178    # Short path failed, file does not exist as specified.
44179    # Try adding .exe or .cmd
44180    if test -f "${new_path}.exe"; then
44181      input_to_shortpath="${new_path}.exe"
44182    elif test -f "${new_path}.cmd"; then
44183      input_to_shortpath="${new_path}.cmd"
44184    else
44185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44186$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44189      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44190    fi
44191  else
44192    input_to_shortpath="$new_path"
44193  fi
44194
44195  # Call helper function which possibly converts this using DOS-style short mode.
44196  # If so, the updated path is stored in $new_path.
44197  new_path="$input_to_shortpath"
44198
44199  input_path="$input_to_shortpath"
44200  # Check if we need to convert this using DOS-style short mode. If the path
44201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44202  # take no chances and rewrite it.
44203  # Note: m4 eats our [], so we need to use [ and ] instead.
44204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44205  if test "x$has_forbidden_chars" != x; then
44206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44210      # Going to short mode and back again did indeed matter. Since short mode is
44211      # case insensitive, let's make it lowercase to improve readability.
44212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44213      # Now convert it back to Unix-style (cygpath)
44214      input_path=`$CYGPATH -u "$shortmode_path"`
44215      new_path="$input_path"
44216    fi
44217  fi
44218
44219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44220  if test "x$test_cygdrive_prefix" = x; then
44221    # As a simple fix, exclude /usr/bin since it's not a real path.
44222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44224      # a path prefixed by /cygdrive for fixpath to work.
44225      new_path="$CYGWIN_ROOT_PATH$input_path"
44226    fi
44227  fi
44228
44229  # remove trailing .exe if any
44230  new_path="${new_path/%.exe/}"
44231
44232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44233
44234  # First separate the path from the arguments. This will split at the first
44235  # space.
44236  complete="$OBJDUMP"
44237  path="${complete%% *}"
44238  tmp="$complete EOL"
44239  arguments="${tmp#* }"
44240
44241  # Input might be given as Windows format, start by converting to
44242  # unix format.
44243  new_path="$path"
44244
44245  windows_path="$new_path"
44246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44247    unix_path=`$CYGPATH -u "$windows_path"`
44248    new_path="$unix_path"
44249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44251    new_path="$unix_path"
44252  fi
44253
44254
44255  # Now try to locate executable using which
44256  new_path=`$WHICH "$new_path" 2> /dev/null`
44257
44258  if test "x$new_path" = x; then
44259    # Oops. Which didn't find the executable.
44260    # The splitting of arguments from the executable at a space might have been incorrect,
44261    # since paths with space are more likely in Windows. Give it another try with the whole
44262    # argument.
44263    path="$complete"
44264    arguments="EOL"
44265    new_path="$path"
44266
44267  windows_path="$new_path"
44268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44269    unix_path=`$CYGPATH -u "$windows_path"`
44270    new_path="$unix_path"
44271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44273    new_path="$unix_path"
44274  fi
44275
44276
44277    new_path=`$WHICH "$new_path" 2> /dev/null`
44278    # bat and cmd files are not always considered executable in MSYS causing which
44279    # to not find them
44280    if test "x$new_path" = x \
44281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44283      new_path="$path"
44284
44285  windows_path="$new_path"
44286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44287    unix_path=`$CYGPATH -u "$windows_path"`
44288    new_path="$unix_path"
44289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44291    new_path="$unix_path"
44292  fi
44293
44294    fi
44295
44296    if test "x$new_path" = x; then
44297      # It's still not found. Now this is an unrecoverable error.
44298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44299$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44300      has_space=`$ECHO "$complete" | $GREP " "`
44301      if test "x$has_space" != x; then
44302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44304      fi
44305      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44306    fi
44307  fi
44308
44309  # Now new_path has a complete unix path to the binary
44310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44311    # Keep paths in /bin as-is, but remove trailing .exe if any
44312    new_path="${new_path/%.exe/}"
44313    # Do not save /bin paths to all_fixpath_prefixes!
44314  else
44315    # Not in mixed or Windows style, start by that.
44316    new_path=`cmd //c echo $new_path`
44317
44318  input_path="$new_path"
44319  # Check if we need to convert this using DOS-style short mode. If the path
44320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44321  # take no chances and rewrite it.
44322  # Note: m4 eats our [], so we need to use [ and ] instead.
44323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44324  if test "x$has_forbidden_chars" != x; then
44325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44327  fi
44328
44329    # Output is in $new_path
44330
44331  windows_path="$new_path"
44332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44333    unix_path=`$CYGPATH -u "$windows_path"`
44334    new_path="$unix_path"
44335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44337    new_path="$unix_path"
44338  fi
44339
44340    # remove trailing .exe if any
44341    new_path="${new_path/%.exe/}"
44342
44343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44345  fi
44346
44347    else
44348      # We're on a unix platform. Hooray! :)
44349      # First separate the path from the arguments. This will split at the first
44350      # space.
44351      complete="$OBJDUMP"
44352      path="${complete%% *}"
44353      tmp="$complete EOL"
44354      arguments="${tmp#* }"
44355
44356      # Cannot rely on the command "which" here since it doesn't always work.
44357      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44358      if test -z "$is_absolute_path"; then
44359        # Path to executable is not absolute. Find it.
44360        IFS_save="$IFS"
44361        IFS=:
44362        for p in $PATH; do
44363          if test -f "$p/$path" && test -x "$p/$path"; then
44364            new_path="$p/$path"
44365            break
44366          fi
44367        done
44368        IFS="$IFS_save"
44369      else
44370        # This is an absolute path, we can use it without further modifications.
44371        new_path="$path"
44372      fi
44373
44374      if test "x$new_path" = x; then
44375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44376$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44377        has_space=`$ECHO "$complete" | $GREP " "`
44378        if test "x$has_space" != x; then
44379          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44380$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44381        fi
44382        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44383      fi
44384    fi
44385
44386    # Now join together the path and the arguments once again
44387    if test "x$arguments" != xEOL; then
44388      new_complete="$new_path ${arguments% *}"
44389    else
44390      new_complete="$new_path"
44391    fi
44392
44393    if test "x$complete" != "x$new_complete"; then
44394      OBJDUMP="$new_complete"
44395      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44396$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44397    fi
44398  fi
44399
44400  fi
44401
44402
44403  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44404  # to remain in place. Otherwise the compiler will not work in some siutations
44405  # in later configure checks.
44406  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44407    PATH="$OLD_PATH"
44408  fi
44409
44410  # Restore the flags to the user specified values.
44411  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44412  CFLAGS="$ORG_CFLAGS"
44413  CXXFLAGS="$ORG_CXXFLAGS"
44414
44415
44416# Finally do some processing after the detection phase
44417
44418  if test "x$COMPILE_TYPE" = "xcross"; then
44419    # Now we need to find a C/C++ compiler that can build executables for the
44420    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44421    # used once. Also, we need to do this without adding a tools dir to the
44422    # path, otherwise we might pick up cross-compilers which don't use standard
44423    # naming.
44424
44425    OLDPATH="$PATH"
44426
44427
44428# Check whether --with-build-devkit was given.
44429if test "${with_build_devkit+set}" = set; then :
44430  withval=$with_build_devkit;
44431fi
44432
44433    if test "x$with_build_devkit" = "xyes"; then
44434      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44435    elif test -n "$with_build_devkit"; then
44436      if test ! -d "$with_build_devkit"; then
44437        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44438      else
44439
44440  # Only process if variable expands to non-empty
44441
44442  if test "x$with_build_devkit" != x; then
44443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44444
44445  # Input might be given as Windows format, start by converting to
44446  # unix format.
44447  path="$with_build_devkit"
44448  new_path=`$CYGPATH -u "$path"`
44449
44450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44453  # "foo.exe" is OK but "foo" is an error.
44454  #
44455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44456  # It is also a way to make sure we got the proper file name for the real test later on.
44457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44458  if test "x$test_shortpath" = x; then
44459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44460$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44461    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44462  fi
44463
44464  # Call helper function which possibly converts this using DOS-style short mode.
44465  # If so, the updated path is stored in $new_path.
44466
44467  input_path="$new_path"
44468  # Check if we need to convert this using DOS-style short mode. If the path
44469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44470  # take no chances and rewrite it.
44471  # Note: m4 eats our [], so we need to use [ and ] instead.
44472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44473  if test "x$has_forbidden_chars" != x; then
44474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44478      # Going to short mode and back again did indeed matter. Since short mode is
44479      # case insensitive, let's make it lowercase to improve readability.
44480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44481      # Now convert it back to Unix-style (cygpath)
44482      input_path=`$CYGPATH -u "$shortmode_path"`
44483      new_path="$input_path"
44484    fi
44485  fi
44486
44487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44488  if test "x$test_cygdrive_prefix" = x; then
44489    # As a simple fix, exclude /usr/bin since it's not a real path.
44490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44492      # a path prefixed by /cygdrive for fixpath to work.
44493      new_path="$CYGWIN_ROOT_PATH$input_path"
44494    fi
44495  fi
44496
44497
44498  if test "x$path" != "x$new_path"; then
44499    with_build_devkit="$new_path"
44500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44501$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44502  fi
44503
44504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44505
44506  path="$with_build_devkit"
44507  has_colon=`$ECHO $path | $GREP ^.:`
44508  new_path="$path"
44509  if test "x$has_colon" = x; then
44510    # Not in mixed or Windows style, start by that.
44511    new_path=`cmd //c echo $path`
44512  fi
44513
44514
44515  input_path="$new_path"
44516  # Check if we need to convert this using DOS-style short mode. If the path
44517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44518  # take no chances and rewrite it.
44519  # Note: m4 eats our [], so we need to use [ and ] instead.
44520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44521  if test "x$has_forbidden_chars" != x; then
44522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44524  fi
44525
44526
44527  windows_path="$new_path"
44528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44529    unix_path=`$CYGPATH -u "$windows_path"`
44530    new_path="$unix_path"
44531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44533    new_path="$unix_path"
44534  fi
44535
44536  if test "x$path" != "x$new_path"; then
44537    with_build_devkit="$new_path"
44538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44539$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44540  fi
44541
44542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44544
44545    else
44546      # We're on a unix platform. Hooray! :)
44547      path="$with_build_devkit"
44548      has_space=`$ECHO "$path" | $GREP " "`
44549      if test "x$has_space" != x; then
44550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44551$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44553      fi
44554
44555      # Use eval to expand a potential ~
44556      eval path="$path"
44557      if test ! -f "$path" && test ! -d "$path"; then
44558        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44559      fi
44560
44561      if test -d "$path"; then
44562        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44563      else
44564        dir="`$DIRNAME "$path"`"
44565        base="`$BASENAME "$path"`"
44566        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44567      fi
44568    fi
44569  fi
44570
44571        BUILD_DEVKIT_ROOT="$with_build_devkit"
44572        # Check for a meta data info file in the root of the devkit
44573        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44574          # Process devkit.info so that existing devkit variables are not
44575          # modified by this
44576          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44577              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44578              -e "s/\$host/\$build/g" \
44579              $BUILD_DEVKIT_ROOT/devkit.info \
44580              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44581          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44582          # This potentially sets the following:
44583          # A descriptive name of the devkit
44584
44585  if test "x$BUILD_DEVKIT_NAME" = x; then
44586    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44587  fi
44588
44589          # Corresponds to --with-extra-path
44590
44591  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44592    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44593  fi
44594
44595          # Corresponds to --with-toolchain-path
44596
44597  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44598    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44599  fi
44600
44601          # Corresponds to --with-sysroot
44602
44603  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44604    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44605  fi
44606
44607          # Skip the Window specific parts
44608        fi
44609
44610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44611$as_echo_n "checking for build platform devkit... " >&6; }
44612        if test "x$BUILD_DEVKIT_NAME" != x; then
44613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44614$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44615        else
44616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44617$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44618        fi
44619
44620        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44621
44622  if test "x$BUILD_SYSROOT" != "x"; then
44623    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44624      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44625        # Solaris Studio does not have a concept of sysroot. Instead we must
44626        # make sure the default include and lib dirs are appended to each
44627        # compile and link command line. Must also add -I-xbuiltin to enable
44628        # inlining of system functions and intrinsics.
44629        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44630        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44631            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44632      fi
44633    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44634      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44635      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44636    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44637      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44638      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44639    fi
44640    # The global CFLAGS and LDFLAGS variables need these for configure to function
44641    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44642    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44643    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44644    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44645  fi
44646
44647  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44648    # We also need -iframework<path>/System/Library/Frameworks
44649    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44650    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44651    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44652    # set this here so it doesn't have to be peppered throughout the forest
44653    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44654    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44655  fi
44656
44657
44658
44659
44660
44661         # Fallback default of just /bin if DEVKIT_PATH is not defined
44662        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44663          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44664        fi
44665        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44666      fi
44667    fi
44668
44669    # FIXME: we should list the discovered compilers as an exclude pattern!
44670    # If we do that, we can do this detection before POST_DETECTION, and still
44671    # find the build compilers in the tools dir, if needed.
44672
44673
44674
44675  # Publish this variable in the help.
44676
44677
44678  if [ -z "${BUILD_CC+x}" ]; then
44679    # The variable is not set by user, try to locate tool using the code snippet
44680    for ac_prog in cl cc gcc
44681do
44682  # Extract the first word of "$ac_prog", so it can be a program name with args.
44683set dummy $ac_prog; ac_word=$2
44684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44685$as_echo_n "checking for $ac_word... " >&6; }
44686if ${ac_cv_path_BUILD_CC+:} false; then :
44687  $as_echo_n "(cached) " >&6
44688else
44689  case $BUILD_CC in
44690  [\\/]* | ?:[\\/]*)
44691  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44692  ;;
44693  *)
44694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44695for as_dir in $PATH
44696do
44697  IFS=$as_save_IFS
44698  test -z "$as_dir" && as_dir=.
44699    for ac_exec_ext in '' $ac_executable_extensions; do
44700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44701    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44703    break 2
44704  fi
44705done
44706  done
44707IFS=$as_save_IFS
44708
44709  ;;
44710esac
44711fi
44712BUILD_CC=$ac_cv_path_BUILD_CC
44713if test -n "$BUILD_CC"; then
44714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44715$as_echo "$BUILD_CC" >&6; }
44716else
44717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44718$as_echo "no" >&6; }
44719fi
44720
44721
44722  test -n "$BUILD_CC" && break
44723done
44724
44725  else
44726    # The variable is set, but is it from the command line or the environment?
44727
44728    # Try to remove the string !BUILD_CC! from our list.
44729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44731      # If it failed, the variable was not from the command line. Ignore it,
44732      # but warn the user (except for BASH, which is always set by the calling BASH).
44733      if test "xBUILD_CC" != xBASH; then
44734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44735$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44736      fi
44737      # Try to locate tool using the code snippet
44738      for ac_prog in cl cc gcc
44739do
44740  # Extract the first word of "$ac_prog", so it can be a program name with args.
44741set dummy $ac_prog; ac_word=$2
44742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44743$as_echo_n "checking for $ac_word... " >&6; }
44744if ${ac_cv_path_BUILD_CC+:} false; then :
44745  $as_echo_n "(cached) " >&6
44746else
44747  case $BUILD_CC in
44748  [\\/]* | ?:[\\/]*)
44749  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44750  ;;
44751  *)
44752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44753for as_dir in $PATH
44754do
44755  IFS=$as_save_IFS
44756  test -z "$as_dir" && as_dir=.
44757    for ac_exec_ext in '' $ac_executable_extensions; do
44758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44759    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44761    break 2
44762  fi
44763done
44764  done
44765IFS=$as_save_IFS
44766
44767  ;;
44768esac
44769fi
44770BUILD_CC=$ac_cv_path_BUILD_CC
44771if test -n "$BUILD_CC"; then
44772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44773$as_echo "$BUILD_CC" >&6; }
44774else
44775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44776$as_echo "no" >&6; }
44777fi
44778
44779
44780  test -n "$BUILD_CC" && break
44781done
44782
44783    else
44784      # If it succeeded, then it was overridden by the user. We will use it
44785      # for the tool.
44786
44787      # First remove it from the list of overridden variables, so we can test
44788      # for unknown variables in the end.
44789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44790
44791      # Check if we try to supply an empty value
44792      if test "x$BUILD_CC" = x; then
44793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44794$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44796$as_echo_n "checking for BUILD_CC... " >&6; }
44797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44798$as_echo "disabled" >&6; }
44799      else
44800        # Check if the provided tool contains a complete path.
44801        tool_specified="$BUILD_CC"
44802        tool_basename="${tool_specified##*/}"
44803        if test "x$tool_basename" = "x$tool_specified"; then
44804          # A command without a complete path is provided, search $PATH.
44805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44806$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44807          # Extract the first word of "$tool_basename", so it can be a program name with args.
44808set dummy $tool_basename; ac_word=$2
44809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44810$as_echo_n "checking for $ac_word... " >&6; }
44811if ${ac_cv_path_BUILD_CC+:} false; then :
44812  $as_echo_n "(cached) " >&6
44813else
44814  case $BUILD_CC in
44815  [\\/]* | ?:[\\/]*)
44816  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44817  ;;
44818  *)
44819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44820for as_dir in $PATH
44821do
44822  IFS=$as_save_IFS
44823  test -z "$as_dir" && as_dir=.
44824    for ac_exec_ext in '' $ac_executable_extensions; do
44825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44826    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44828    break 2
44829  fi
44830done
44831  done
44832IFS=$as_save_IFS
44833
44834  ;;
44835esac
44836fi
44837BUILD_CC=$ac_cv_path_BUILD_CC
44838if test -n "$BUILD_CC"; then
44839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44840$as_echo "$BUILD_CC" >&6; }
44841else
44842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44843$as_echo "no" >&6; }
44844fi
44845
44846
44847          if test "x$BUILD_CC" = x; then
44848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44849          fi
44850        else
44851          # Otherwise we believe it is a complete path. Use it as it is.
44852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44853$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44855$as_echo_n "checking for BUILD_CC... " >&6; }
44856          if test ! -x "$tool_specified"; then
44857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44858$as_echo "not found" >&6; }
44859            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44860          fi
44861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44862$as_echo "$tool_specified" >&6; }
44863        fi
44864      fi
44865    fi
44866
44867  fi
44868
44869
44870
44871  if test "x$BUILD_CC" = x; then
44872    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44873  fi
44874
44875
44876
44877  # Only process if variable expands to non-empty
44878
44879  if test "x$BUILD_CC" != x; then
44880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881
44882  # First separate the path from the arguments. This will split at the first
44883  # space.
44884  complete="$BUILD_CC"
44885  path="${complete%% *}"
44886  tmp="$complete EOL"
44887  arguments="${tmp#* }"
44888
44889  # Input might be given as Windows format, start by converting to
44890  # unix format.
44891  new_path=`$CYGPATH -u "$path"`
44892
44893  # Now try to locate executable using which
44894  new_path=`$WHICH "$new_path" 2> /dev/null`
44895  # bat and cmd files are not always considered executable in cygwin causing which
44896  # to not find them
44897  if test "x$new_path" = x \
44898      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44899      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44900    new_path=`$CYGPATH -u "$path"`
44901  fi
44902  if test "x$new_path" = x; then
44903    # Oops. Which didn't find the executable.
44904    # The splitting of arguments from the executable at a space might have been incorrect,
44905    # since paths with space are more likely in Windows. Give it another try with the whole
44906    # argument.
44907    path="$complete"
44908    arguments="EOL"
44909    new_path=`$CYGPATH -u "$path"`
44910    new_path=`$WHICH "$new_path" 2> /dev/null`
44911    # bat and cmd files are not always considered executable in cygwin causing which
44912    # to not find them
44913    if test "x$new_path" = x \
44914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44916      new_path=`$CYGPATH -u "$path"`
44917    fi
44918    if test "x$new_path" = x; then
44919      # It's still not found. Now this is an unrecoverable error.
44920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44921$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44922      has_space=`$ECHO "$complete" | $GREP " "`
44923      if test "x$has_space" != x; then
44924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44926      fi
44927      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44928    fi
44929  fi
44930
44931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44934  # "foo.exe" is OK but "foo" is an error.
44935  #
44936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44937  # It is also a way to make sure we got the proper file name for the real test later on.
44938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44939  if test "x$test_shortpath" = x; then
44940    # Short path failed, file does not exist as specified.
44941    # Try adding .exe or .cmd
44942    if test -f "${new_path}.exe"; then
44943      input_to_shortpath="${new_path}.exe"
44944    elif test -f "${new_path}.cmd"; then
44945      input_to_shortpath="${new_path}.cmd"
44946    else
44947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44948$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44951      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44952    fi
44953  else
44954    input_to_shortpath="$new_path"
44955  fi
44956
44957  # Call helper function which possibly converts this using DOS-style short mode.
44958  # If so, the updated path is stored in $new_path.
44959  new_path="$input_to_shortpath"
44960
44961  input_path="$input_to_shortpath"
44962  # Check if we need to convert this using DOS-style short mode. If the path
44963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44964  # take no chances and rewrite it.
44965  # Note: m4 eats our [], so we need to use [ and ] instead.
44966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44967  if test "x$has_forbidden_chars" != x; then
44968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44972      # Going to short mode and back again did indeed matter. Since short mode is
44973      # case insensitive, let's make it lowercase to improve readability.
44974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44975      # Now convert it back to Unix-style (cygpath)
44976      input_path=`$CYGPATH -u "$shortmode_path"`
44977      new_path="$input_path"
44978    fi
44979  fi
44980
44981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44982  if test "x$test_cygdrive_prefix" = x; then
44983    # As a simple fix, exclude /usr/bin since it's not a real path.
44984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44986      # a path prefixed by /cygdrive for fixpath to work.
44987      new_path="$CYGWIN_ROOT_PATH$input_path"
44988    fi
44989  fi
44990
44991  # remove trailing .exe if any
44992  new_path="${new_path/%.exe/}"
44993
44994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44995
44996  # First separate the path from the arguments. This will split at the first
44997  # space.
44998  complete="$BUILD_CC"
44999  path="${complete%% *}"
45000  tmp="$complete EOL"
45001  arguments="${tmp#* }"
45002
45003  # Input might be given as Windows format, start by converting to
45004  # unix format.
45005  new_path="$path"
45006
45007  windows_path="$new_path"
45008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45009    unix_path=`$CYGPATH -u "$windows_path"`
45010    new_path="$unix_path"
45011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45013    new_path="$unix_path"
45014  fi
45015
45016
45017  # Now try to locate executable using which
45018  new_path=`$WHICH "$new_path" 2> /dev/null`
45019
45020  if test "x$new_path" = x; then
45021    # Oops. Which didn't find the executable.
45022    # The splitting of arguments from the executable at a space might have been incorrect,
45023    # since paths with space are more likely in Windows. Give it another try with the whole
45024    # argument.
45025    path="$complete"
45026    arguments="EOL"
45027    new_path="$path"
45028
45029  windows_path="$new_path"
45030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45031    unix_path=`$CYGPATH -u "$windows_path"`
45032    new_path="$unix_path"
45033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45035    new_path="$unix_path"
45036  fi
45037
45038
45039    new_path=`$WHICH "$new_path" 2> /dev/null`
45040    # bat and cmd files are not always considered executable in MSYS causing which
45041    # to not find them
45042    if test "x$new_path" = x \
45043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45045      new_path="$path"
45046
45047  windows_path="$new_path"
45048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45049    unix_path=`$CYGPATH -u "$windows_path"`
45050    new_path="$unix_path"
45051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45053    new_path="$unix_path"
45054  fi
45055
45056    fi
45057
45058    if test "x$new_path" = x; then
45059      # It's still not found. Now this is an unrecoverable error.
45060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45061$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45062      has_space=`$ECHO "$complete" | $GREP " "`
45063      if test "x$has_space" != x; then
45064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45066      fi
45067      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45068    fi
45069  fi
45070
45071  # Now new_path has a complete unix path to the binary
45072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45073    # Keep paths in /bin as-is, but remove trailing .exe if any
45074    new_path="${new_path/%.exe/}"
45075    # Do not save /bin paths to all_fixpath_prefixes!
45076  else
45077    # Not in mixed or Windows style, start by that.
45078    new_path=`cmd //c echo $new_path`
45079
45080  input_path="$new_path"
45081  # Check if we need to convert this using DOS-style short mode. If the path
45082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45083  # take no chances and rewrite it.
45084  # Note: m4 eats our [], so we need to use [ and ] instead.
45085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45086  if test "x$has_forbidden_chars" != x; then
45087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45089  fi
45090
45091    # Output is in $new_path
45092
45093  windows_path="$new_path"
45094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45095    unix_path=`$CYGPATH -u "$windows_path"`
45096    new_path="$unix_path"
45097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45099    new_path="$unix_path"
45100  fi
45101
45102    # remove trailing .exe if any
45103    new_path="${new_path/%.exe/}"
45104
45105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45107  fi
45108
45109    else
45110      # We're on a unix platform. Hooray! :)
45111      # First separate the path from the arguments. This will split at the first
45112      # space.
45113      complete="$BUILD_CC"
45114      path="${complete%% *}"
45115      tmp="$complete EOL"
45116      arguments="${tmp#* }"
45117
45118      # Cannot rely on the command "which" here since it doesn't always work.
45119      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45120      if test -z "$is_absolute_path"; then
45121        # Path to executable is not absolute. Find it.
45122        IFS_save="$IFS"
45123        IFS=:
45124        for p in $PATH; do
45125          if test -f "$p/$path" && test -x "$p/$path"; then
45126            new_path="$p/$path"
45127            break
45128          fi
45129        done
45130        IFS="$IFS_save"
45131      else
45132        # This is an absolute path, we can use it without further modifications.
45133        new_path="$path"
45134      fi
45135
45136      if test "x$new_path" = x; then
45137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45138$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45139        has_space=`$ECHO "$complete" | $GREP " "`
45140        if test "x$has_space" != x; then
45141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45143        fi
45144        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45145      fi
45146    fi
45147
45148    # Now join together the path and the arguments once again
45149    if test "x$arguments" != xEOL; then
45150      new_complete="$new_path ${arguments% *}"
45151    else
45152      new_complete="$new_path"
45153    fi
45154
45155    if test "x$complete" != "x$new_complete"; then
45156      BUILD_CC="$new_complete"
45157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45158$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45159    fi
45160  fi
45161
45162
45163
45164
45165  # Publish this variable in the help.
45166
45167
45168  if [ -z "${BUILD_CXX+x}" ]; then
45169    # The variable is not set by user, try to locate tool using the code snippet
45170    for ac_prog in cl CC g++
45171do
45172  # Extract the first word of "$ac_prog", so it can be a program name with args.
45173set dummy $ac_prog; ac_word=$2
45174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45175$as_echo_n "checking for $ac_word... " >&6; }
45176if ${ac_cv_path_BUILD_CXX+:} false; then :
45177  $as_echo_n "(cached) " >&6
45178else
45179  case $BUILD_CXX in
45180  [\\/]* | ?:[\\/]*)
45181  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45182  ;;
45183  *)
45184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45185for as_dir in $PATH
45186do
45187  IFS=$as_save_IFS
45188  test -z "$as_dir" && as_dir=.
45189    for ac_exec_ext in '' $ac_executable_extensions; do
45190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45191    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45193    break 2
45194  fi
45195done
45196  done
45197IFS=$as_save_IFS
45198
45199  ;;
45200esac
45201fi
45202BUILD_CXX=$ac_cv_path_BUILD_CXX
45203if test -n "$BUILD_CXX"; then
45204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45205$as_echo "$BUILD_CXX" >&6; }
45206else
45207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45208$as_echo "no" >&6; }
45209fi
45210
45211
45212  test -n "$BUILD_CXX" && break
45213done
45214
45215  else
45216    # The variable is set, but is it from the command line or the environment?
45217
45218    # Try to remove the string !BUILD_CXX! from our list.
45219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45221      # If it failed, the variable was not from the command line. Ignore it,
45222      # but warn the user (except for BASH, which is always set by the calling BASH).
45223      if test "xBUILD_CXX" != xBASH; then
45224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45225$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45226      fi
45227      # Try to locate tool using the code snippet
45228      for ac_prog in cl CC g++
45229do
45230  # Extract the first word of "$ac_prog", so it can be a program name with args.
45231set dummy $ac_prog; ac_word=$2
45232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45233$as_echo_n "checking for $ac_word... " >&6; }
45234if ${ac_cv_path_BUILD_CXX+:} false; then :
45235  $as_echo_n "(cached) " >&6
45236else
45237  case $BUILD_CXX in
45238  [\\/]* | ?:[\\/]*)
45239  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45240  ;;
45241  *)
45242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45243for as_dir in $PATH
45244do
45245  IFS=$as_save_IFS
45246  test -z "$as_dir" && as_dir=.
45247    for ac_exec_ext in '' $ac_executable_extensions; do
45248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45249    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45251    break 2
45252  fi
45253done
45254  done
45255IFS=$as_save_IFS
45256
45257  ;;
45258esac
45259fi
45260BUILD_CXX=$ac_cv_path_BUILD_CXX
45261if test -n "$BUILD_CXX"; then
45262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45263$as_echo "$BUILD_CXX" >&6; }
45264else
45265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45266$as_echo "no" >&6; }
45267fi
45268
45269
45270  test -n "$BUILD_CXX" && break
45271done
45272
45273    else
45274      # If it succeeded, then it was overridden by the user. We will use it
45275      # for the tool.
45276
45277      # First remove it from the list of overridden variables, so we can test
45278      # for unknown variables in the end.
45279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45280
45281      # Check if we try to supply an empty value
45282      if test "x$BUILD_CXX" = x; then
45283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45284$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45286$as_echo_n "checking for BUILD_CXX... " >&6; }
45287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45288$as_echo "disabled" >&6; }
45289      else
45290        # Check if the provided tool contains a complete path.
45291        tool_specified="$BUILD_CXX"
45292        tool_basename="${tool_specified##*/}"
45293        if test "x$tool_basename" = "x$tool_specified"; then
45294          # A command without a complete path is provided, search $PATH.
45295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45296$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45297          # Extract the first word of "$tool_basename", so it can be a program name with args.
45298set dummy $tool_basename; ac_word=$2
45299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45300$as_echo_n "checking for $ac_word... " >&6; }
45301if ${ac_cv_path_BUILD_CXX+:} false; then :
45302  $as_echo_n "(cached) " >&6
45303else
45304  case $BUILD_CXX in
45305  [\\/]* | ?:[\\/]*)
45306  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45307  ;;
45308  *)
45309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45310for as_dir in $PATH
45311do
45312  IFS=$as_save_IFS
45313  test -z "$as_dir" && as_dir=.
45314    for ac_exec_ext in '' $ac_executable_extensions; do
45315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45316    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45318    break 2
45319  fi
45320done
45321  done
45322IFS=$as_save_IFS
45323
45324  ;;
45325esac
45326fi
45327BUILD_CXX=$ac_cv_path_BUILD_CXX
45328if test -n "$BUILD_CXX"; then
45329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45330$as_echo "$BUILD_CXX" >&6; }
45331else
45332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45333$as_echo "no" >&6; }
45334fi
45335
45336
45337          if test "x$BUILD_CXX" = x; then
45338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45339          fi
45340        else
45341          # Otherwise we believe it is a complete path. Use it as it is.
45342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45343$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45345$as_echo_n "checking for BUILD_CXX... " >&6; }
45346          if test ! -x "$tool_specified"; then
45347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45348$as_echo "not found" >&6; }
45349            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45350          fi
45351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45352$as_echo "$tool_specified" >&6; }
45353        fi
45354      fi
45355    fi
45356
45357  fi
45358
45359
45360
45361  if test "x$BUILD_CXX" = x; then
45362    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45363  fi
45364
45365
45366
45367  # Only process if variable expands to non-empty
45368
45369  if test "x$BUILD_CXX" != x; then
45370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45371
45372  # First separate the path from the arguments. This will split at the first
45373  # space.
45374  complete="$BUILD_CXX"
45375  path="${complete%% *}"
45376  tmp="$complete EOL"
45377  arguments="${tmp#* }"
45378
45379  # Input might be given as Windows format, start by converting to
45380  # unix format.
45381  new_path=`$CYGPATH -u "$path"`
45382
45383  # Now try to locate executable using which
45384  new_path=`$WHICH "$new_path" 2> /dev/null`
45385  # bat and cmd files are not always considered executable in cygwin causing which
45386  # to not find them
45387  if test "x$new_path" = x \
45388      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45389      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45390    new_path=`$CYGPATH -u "$path"`
45391  fi
45392  if test "x$new_path" = x; then
45393    # Oops. Which didn't find the executable.
45394    # The splitting of arguments from the executable at a space might have been incorrect,
45395    # since paths with space are more likely in Windows. Give it another try with the whole
45396    # argument.
45397    path="$complete"
45398    arguments="EOL"
45399    new_path=`$CYGPATH -u "$path"`
45400    new_path=`$WHICH "$new_path" 2> /dev/null`
45401    # bat and cmd files are not always considered executable in cygwin causing which
45402    # to not find them
45403    if test "x$new_path" = x \
45404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45406      new_path=`$CYGPATH -u "$path"`
45407    fi
45408    if test "x$new_path" = x; then
45409      # It's still not found. Now this is an unrecoverable error.
45410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45411$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45412      has_space=`$ECHO "$complete" | $GREP " "`
45413      if test "x$has_space" != x; then
45414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45416      fi
45417      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45418    fi
45419  fi
45420
45421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45424  # "foo.exe" is OK but "foo" is an error.
45425  #
45426  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45427  # It is also a way to make sure we got the proper file name for the real test later on.
45428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45429  if test "x$test_shortpath" = x; then
45430    # Short path failed, file does not exist as specified.
45431    # Try adding .exe or .cmd
45432    if test -f "${new_path}.exe"; then
45433      input_to_shortpath="${new_path}.exe"
45434    elif test -f "${new_path}.cmd"; then
45435      input_to_shortpath="${new_path}.cmd"
45436    else
45437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45438$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45441      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45442    fi
45443  else
45444    input_to_shortpath="$new_path"
45445  fi
45446
45447  # Call helper function which possibly converts this using DOS-style short mode.
45448  # If so, the updated path is stored in $new_path.
45449  new_path="$input_to_shortpath"
45450
45451  input_path="$input_to_shortpath"
45452  # Check if we need to convert this using DOS-style short mode. If the path
45453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45454  # take no chances and rewrite it.
45455  # Note: m4 eats our [], so we need to use [ and ] instead.
45456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45457  if test "x$has_forbidden_chars" != x; then
45458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45462      # Going to short mode and back again did indeed matter. Since short mode is
45463      # case insensitive, let's make it lowercase to improve readability.
45464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45465      # Now convert it back to Unix-style (cygpath)
45466      input_path=`$CYGPATH -u "$shortmode_path"`
45467      new_path="$input_path"
45468    fi
45469  fi
45470
45471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45472  if test "x$test_cygdrive_prefix" = x; then
45473    # As a simple fix, exclude /usr/bin since it's not a real path.
45474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45476      # a path prefixed by /cygdrive for fixpath to work.
45477      new_path="$CYGWIN_ROOT_PATH$input_path"
45478    fi
45479  fi
45480
45481  # remove trailing .exe if any
45482  new_path="${new_path/%.exe/}"
45483
45484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45485
45486  # First separate the path from the arguments. This will split at the first
45487  # space.
45488  complete="$BUILD_CXX"
45489  path="${complete%% *}"
45490  tmp="$complete EOL"
45491  arguments="${tmp#* }"
45492
45493  # Input might be given as Windows format, start by converting to
45494  # unix format.
45495  new_path="$path"
45496
45497  windows_path="$new_path"
45498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45499    unix_path=`$CYGPATH -u "$windows_path"`
45500    new_path="$unix_path"
45501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45503    new_path="$unix_path"
45504  fi
45505
45506
45507  # Now try to locate executable using which
45508  new_path=`$WHICH "$new_path" 2> /dev/null`
45509
45510  if test "x$new_path" = x; then
45511    # Oops. Which didn't find the executable.
45512    # The splitting of arguments from the executable at a space might have been incorrect,
45513    # since paths with space are more likely in Windows. Give it another try with the whole
45514    # argument.
45515    path="$complete"
45516    arguments="EOL"
45517    new_path="$path"
45518
45519  windows_path="$new_path"
45520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45521    unix_path=`$CYGPATH -u "$windows_path"`
45522    new_path="$unix_path"
45523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45525    new_path="$unix_path"
45526  fi
45527
45528
45529    new_path=`$WHICH "$new_path" 2> /dev/null`
45530    # bat and cmd files are not always considered executable in MSYS causing which
45531    # to not find them
45532    if test "x$new_path" = x \
45533        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45534        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45535      new_path="$path"
45536
45537  windows_path="$new_path"
45538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45539    unix_path=`$CYGPATH -u "$windows_path"`
45540    new_path="$unix_path"
45541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45543    new_path="$unix_path"
45544  fi
45545
45546    fi
45547
45548    if test "x$new_path" = x; then
45549      # It's still not found. Now this is an unrecoverable error.
45550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45551$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45552      has_space=`$ECHO "$complete" | $GREP " "`
45553      if test "x$has_space" != x; then
45554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45556      fi
45557      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45558    fi
45559  fi
45560
45561  # Now new_path has a complete unix path to the binary
45562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45563    # Keep paths in /bin as-is, but remove trailing .exe if any
45564    new_path="${new_path/%.exe/}"
45565    # Do not save /bin paths to all_fixpath_prefixes!
45566  else
45567    # Not in mixed or Windows style, start by that.
45568    new_path=`cmd //c echo $new_path`
45569
45570  input_path="$new_path"
45571  # Check if we need to convert this using DOS-style short mode. If the path
45572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45573  # take no chances and rewrite it.
45574  # Note: m4 eats our [], so we need to use [ and ] instead.
45575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45576  if test "x$has_forbidden_chars" != x; then
45577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45579  fi
45580
45581    # Output is in $new_path
45582
45583  windows_path="$new_path"
45584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45585    unix_path=`$CYGPATH -u "$windows_path"`
45586    new_path="$unix_path"
45587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45589    new_path="$unix_path"
45590  fi
45591
45592    # remove trailing .exe if any
45593    new_path="${new_path/%.exe/}"
45594
45595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45597  fi
45598
45599    else
45600      # We're on a unix platform. Hooray! :)
45601      # First separate the path from the arguments. This will split at the first
45602      # space.
45603      complete="$BUILD_CXX"
45604      path="${complete%% *}"
45605      tmp="$complete EOL"
45606      arguments="${tmp#* }"
45607
45608      # Cannot rely on the command "which" here since it doesn't always work.
45609      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45610      if test -z "$is_absolute_path"; then
45611        # Path to executable is not absolute. Find it.
45612        IFS_save="$IFS"
45613        IFS=:
45614        for p in $PATH; do
45615          if test -f "$p/$path" && test -x "$p/$path"; then
45616            new_path="$p/$path"
45617            break
45618          fi
45619        done
45620        IFS="$IFS_save"
45621      else
45622        # This is an absolute path, we can use it without further modifications.
45623        new_path="$path"
45624      fi
45625
45626      if test "x$new_path" = x; then
45627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45628$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45629        has_space=`$ECHO "$complete" | $GREP " "`
45630        if test "x$has_space" != x; then
45631          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45633        fi
45634        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45635      fi
45636    fi
45637
45638    # Now join together the path and the arguments once again
45639    if test "x$arguments" != xEOL; then
45640      new_complete="$new_path ${arguments% *}"
45641    else
45642      new_complete="$new_path"
45643    fi
45644
45645    if test "x$complete" != "x$new_complete"; then
45646      BUILD_CXX="$new_complete"
45647      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45648$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45649    fi
45650  fi
45651
45652
45653
45654  # Publish this variable in the help.
45655
45656
45657  if [ -z "${BUILD_NM+x}" ]; then
45658    # The variable is not set by user, try to locate tool using the code snippet
45659    for ac_prog in nm gcc-nm
45660do
45661  # Extract the first word of "$ac_prog", so it can be a program name with args.
45662set dummy $ac_prog; ac_word=$2
45663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45664$as_echo_n "checking for $ac_word... " >&6; }
45665if ${ac_cv_path_BUILD_NM+:} false; then :
45666  $as_echo_n "(cached) " >&6
45667else
45668  case $BUILD_NM in
45669  [\\/]* | ?:[\\/]*)
45670  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45671  ;;
45672  *)
45673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45674for as_dir in $PATH
45675do
45676  IFS=$as_save_IFS
45677  test -z "$as_dir" && as_dir=.
45678    for ac_exec_ext in '' $ac_executable_extensions; do
45679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45680    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45682    break 2
45683  fi
45684done
45685  done
45686IFS=$as_save_IFS
45687
45688  ;;
45689esac
45690fi
45691BUILD_NM=$ac_cv_path_BUILD_NM
45692if test -n "$BUILD_NM"; then
45693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45694$as_echo "$BUILD_NM" >&6; }
45695else
45696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45697$as_echo "no" >&6; }
45698fi
45699
45700
45701  test -n "$BUILD_NM" && break
45702done
45703
45704  else
45705    # The variable is set, but is it from the command line or the environment?
45706
45707    # Try to remove the string !BUILD_NM! from our list.
45708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45710      # If it failed, the variable was not from the command line. Ignore it,
45711      # but warn the user (except for BASH, which is always set by the calling BASH).
45712      if test "xBUILD_NM" != xBASH; then
45713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45714$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45715      fi
45716      # Try to locate tool using the code snippet
45717      for ac_prog in nm gcc-nm
45718do
45719  # Extract the first word of "$ac_prog", so it can be a program name with args.
45720set dummy $ac_prog; ac_word=$2
45721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45722$as_echo_n "checking for $ac_word... " >&6; }
45723if ${ac_cv_path_BUILD_NM+:} false; then :
45724  $as_echo_n "(cached) " >&6
45725else
45726  case $BUILD_NM in
45727  [\\/]* | ?:[\\/]*)
45728  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45729  ;;
45730  *)
45731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45732for as_dir in $PATH
45733do
45734  IFS=$as_save_IFS
45735  test -z "$as_dir" && as_dir=.
45736    for ac_exec_ext in '' $ac_executable_extensions; do
45737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45738    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45740    break 2
45741  fi
45742done
45743  done
45744IFS=$as_save_IFS
45745
45746  ;;
45747esac
45748fi
45749BUILD_NM=$ac_cv_path_BUILD_NM
45750if test -n "$BUILD_NM"; then
45751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45752$as_echo "$BUILD_NM" >&6; }
45753else
45754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45755$as_echo "no" >&6; }
45756fi
45757
45758
45759  test -n "$BUILD_NM" && break
45760done
45761
45762    else
45763      # If it succeeded, then it was overridden by the user. We will use it
45764      # for the tool.
45765
45766      # First remove it from the list of overridden variables, so we can test
45767      # for unknown variables in the end.
45768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45769
45770      # Check if we try to supply an empty value
45771      if test "x$BUILD_NM" = x; then
45772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45773$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45775$as_echo_n "checking for BUILD_NM... " >&6; }
45776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45777$as_echo "disabled" >&6; }
45778      else
45779        # Check if the provided tool contains a complete path.
45780        tool_specified="$BUILD_NM"
45781        tool_basename="${tool_specified##*/}"
45782        if test "x$tool_basename" = "x$tool_specified"; then
45783          # A command without a complete path is provided, search $PATH.
45784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45785$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45786          # Extract the first word of "$tool_basename", so it can be a program name with args.
45787set dummy $tool_basename; ac_word=$2
45788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45789$as_echo_n "checking for $ac_word... " >&6; }
45790if ${ac_cv_path_BUILD_NM+:} false; then :
45791  $as_echo_n "(cached) " >&6
45792else
45793  case $BUILD_NM in
45794  [\\/]* | ?:[\\/]*)
45795  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45796  ;;
45797  *)
45798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45799for as_dir in $PATH
45800do
45801  IFS=$as_save_IFS
45802  test -z "$as_dir" && as_dir=.
45803    for ac_exec_ext in '' $ac_executable_extensions; do
45804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45805    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45807    break 2
45808  fi
45809done
45810  done
45811IFS=$as_save_IFS
45812
45813  ;;
45814esac
45815fi
45816BUILD_NM=$ac_cv_path_BUILD_NM
45817if test -n "$BUILD_NM"; then
45818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45819$as_echo "$BUILD_NM" >&6; }
45820else
45821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45822$as_echo "no" >&6; }
45823fi
45824
45825
45826          if test "x$BUILD_NM" = x; then
45827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45828          fi
45829        else
45830          # Otherwise we believe it is a complete path. Use it as it is.
45831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45832$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45834$as_echo_n "checking for BUILD_NM... " >&6; }
45835          if test ! -x "$tool_specified"; then
45836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45837$as_echo "not found" >&6; }
45838            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45839          fi
45840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45841$as_echo "$tool_specified" >&6; }
45842        fi
45843      fi
45844    fi
45845
45846  fi
45847
45848
45849
45850  # Only process if variable expands to non-empty
45851
45852  if test "x$BUILD_NM" != x; then
45853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45854
45855  # First separate the path from the arguments. This will split at the first
45856  # space.
45857  complete="$BUILD_NM"
45858  path="${complete%% *}"
45859  tmp="$complete EOL"
45860  arguments="${tmp#* }"
45861
45862  # Input might be given as Windows format, start by converting to
45863  # unix format.
45864  new_path=`$CYGPATH -u "$path"`
45865
45866  # Now try to locate executable using which
45867  new_path=`$WHICH "$new_path" 2> /dev/null`
45868  # bat and cmd files are not always considered executable in cygwin causing which
45869  # to not find them
45870  if test "x$new_path" = x \
45871      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45872      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45873    new_path=`$CYGPATH -u "$path"`
45874  fi
45875  if test "x$new_path" = x; then
45876    # Oops. Which didn't find the executable.
45877    # The splitting of arguments from the executable at a space might have been incorrect,
45878    # since paths with space are more likely in Windows. Give it another try with the whole
45879    # argument.
45880    path="$complete"
45881    arguments="EOL"
45882    new_path=`$CYGPATH -u "$path"`
45883    new_path=`$WHICH "$new_path" 2> /dev/null`
45884    # bat and cmd files are not always considered executable in cygwin causing which
45885    # to not find them
45886    if test "x$new_path" = x \
45887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45889      new_path=`$CYGPATH -u "$path"`
45890    fi
45891    if test "x$new_path" = x; then
45892      # It's still not found. Now this is an unrecoverable error.
45893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45894$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45895      has_space=`$ECHO "$complete" | $GREP " "`
45896      if test "x$has_space" != x; then
45897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45899      fi
45900      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45901    fi
45902  fi
45903
45904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45907  # "foo.exe" is OK but "foo" is an error.
45908  #
45909  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45910  # It is also a way to make sure we got the proper file name for the real test later on.
45911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45912  if test "x$test_shortpath" = x; then
45913    # Short path failed, file does not exist as specified.
45914    # Try adding .exe or .cmd
45915    if test -f "${new_path}.exe"; then
45916      input_to_shortpath="${new_path}.exe"
45917    elif test -f "${new_path}.cmd"; then
45918      input_to_shortpath="${new_path}.cmd"
45919    else
45920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45921$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45922      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45923$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45924      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45925    fi
45926  else
45927    input_to_shortpath="$new_path"
45928  fi
45929
45930  # Call helper function which possibly converts this using DOS-style short mode.
45931  # If so, the updated path is stored in $new_path.
45932  new_path="$input_to_shortpath"
45933
45934  input_path="$input_to_shortpath"
45935  # Check if we need to convert this using DOS-style short mode. If the path
45936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45937  # take no chances and rewrite it.
45938  # Note: m4 eats our [], so we need to use [ and ] instead.
45939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45940  if test "x$has_forbidden_chars" != x; then
45941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45945      # Going to short mode and back again did indeed matter. Since short mode is
45946      # case insensitive, let's make it lowercase to improve readability.
45947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45948      # Now convert it back to Unix-style (cygpath)
45949      input_path=`$CYGPATH -u "$shortmode_path"`
45950      new_path="$input_path"
45951    fi
45952  fi
45953
45954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45955  if test "x$test_cygdrive_prefix" = x; then
45956    # As a simple fix, exclude /usr/bin since it's not a real path.
45957    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45959      # a path prefixed by /cygdrive for fixpath to work.
45960      new_path="$CYGWIN_ROOT_PATH$input_path"
45961    fi
45962  fi
45963
45964  # remove trailing .exe if any
45965  new_path="${new_path/%.exe/}"
45966
45967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45968
45969  # First separate the path from the arguments. This will split at the first
45970  # space.
45971  complete="$BUILD_NM"
45972  path="${complete%% *}"
45973  tmp="$complete EOL"
45974  arguments="${tmp#* }"
45975
45976  # Input might be given as Windows format, start by converting to
45977  # unix format.
45978  new_path="$path"
45979
45980  windows_path="$new_path"
45981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45982    unix_path=`$CYGPATH -u "$windows_path"`
45983    new_path="$unix_path"
45984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45986    new_path="$unix_path"
45987  fi
45988
45989
45990  # Now try to locate executable using which
45991  new_path=`$WHICH "$new_path" 2> /dev/null`
45992
45993  if test "x$new_path" = x; then
45994    # Oops. Which didn't find the executable.
45995    # The splitting of arguments from the executable at a space might have been incorrect,
45996    # since paths with space are more likely in Windows. Give it another try with the whole
45997    # argument.
45998    path="$complete"
45999    arguments="EOL"
46000    new_path="$path"
46001
46002  windows_path="$new_path"
46003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46004    unix_path=`$CYGPATH -u "$windows_path"`
46005    new_path="$unix_path"
46006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46008    new_path="$unix_path"
46009  fi
46010
46011
46012    new_path=`$WHICH "$new_path" 2> /dev/null`
46013    # bat and cmd files are not always considered executable in MSYS causing which
46014    # to not find them
46015    if test "x$new_path" = x \
46016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46018      new_path="$path"
46019
46020  windows_path="$new_path"
46021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46022    unix_path=`$CYGPATH -u "$windows_path"`
46023    new_path="$unix_path"
46024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46026    new_path="$unix_path"
46027  fi
46028
46029    fi
46030
46031    if test "x$new_path" = x; then
46032      # It's still not found. Now this is an unrecoverable error.
46033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46034$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46035      has_space=`$ECHO "$complete" | $GREP " "`
46036      if test "x$has_space" != x; then
46037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46039      fi
46040      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46041    fi
46042  fi
46043
46044  # Now new_path has a complete unix path to the binary
46045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46046    # Keep paths in /bin as-is, but remove trailing .exe if any
46047    new_path="${new_path/%.exe/}"
46048    # Do not save /bin paths to all_fixpath_prefixes!
46049  else
46050    # Not in mixed or Windows style, start by that.
46051    new_path=`cmd //c echo $new_path`
46052
46053  input_path="$new_path"
46054  # Check if we need to convert this using DOS-style short mode. If the path
46055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46056  # take no chances and rewrite it.
46057  # Note: m4 eats our [], so we need to use [ and ] instead.
46058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46059  if test "x$has_forbidden_chars" != x; then
46060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46062  fi
46063
46064    # Output is in $new_path
46065
46066  windows_path="$new_path"
46067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46068    unix_path=`$CYGPATH -u "$windows_path"`
46069    new_path="$unix_path"
46070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46072    new_path="$unix_path"
46073  fi
46074
46075    # remove trailing .exe if any
46076    new_path="${new_path/%.exe/}"
46077
46078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46080  fi
46081
46082    else
46083      # We're on a unix platform. Hooray! :)
46084      # First separate the path from the arguments. This will split at the first
46085      # space.
46086      complete="$BUILD_NM"
46087      path="${complete%% *}"
46088      tmp="$complete EOL"
46089      arguments="${tmp#* }"
46090
46091      # Cannot rely on the command "which" here since it doesn't always work.
46092      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46093      if test -z "$is_absolute_path"; then
46094        # Path to executable is not absolute. Find it.
46095        IFS_save="$IFS"
46096        IFS=:
46097        for p in $PATH; do
46098          if test -f "$p/$path" && test -x "$p/$path"; then
46099            new_path="$p/$path"
46100            break
46101          fi
46102        done
46103        IFS="$IFS_save"
46104      else
46105        # This is an absolute path, we can use it without further modifications.
46106        new_path="$path"
46107      fi
46108
46109      if test "x$new_path" = x; then
46110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46111$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46112        has_space=`$ECHO "$complete" | $GREP " "`
46113        if test "x$has_space" != x; then
46114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46116        fi
46117        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46118      fi
46119    fi
46120
46121    # Now join together the path and the arguments once again
46122    if test "x$arguments" != xEOL; then
46123      new_complete="$new_path ${arguments% *}"
46124    else
46125      new_complete="$new_path"
46126    fi
46127
46128    if test "x$complete" != "x$new_complete"; then
46129      BUILD_NM="$new_complete"
46130      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46131$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46132    fi
46133  fi
46134
46135
46136
46137  # Publish this variable in the help.
46138
46139
46140  if [ -z "${BUILD_AR+x}" ]; then
46141    # The variable is not set by user, try to locate tool using the code snippet
46142    for ac_prog in ar gcc-ar
46143do
46144  # Extract the first word of "$ac_prog", so it can be a program name with args.
46145set dummy $ac_prog; ac_word=$2
46146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46147$as_echo_n "checking for $ac_word... " >&6; }
46148if ${ac_cv_path_BUILD_AR+:} false; then :
46149  $as_echo_n "(cached) " >&6
46150else
46151  case $BUILD_AR in
46152  [\\/]* | ?:[\\/]*)
46153  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46154  ;;
46155  *)
46156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46157for as_dir in $PATH
46158do
46159  IFS=$as_save_IFS
46160  test -z "$as_dir" && as_dir=.
46161    for ac_exec_ext in '' $ac_executable_extensions; do
46162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46163    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46165    break 2
46166  fi
46167done
46168  done
46169IFS=$as_save_IFS
46170
46171  ;;
46172esac
46173fi
46174BUILD_AR=$ac_cv_path_BUILD_AR
46175if test -n "$BUILD_AR"; then
46176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46177$as_echo "$BUILD_AR" >&6; }
46178else
46179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46180$as_echo "no" >&6; }
46181fi
46182
46183
46184  test -n "$BUILD_AR" && break
46185done
46186
46187  else
46188    # The variable is set, but is it from the command line or the environment?
46189
46190    # Try to remove the string !BUILD_AR! from our list.
46191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46193      # If it failed, the variable was not from the command line. Ignore it,
46194      # but warn the user (except for BASH, which is always set by the calling BASH).
46195      if test "xBUILD_AR" != xBASH; then
46196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46197$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46198      fi
46199      # Try to locate tool using the code snippet
46200      for ac_prog in ar gcc-ar
46201do
46202  # Extract the first word of "$ac_prog", so it can be a program name with args.
46203set dummy $ac_prog; ac_word=$2
46204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46205$as_echo_n "checking for $ac_word... " >&6; }
46206if ${ac_cv_path_BUILD_AR+:} false; then :
46207  $as_echo_n "(cached) " >&6
46208else
46209  case $BUILD_AR in
46210  [\\/]* | ?:[\\/]*)
46211  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46212  ;;
46213  *)
46214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46215for as_dir in $PATH
46216do
46217  IFS=$as_save_IFS
46218  test -z "$as_dir" && as_dir=.
46219    for ac_exec_ext in '' $ac_executable_extensions; do
46220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46221    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46223    break 2
46224  fi
46225done
46226  done
46227IFS=$as_save_IFS
46228
46229  ;;
46230esac
46231fi
46232BUILD_AR=$ac_cv_path_BUILD_AR
46233if test -n "$BUILD_AR"; then
46234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46235$as_echo "$BUILD_AR" >&6; }
46236else
46237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46238$as_echo "no" >&6; }
46239fi
46240
46241
46242  test -n "$BUILD_AR" && break
46243done
46244
46245    else
46246      # If it succeeded, then it was overridden by the user. We will use it
46247      # for the tool.
46248
46249      # First remove it from the list of overridden variables, so we can test
46250      # for unknown variables in the end.
46251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46252
46253      # Check if we try to supply an empty value
46254      if test "x$BUILD_AR" = x; then
46255        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46256$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46258$as_echo_n "checking for BUILD_AR... " >&6; }
46259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46260$as_echo "disabled" >&6; }
46261      else
46262        # Check if the provided tool contains a complete path.
46263        tool_specified="$BUILD_AR"
46264        tool_basename="${tool_specified##*/}"
46265        if test "x$tool_basename" = "x$tool_specified"; then
46266          # A command without a complete path is provided, search $PATH.
46267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46268$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46269          # Extract the first word of "$tool_basename", so it can be a program name with args.
46270set dummy $tool_basename; ac_word=$2
46271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46272$as_echo_n "checking for $ac_word... " >&6; }
46273if ${ac_cv_path_BUILD_AR+:} false; then :
46274  $as_echo_n "(cached) " >&6
46275else
46276  case $BUILD_AR in
46277  [\\/]* | ?:[\\/]*)
46278  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46279  ;;
46280  *)
46281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46282for as_dir in $PATH
46283do
46284  IFS=$as_save_IFS
46285  test -z "$as_dir" && as_dir=.
46286    for ac_exec_ext in '' $ac_executable_extensions; do
46287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46288    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46290    break 2
46291  fi
46292done
46293  done
46294IFS=$as_save_IFS
46295
46296  ;;
46297esac
46298fi
46299BUILD_AR=$ac_cv_path_BUILD_AR
46300if test -n "$BUILD_AR"; then
46301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46302$as_echo "$BUILD_AR" >&6; }
46303else
46304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46305$as_echo "no" >&6; }
46306fi
46307
46308
46309          if test "x$BUILD_AR" = x; then
46310            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46311          fi
46312        else
46313          # Otherwise we believe it is a complete path. Use it as it is.
46314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46315$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46316          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46317$as_echo_n "checking for BUILD_AR... " >&6; }
46318          if test ! -x "$tool_specified"; then
46319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46320$as_echo "not found" >&6; }
46321            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46322          fi
46323          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46324$as_echo "$tool_specified" >&6; }
46325        fi
46326      fi
46327    fi
46328
46329  fi
46330
46331
46332
46333  # Only process if variable expands to non-empty
46334
46335  if test "x$BUILD_AR" != x; then
46336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46337
46338  # First separate the path from the arguments. This will split at the first
46339  # space.
46340  complete="$BUILD_AR"
46341  path="${complete%% *}"
46342  tmp="$complete EOL"
46343  arguments="${tmp#* }"
46344
46345  # Input might be given as Windows format, start by converting to
46346  # unix format.
46347  new_path=`$CYGPATH -u "$path"`
46348
46349  # Now try to locate executable using which
46350  new_path=`$WHICH "$new_path" 2> /dev/null`
46351  # bat and cmd files are not always considered executable in cygwin causing which
46352  # to not find them
46353  if test "x$new_path" = x \
46354      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46355      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46356    new_path=`$CYGPATH -u "$path"`
46357  fi
46358  if test "x$new_path" = x; then
46359    # Oops. Which didn't find the executable.
46360    # The splitting of arguments from the executable at a space might have been incorrect,
46361    # since paths with space are more likely in Windows. Give it another try with the whole
46362    # argument.
46363    path="$complete"
46364    arguments="EOL"
46365    new_path=`$CYGPATH -u "$path"`
46366    new_path=`$WHICH "$new_path" 2> /dev/null`
46367    # bat and cmd files are not always considered executable in cygwin causing which
46368    # to not find them
46369    if test "x$new_path" = x \
46370        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46371        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46372      new_path=`$CYGPATH -u "$path"`
46373    fi
46374    if test "x$new_path" = x; then
46375      # It's still not found. Now this is an unrecoverable error.
46376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46377$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46378      has_space=`$ECHO "$complete" | $GREP " "`
46379      if test "x$has_space" != x; then
46380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46382      fi
46383      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46384    fi
46385  fi
46386
46387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46390  # "foo.exe" is OK but "foo" is an error.
46391  #
46392  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46393  # It is also a way to make sure we got the proper file name for the real test later on.
46394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46395  if test "x$test_shortpath" = x; then
46396    # Short path failed, file does not exist as specified.
46397    # Try adding .exe or .cmd
46398    if test -f "${new_path}.exe"; then
46399      input_to_shortpath="${new_path}.exe"
46400    elif test -f "${new_path}.cmd"; then
46401      input_to_shortpath="${new_path}.cmd"
46402    else
46403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46404$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46407      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46408    fi
46409  else
46410    input_to_shortpath="$new_path"
46411  fi
46412
46413  # Call helper function which possibly converts this using DOS-style short mode.
46414  # If so, the updated path is stored in $new_path.
46415  new_path="$input_to_shortpath"
46416
46417  input_path="$input_to_shortpath"
46418  # Check if we need to convert this using DOS-style short mode. If the path
46419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46420  # take no chances and rewrite it.
46421  # Note: m4 eats our [], so we need to use [ and ] instead.
46422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46423  if test "x$has_forbidden_chars" != x; then
46424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46428      # Going to short mode and back again did indeed matter. Since short mode is
46429      # case insensitive, let's make it lowercase to improve readability.
46430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46431      # Now convert it back to Unix-style (cygpath)
46432      input_path=`$CYGPATH -u "$shortmode_path"`
46433      new_path="$input_path"
46434    fi
46435  fi
46436
46437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46438  if test "x$test_cygdrive_prefix" = x; then
46439    # As a simple fix, exclude /usr/bin since it's not a real path.
46440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46442      # a path prefixed by /cygdrive for fixpath to work.
46443      new_path="$CYGWIN_ROOT_PATH$input_path"
46444    fi
46445  fi
46446
46447  # remove trailing .exe if any
46448  new_path="${new_path/%.exe/}"
46449
46450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46451
46452  # First separate the path from the arguments. This will split at the first
46453  # space.
46454  complete="$BUILD_AR"
46455  path="${complete%% *}"
46456  tmp="$complete EOL"
46457  arguments="${tmp#* }"
46458
46459  # Input might be given as Windows format, start by converting to
46460  # unix format.
46461  new_path="$path"
46462
46463  windows_path="$new_path"
46464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46465    unix_path=`$CYGPATH -u "$windows_path"`
46466    new_path="$unix_path"
46467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46469    new_path="$unix_path"
46470  fi
46471
46472
46473  # Now try to locate executable using which
46474  new_path=`$WHICH "$new_path" 2> /dev/null`
46475
46476  if test "x$new_path" = x; then
46477    # Oops. Which didn't find the executable.
46478    # The splitting of arguments from the executable at a space might have been incorrect,
46479    # since paths with space are more likely in Windows. Give it another try with the whole
46480    # argument.
46481    path="$complete"
46482    arguments="EOL"
46483    new_path="$path"
46484
46485  windows_path="$new_path"
46486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46487    unix_path=`$CYGPATH -u "$windows_path"`
46488    new_path="$unix_path"
46489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46491    new_path="$unix_path"
46492  fi
46493
46494
46495    new_path=`$WHICH "$new_path" 2> /dev/null`
46496    # bat and cmd files are not always considered executable in MSYS causing which
46497    # to not find them
46498    if test "x$new_path" = x \
46499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46501      new_path="$path"
46502
46503  windows_path="$new_path"
46504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46505    unix_path=`$CYGPATH -u "$windows_path"`
46506    new_path="$unix_path"
46507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46509    new_path="$unix_path"
46510  fi
46511
46512    fi
46513
46514    if test "x$new_path" = x; then
46515      # It's still not found. Now this is an unrecoverable error.
46516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46517$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46518      has_space=`$ECHO "$complete" | $GREP " "`
46519      if test "x$has_space" != x; then
46520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46522      fi
46523      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46524    fi
46525  fi
46526
46527  # Now new_path has a complete unix path to the binary
46528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46529    # Keep paths in /bin as-is, but remove trailing .exe if any
46530    new_path="${new_path/%.exe/}"
46531    # Do not save /bin paths to all_fixpath_prefixes!
46532  else
46533    # Not in mixed or Windows style, start by that.
46534    new_path=`cmd //c echo $new_path`
46535
46536  input_path="$new_path"
46537  # Check if we need to convert this using DOS-style short mode. If the path
46538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46539  # take no chances and rewrite it.
46540  # Note: m4 eats our [], so we need to use [ and ] instead.
46541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46542  if test "x$has_forbidden_chars" != x; then
46543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46545  fi
46546
46547    # Output is in $new_path
46548
46549  windows_path="$new_path"
46550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46551    unix_path=`$CYGPATH -u "$windows_path"`
46552    new_path="$unix_path"
46553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46555    new_path="$unix_path"
46556  fi
46557
46558    # remove trailing .exe if any
46559    new_path="${new_path/%.exe/}"
46560
46561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46563  fi
46564
46565    else
46566      # We're on a unix platform. Hooray! :)
46567      # First separate the path from the arguments. This will split at the first
46568      # space.
46569      complete="$BUILD_AR"
46570      path="${complete%% *}"
46571      tmp="$complete EOL"
46572      arguments="${tmp#* }"
46573
46574      # Cannot rely on the command "which" here since it doesn't always work.
46575      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46576      if test -z "$is_absolute_path"; then
46577        # Path to executable is not absolute. Find it.
46578        IFS_save="$IFS"
46579        IFS=:
46580        for p in $PATH; do
46581          if test -f "$p/$path" && test -x "$p/$path"; then
46582            new_path="$p/$path"
46583            break
46584          fi
46585        done
46586        IFS="$IFS_save"
46587      else
46588        # This is an absolute path, we can use it without further modifications.
46589        new_path="$path"
46590      fi
46591
46592      if test "x$new_path" = x; then
46593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46594$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46595        has_space=`$ECHO "$complete" | $GREP " "`
46596        if test "x$has_space" != x; then
46597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46599        fi
46600        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46601      fi
46602    fi
46603
46604    # Now join together the path and the arguments once again
46605    if test "x$arguments" != xEOL; then
46606      new_complete="$new_path ${arguments% *}"
46607    else
46608      new_complete="$new_path"
46609    fi
46610
46611    if test "x$complete" != "x$new_complete"; then
46612      BUILD_AR="$new_complete"
46613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46614$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46615    fi
46616  fi
46617
46618
46619
46620  # Publish this variable in the help.
46621
46622
46623  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46624    # The variable is not set by user, try to locate tool using the code snippet
46625    for ac_prog in objcopy
46626do
46627  # Extract the first word of "$ac_prog", so it can be a program name with args.
46628set dummy $ac_prog; ac_word=$2
46629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46630$as_echo_n "checking for $ac_word... " >&6; }
46631if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46632  $as_echo_n "(cached) " >&6
46633else
46634  case $BUILD_OBJCOPY in
46635  [\\/]* | ?:[\\/]*)
46636  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46637  ;;
46638  *)
46639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46640for as_dir in $PATH
46641do
46642  IFS=$as_save_IFS
46643  test -z "$as_dir" && as_dir=.
46644    for ac_exec_ext in '' $ac_executable_extensions; do
46645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46646    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46648    break 2
46649  fi
46650done
46651  done
46652IFS=$as_save_IFS
46653
46654  ;;
46655esac
46656fi
46657BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46658if test -n "$BUILD_OBJCOPY"; then
46659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46660$as_echo "$BUILD_OBJCOPY" >&6; }
46661else
46662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46663$as_echo "no" >&6; }
46664fi
46665
46666
46667  test -n "$BUILD_OBJCOPY" && break
46668done
46669
46670  else
46671    # The variable is set, but is it from the command line or the environment?
46672
46673    # Try to remove the string !BUILD_OBJCOPY! from our list.
46674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46676      # If it failed, the variable was not from the command line. Ignore it,
46677      # but warn the user (except for BASH, which is always set by the calling BASH).
46678      if test "xBUILD_OBJCOPY" != xBASH; then
46679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46680$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46681      fi
46682      # Try to locate tool using the code snippet
46683      for ac_prog in objcopy
46684do
46685  # Extract the first word of "$ac_prog", so it can be a program name with args.
46686set dummy $ac_prog; ac_word=$2
46687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46688$as_echo_n "checking for $ac_word... " >&6; }
46689if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46690  $as_echo_n "(cached) " >&6
46691else
46692  case $BUILD_OBJCOPY in
46693  [\\/]* | ?:[\\/]*)
46694  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46695  ;;
46696  *)
46697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46698for as_dir in $PATH
46699do
46700  IFS=$as_save_IFS
46701  test -z "$as_dir" && as_dir=.
46702    for ac_exec_ext in '' $ac_executable_extensions; do
46703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46704    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46706    break 2
46707  fi
46708done
46709  done
46710IFS=$as_save_IFS
46711
46712  ;;
46713esac
46714fi
46715BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46716if test -n "$BUILD_OBJCOPY"; then
46717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46718$as_echo "$BUILD_OBJCOPY" >&6; }
46719else
46720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46721$as_echo "no" >&6; }
46722fi
46723
46724
46725  test -n "$BUILD_OBJCOPY" && break
46726done
46727
46728    else
46729      # If it succeeded, then it was overridden by the user. We will use it
46730      # for the tool.
46731
46732      # First remove it from the list of overridden variables, so we can test
46733      # for unknown variables in the end.
46734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46735
46736      # Check if we try to supply an empty value
46737      if test "x$BUILD_OBJCOPY" = x; then
46738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46739$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46741$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46743$as_echo "disabled" >&6; }
46744      else
46745        # Check if the provided tool contains a complete path.
46746        tool_specified="$BUILD_OBJCOPY"
46747        tool_basename="${tool_specified##*/}"
46748        if test "x$tool_basename" = "x$tool_specified"; then
46749          # A command without a complete path is provided, search $PATH.
46750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46751$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46752          # Extract the first word of "$tool_basename", so it can be a program name with args.
46753set dummy $tool_basename; ac_word=$2
46754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46755$as_echo_n "checking for $ac_word... " >&6; }
46756if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46757  $as_echo_n "(cached) " >&6
46758else
46759  case $BUILD_OBJCOPY in
46760  [\\/]* | ?:[\\/]*)
46761  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46762  ;;
46763  *)
46764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46765for as_dir in $PATH
46766do
46767  IFS=$as_save_IFS
46768  test -z "$as_dir" && as_dir=.
46769    for ac_exec_ext in '' $ac_executable_extensions; do
46770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46771    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46773    break 2
46774  fi
46775done
46776  done
46777IFS=$as_save_IFS
46778
46779  ;;
46780esac
46781fi
46782BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46783if test -n "$BUILD_OBJCOPY"; then
46784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46785$as_echo "$BUILD_OBJCOPY" >&6; }
46786else
46787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46788$as_echo "no" >&6; }
46789fi
46790
46791
46792          if test "x$BUILD_OBJCOPY" = x; then
46793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46794          fi
46795        else
46796          # Otherwise we believe it is a complete path. Use it as it is.
46797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46798$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46800$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46801          if test ! -x "$tool_specified"; then
46802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46803$as_echo "not found" >&6; }
46804            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46805          fi
46806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46807$as_echo "$tool_specified" >&6; }
46808        fi
46809      fi
46810    fi
46811
46812  fi
46813
46814
46815
46816  # Only process if variable expands to non-empty
46817
46818  if test "x$BUILD_OBJCOPY" != x; then
46819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820
46821  # First separate the path from the arguments. This will split at the first
46822  # space.
46823  complete="$BUILD_OBJCOPY"
46824  path="${complete%% *}"
46825  tmp="$complete EOL"
46826  arguments="${tmp#* }"
46827
46828  # Input might be given as Windows format, start by converting to
46829  # unix format.
46830  new_path=`$CYGPATH -u "$path"`
46831
46832  # Now try to locate executable using which
46833  new_path=`$WHICH "$new_path" 2> /dev/null`
46834  # bat and cmd files are not always considered executable in cygwin causing which
46835  # to not find them
46836  if test "x$new_path" = x \
46837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46839    new_path=`$CYGPATH -u "$path"`
46840  fi
46841  if test "x$new_path" = x; then
46842    # Oops. Which didn't find the executable.
46843    # The splitting of arguments from the executable at a space might have been incorrect,
46844    # since paths with space are more likely in Windows. Give it another try with the whole
46845    # argument.
46846    path="$complete"
46847    arguments="EOL"
46848    new_path=`$CYGPATH -u "$path"`
46849    new_path=`$WHICH "$new_path" 2> /dev/null`
46850    # bat and cmd files are not always considered executable in cygwin causing which
46851    # to not find them
46852    if test "x$new_path" = x \
46853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46855      new_path=`$CYGPATH -u "$path"`
46856    fi
46857    if test "x$new_path" = x; then
46858      # It's still not found. Now this is an unrecoverable error.
46859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46860$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46861      has_space=`$ECHO "$complete" | $GREP " "`
46862      if test "x$has_space" != x; then
46863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46865      fi
46866      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46867    fi
46868  fi
46869
46870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46873  # "foo.exe" is OK but "foo" is an error.
46874  #
46875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46876  # It is also a way to make sure we got the proper file name for the real test later on.
46877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46878  if test "x$test_shortpath" = x; then
46879    # Short path failed, file does not exist as specified.
46880    # Try adding .exe or .cmd
46881    if test -f "${new_path}.exe"; then
46882      input_to_shortpath="${new_path}.exe"
46883    elif test -f "${new_path}.cmd"; then
46884      input_to_shortpath="${new_path}.cmd"
46885    else
46886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46887$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46890      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46891    fi
46892  else
46893    input_to_shortpath="$new_path"
46894  fi
46895
46896  # Call helper function which possibly converts this using DOS-style short mode.
46897  # If so, the updated path is stored in $new_path.
46898  new_path="$input_to_shortpath"
46899
46900  input_path="$input_to_shortpath"
46901  # Check if we need to convert this using DOS-style short mode. If the path
46902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46903  # take no chances and rewrite it.
46904  # Note: m4 eats our [], so we need to use [ and ] instead.
46905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46906  if test "x$has_forbidden_chars" != x; then
46907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46911      # Going to short mode and back again did indeed matter. Since short mode is
46912      # case insensitive, let's make it lowercase to improve readability.
46913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46914      # Now convert it back to Unix-style (cygpath)
46915      input_path=`$CYGPATH -u "$shortmode_path"`
46916      new_path="$input_path"
46917    fi
46918  fi
46919
46920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46921  if test "x$test_cygdrive_prefix" = x; then
46922    # As a simple fix, exclude /usr/bin since it's not a real path.
46923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46925      # a path prefixed by /cygdrive for fixpath to work.
46926      new_path="$CYGWIN_ROOT_PATH$input_path"
46927    fi
46928  fi
46929
46930  # remove trailing .exe if any
46931  new_path="${new_path/%.exe/}"
46932
46933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46934
46935  # First separate the path from the arguments. This will split at the first
46936  # space.
46937  complete="$BUILD_OBJCOPY"
46938  path="${complete%% *}"
46939  tmp="$complete EOL"
46940  arguments="${tmp#* }"
46941
46942  # Input might be given as Windows format, start by converting to
46943  # unix format.
46944  new_path="$path"
46945
46946  windows_path="$new_path"
46947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46948    unix_path=`$CYGPATH -u "$windows_path"`
46949    new_path="$unix_path"
46950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46952    new_path="$unix_path"
46953  fi
46954
46955
46956  # Now try to locate executable using which
46957  new_path=`$WHICH "$new_path" 2> /dev/null`
46958
46959  if test "x$new_path" = x; then
46960    # Oops. Which didn't find the executable.
46961    # The splitting of arguments from the executable at a space might have been incorrect,
46962    # since paths with space are more likely in Windows. Give it another try with the whole
46963    # argument.
46964    path="$complete"
46965    arguments="EOL"
46966    new_path="$path"
46967
46968  windows_path="$new_path"
46969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46970    unix_path=`$CYGPATH -u "$windows_path"`
46971    new_path="$unix_path"
46972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46974    new_path="$unix_path"
46975  fi
46976
46977
46978    new_path=`$WHICH "$new_path" 2> /dev/null`
46979    # bat and cmd files are not always considered executable in MSYS causing which
46980    # to not find them
46981    if test "x$new_path" = x \
46982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46984      new_path="$path"
46985
46986  windows_path="$new_path"
46987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46988    unix_path=`$CYGPATH -u "$windows_path"`
46989    new_path="$unix_path"
46990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46992    new_path="$unix_path"
46993  fi
46994
46995    fi
46996
46997    if test "x$new_path" = x; then
46998      # It's still not found. Now this is an unrecoverable error.
46999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47000$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47001      has_space=`$ECHO "$complete" | $GREP " "`
47002      if test "x$has_space" != x; then
47003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47005      fi
47006      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47007    fi
47008  fi
47009
47010  # Now new_path has a complete unix path to the binary
47011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47012    # Keep paths in /bin as-is, but remove trailing .exe if any
47013    new_path="${new_path/%.exe/}"
47014    # Do not save /bin paths to all_fixpath_prefixes!
47015  else
47016    # Not in mixed or Windows style, start by that.
47017    new_path=`cmd //c echo $new_path`
47018
47019  input_path="$new_path"
47020  # Check if we need to convert this using DOS-style short mode. If the path
47021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47022  # take no chances and rewrite it.
47023  # Note: m4 eats our [], so we need to use [ and ] instead.
47024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47025  if test "x$has_forbidden_chars" != x; then
47026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47028  fi
47029
47030    # Output is in $new_path
47031
47032  windows_path="$new_path"
47033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47034    unix_path=`$CYGPATH -u "$windows_path"`
47035    new_path="$unix_path"
47036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47038    new_path="$unix_path"
47039  fi
47040
47041    # remove trailing .exe if any
47042    new_path="${new_path/%.exe/}"
47043
47044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47046  fi
47047
47048    else
47049      # We're on a unix platform. Hooray! :)
47050      # First separate the path from the arguments. This will split at the first
47051      # space.
47052      complete="$BUILD_OBJCOPY"
47053      path="${complete%% *}"
47054      tmp="$complete EOL"
47055      arguments="${tmp#* }"
47056
47057      # Cannot rely on the command "which" here since it doesn't always work.
47058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47059      if test -z "$is_absolute_path"; then
47060        # Path to executable is not absolute. Find it.
47061        IFS_save="$IFS"
47062        IFS=:
47063        for p in $PATH; do
47064          if test -f "$p/$path" && test -x "$p/$path"; then
47065            new_path="$p/$path"
47066            break
47067          fi
47068        done
47069        IFS="$IFS_save"
47070      else
47071        # This is an absolute path, we can use it without further modifications.
47072        new_path="$path"
47073      fi
47074
47075      if test "x$new_path" = x; then
47076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47077$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47078        has_space=`$ECHO "$complete" | $GREP " "`
47079        if test "x$has_space" != x; then
47080          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47082        fi
47083        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47084      fi
47085    fi
47086
47087    # Now join together the path and the arguments once again
47088    if test "x$arguments" != xEOL; then
47089      new_complete="$new_path ${arguments% *}"
47090    else
47091      new_complete="$new_path"
47092    fi
47093
47094    if test "x$complete" != "x$new_complete"; then
47095      BUILD_OBJCOPY="$new_complete"
47096      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47097$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47098    fi
47099  fi
47100
47101
47102
47103  # Publish this variable in the help.
47104
47105
47106  if [ -z "${BUILD_STRIP+x}" ]; then
47107    # The variable is not set by user, try to locate tool using the code snippet
47108    for ac_prog in strip
47109do
47110  # Extract the first word of "$ac_prog", so it can be a program name with args.
47111set dummy $ac_prog; ac_word=$2
47112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47113$as_echo_n "checking for $ac_word... " >&6; }
47114if ${ac_cv_path_BUILD_STRIP+:} false; then :
47115  $as_echo_n "(cached) " >&6
47116else
47117  case $BUILD_STRIP in
47118  [\\/]* | ?:[\\/]*)
47119  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47120  ;;
47121  *)
47122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47123for as_dir in $PATH
47124do
47125  IFS=$as_save_IFS
47126  test -z "$as_dir" && as_dir=.
47127    for ac_exec_ext in '' $ac_executable_extensions; do
47128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47129    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47131    break 2
47132  fi
47133done
47134  done
47135IFS=$as_save_IFS
47136
47137  ;;
47138esac
47139fi
47140BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47141if test -n "$BUILD_STRIP"; then
47142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47143$as_echo "$BUILD_STRIP" >&6; }
47144else
47145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47146$as_echo "no" >&6; }
47147fi
47148
47149
47150  test -n "$BUILD_STRIP" && break
47151done
47152
47153  else
47154    # The variable is set, but is it from the command line or the environment?
47155
47156    # Try to remove the string !BUILD_STRIP! from our list.
47157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47159      # If it failed, the variable was not from the command line. Ignore it,
47160      # but warn the user (except for BASH, which is always set by the calling BASH).
47161      if test "xBUILD_STRIP" != xBASH; then
47162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47163$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47164      fi
47165      # Try to locate tool using the code snippet
47166      for ac_prog in strip
47167do
47168  # Extract the first word of "$ac_prog", so it can be a program name with args.
47169set dummy $ac_prog; ac_word=$2
47170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47171$as_echo_n "checking for $ac_word... " >&6; }
47172if ${ac_cv_path_BUILD_STRIP+:} false; then :
47173  $as_echo_n "(cached) " >&6
47174else
47175  case $BUILD_STRIP in
47176  [\\/]* | ?:[\\/]*)
47177  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47178  ;;
47179  *)
47180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47181for as_dir in $PATH
47182do
47183  IFS=$as_save_IFS
47184  test -z "$as_dir" && as_dir=.
47185    for ac_exec_ext in '' $ac_executable_extensions; do
47186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47187    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47189    break 2
47190  fi
47191done
47192  done
47193IFS=$as_save_IFS
47194
47195  ;;
47196esac
47197fi
47198BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47199if test -n "$BUILD_STRIP"; then
47200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47201$as_echo "$BUILD_STRIP" >&6; }
47202else
47203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47204$as_echo "no" >&6; }
47205fi
47206
47207
47208  test -n "$BUILD_STRIP" && break
47209done
47210
47211    else
47212      # If it succeeded, then it was overridden by the user. We will use it
47213      # for the tool.
47214
47215      # First remove it from the list of overridden variables, so we can test
47216      # for unknown variables in the end.
47217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47218
47219      # Check if we try to supply an empty value
47220      if test "x$BUILD_STRIP" = x; then
47221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47222$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47224$as_echo_n "checking for BUILD_STRIP... " >&6; }
47225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47226$as_echo "disabled" >&6; }
47227      else
47228        # Check if the provided tool contains a complete path.
47229        tool_specified="$BUILD_STRIP"
47230        tool_basename="${tool_specified##*/}"
47231        if test "x$tool_basename" = "x$tool_specified"; then
47232          # A command without a complete path is provided, search $PATH.
47233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47234$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47235          # Extract the first word of "$tool_basename", so it can be a program name with args.
47236set dummy $tool_basename; ac_word=$2
47237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47238$as_echo_n "checking for $ac_word... " >&6; }
47239if ${ac_cv_path_BUILD_STRIP+:} false; then :
47240  $as_echo_n "(cached) " >&6
47241else
47242  case $BUILD_STRIP in
47243  [\\/]* | ?:[\\/]*)
47244  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47245  ;;
47246  *)
47247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47248for as_dir in $PATH
47249do
47250  IFS=$as_save_IFS
47251  test -z "$as_dir" && as_dir=.
47252    for ac_exec_ext in '' $ac_executable_extensions; do
47253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47254    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47256    break 2
47257  fi
47258done
47259  done
47260IFS=$as_save_IFS
47261
47262  ;;
47263esac
47264fi
47265BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47266if test -n "$BUILD_STRIP"; then
47267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47268$as_echo "$BUILD_STRIP" >&6; }
47269else
47270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47271$as_echo "no" >&6; }
47272fi
47273
47274
47275          if test "x$BUILD_STRIP" = x; then
47276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47277          fi
47278        else
47279          # Otherwise we believe it is a complete path. Use it as it is.
47280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47281$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47283$as_echo_n "checking for BUILD_STRIP... " >&6; }
47284          if test ! -x "$tool_specified"; then
47285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47286$as_echo "not found" >&6; }
47287            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47288          fi
47289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47290$as_echo "$tool_specified" >&6; }
47291        fi
47292      fi
47293    fi
47294
47295  fi
47296
47297
47298
47299  # Only process if variable expands to non-empty
47300
47301  if test "x$BUILD_STRIP" != x; then
47302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47303
47304  # First separate the path from the arguments. This will split at the first
47305  # space.
47306  complete="$BUILD_STRIP"
47307  path="${complete%% *}"
47308  tmp="$complete EOL"
47309  arguments="${tmp#* }"
47310
47311  # Input might be given as Windows format, start by converting to
47312  # unix format.
47313  new_path=`$CYGPATH -u "$path"`
47314
47315  # Now try to locate executable using which
47316  new_path=`$WHICH "$new_path" 2> /dev/null`
47317  # bat and cmd files are not always considered executable in cygwin causing which
47318  # to not find them
47319  if test "x$new_path" = x \
47320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47322    new_path=`$CYGPATH -u "$path"`
47323  fi
47324  if test "x$new_path" = x; then
47325    # Oops. Which didn't find the executable.
47326    # The splitting of arguments from the executable at a space might have been incorrect,
47327    # since paths with space are more likely in Windows. Give it another try with the whole
47328    # argument.
47329    path="$complete"
47330    arguments="EOL"
47331    new_path=`$CYGPATH -u "$path"`
47332    new_path=`$WHICH "$new_path" 2> /dev/null`
47333    # bat and cmd files are not always considered executable in cygwin causing which
47334    # to not find them
47335    if test "x$new_path" = x \
47336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47338      new_path=`$CYGPATH -u "$path"`
47339    fi
47340    if test "x$new_path" = x; then
47341      # It's still not found. Now this is an unrecoverable error.
47342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47343$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47344      has_space=`$ECHO "$complete" | $GREP " "`
47345      if test "x$has_space" != x; then
47346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47348      fi
47349      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47350    fi
47351  fi
47352
47353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47356  # "foo.exe" is OK but "foo" is an error.
47357  #
47358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47359  # It is also a way to make sure we got the proper file name for the real test later on.
47360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47361  if test "x$test_shortpath" = x; then
47362    # Short path failed, file does not exist as specified.
47363    # Try adding .exe or .cmd
47364    if test -f "${new_path}.exe"; then
47365      input_to_shortpath="${new_path}.exe"
47366    elif test -f "${new_path}.cmd"; then
47367      input_to_shortpath="${new_path}.cmd"
47368    else
47369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47370$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47373      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47374    fi
47375  else
47376    input_to_shortpath="$new_path"
47377  fi
47378
47379  # Call helper function which possibly converts this using DOS-style short mode.
47380  # If so, the updated path is stored in $new_path.
47381  new_path="$input_to_shortpath"
47382
47383  input_path="$input_to_shortpath"
47384  # Check if we need to convert this using DOS-style short mode. If the path
47385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47386  # take no chances and rewrite it.
47387  # Note: m4 eats our [], so we need to use [ and ] instead.
47388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47389  if test "x$has_forbidden_chars" != x; then
47390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47394      # Going to short mode and back again did indeed matter. Since short mode is
47395      # case insensitive, let's make it lowercase to improve readability.
47396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47397      # Now convert it back to Unix-style (cygpath)
47398      input_path=`$CYGPATH -u "$shortmode_path"`
47399      new_path="$input_path"
47400    fi
47401  fi
47402
47403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47404  if test "x$test_cygdrive_prefix" = x; then
47405    # As a simple fix, exclude /usr/bin since it's not a real path.
47406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47408      # a path prefixed by /cygdrive for fixpath to work.
47409      new_path="$CYGWIN_ROOT_PATH$input_path"
47410    fi
47411  fi
47412
47413  # remove trailing .exe if any
47414  new_path="${new_path/%.exe/}"
47415
47416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47417
47418  # First separate the path from the arguments. This will split at the first
47419  # space.
47420  complete="$BUILD_STRIP"
47421  path="${complete%% *}"
47422  tmp="$complete EOL"
47423  arguments="${tmp#* }"
47424
47425  # Input might be given as Windows format, start by converting to
47426  # unix format.
47427  new_path="$path"
47428
47429  windows_path="$new_path"
47430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47431    unix_path=`$CYGPATH -u "$windows_path"`
47432    new_path="$unix_path"
47433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47435    new_path="$unix_path"
47436  fi
47437
47438
47439  # Now try to locate executable using which
47440  new_path=`$WHICH "$new_path" 2> /dev/null`
47441
47442  if test "x$new_path" = x; then
47443    # Oops. Which didn't find the executable.
47444    # The splitting of arguments from the executable at a space might have been incorrect,
47445    # since paths with space are more likely in Windows. Give it another try with the whole
47446    # argument.
47447    path="$complete"
47448    arguments="EOL"
47449    new_path="$path"
47450
47451  windows_path="$new_path"
47452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47453    unix_path=`$CYGPATH -u "$windows_path"`
47454    new_path="$unix_path"
47455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47457    new_path="$unix_path"
47458  fi
47459
47460
47461    new_path=`$WHICH "$new_path" 2> /dev/null`
47462    # bat and cmd files are not always considered executable in MSYS causing which
47463    # to not find them
47464    if test "x$new_path" = x \
47465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47467      new_path="$path"
47468
47469  windows_path="$new_path"
47470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47471    unix_path=`$CYGPATH -u "$windows_path"`
47472    new_path="$unix_path"
47473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47475    new_path="$unix_path"
47476  fi
47477
47478    fi
47479
47480    if test "x$new_path" = x; then
47481      # It's still not found. Now this is an unrecoverable error.
47482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47483$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47484      has_space=`$ECHO "$complete" | $GREP " "`
47485      if test "x$has_space" != x; then
47486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47488      fi
47489      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47490    fi
47491  fi
47492
47493  # Now new_path has a complete unix path to the binary
47494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47495    # Keep paths in /bin as-is, but remove trailing .exe if any
47496    new_path="${new_path/%.exe/}"
47497    # Do not save /bin paths to all_fixpath_prefixes!
47498  else
47499    # Not in mixed or Windows style, start by that.
47500    new_path=`cmd //c echo $new_path`
47501
47502  input_path="$new_path"
47503  # Check if we need to convert this using DOS-style short mode. If the path
47504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47505  # take no chances and rewrite it.
47506  # Note: m4 eats our [], so we need to use [ and ] instead.
47507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47508  if test "x$has_forbidden_chars" != x; then
47509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47511  fi
47512
47513    # Output is in $new_path
47514
47515  windows_path="$new_path"
47516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47517    unix_path=`$CYGPATH -u "$windows_path"`
47518    new_path="$unix_path"
47519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47521    new_path="$unix_path"
47522  fi
47523
47524    # remove trailing .exe if any
47525    new_path="${new_path/%.exe/}"
47526
47527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47529  fi
47530
47531    else
47532      # We're on a unix platform. Hooray! :)
47533      # First separate the path from the arguments. This will split at the first
47534      # space.
47535      complete="$BUILD_STRIP"
47536      path="${complete%% *}"
47537      tmp="$complete EOL"
47538      arguments="${tmp#* }"
47539
47540      # Cannot rely on the command "which" here since it doesn't always work.
47541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47542      if test -z "$is_absolute_path"; then
47543        # Path to executable is not absolute. Find it.
47544        IFS_save="$IFS"
47545        IFS=:
47546        for p in $PATH; do
47547          if test -f "$p/$path" && test -x "$p/$path"; then
47548            new_path="$p/$path"
47549            break
47550          fi
47551        done
47552        IFS="$IFS_save"
47553      else
47554        # This is an absolute path, we can use it without further modifications.
47555        new_path="$path"
47556      fi
47557
47558      if test "x$new_path" = x; then
47559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47560$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47561        has_space=`$ECHO "$complete" | $GREP " "`
47562        if test "x$has_space" != x; then
47563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47565        fi
47566        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47567      fi
47568    fi
47569
47570    # Now join together the path and the arguments once again
47571    if test "x$arguments" != xEOL; then
47572      new_complete="$new_path ${arguments% *}"
47573    else
47574      new_complete="$new_path"
47575    fi
47576
47577    if test "x$complete" != "x$new_complete"; then
47578      BUILD_STRIP="$new_complete"
47579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47580$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47581    fi
47582  fi
47583
47584    # Assume the C compiler is the assembler
47585    BUILD_AS="$BUILD_CC -c"
47586    # Just like for the target compiler, use the compiler as linker
47587    BUILD_LD="$BUILD_CC"
47588    BUILD_LDCXX="$BUILD_CXX"
47589
47590    PATH="$OLDPATH"
47591
47592
47593  COMPILER=$BUILD_CC
47594  COMPILER_NAME=BuildC
47595
47596  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47597    # cc -V output typically looks like
47598    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47599    # or
47600    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47601    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47602    # Check that this is likely to be the Solaris Studio cc.
47603    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47604    if test $? -ne 0; then
47605      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47606      { $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
47607$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47608      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47609$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47611$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47612      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47613    fi
47614    # Remove usage instructions (if present), and
47615    # collapse compiler output into a single line
47616    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47617        $SED -e 's/ *[Uu]sage:.*//'`
47618    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47619        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47620  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47621    # xlc -qversion output typically looks like
47622    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47623    #     Version: 11.01.0000.0015
47624    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47625    # Check that this is likely to be the IBM XL C compiler.
47626    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47627    if test $? -ne 0; then
47628      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47629      { $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
47630$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47631      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47632$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47633      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47634$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47635      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47636    fi
47637    # Collapse compiler output into a single line
47638    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47639    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47640        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47641  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47642    # There is no specific version flag, but all output starts with a version string.
47643    # First line typically looks something like:
47644    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47645    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47646    # Check that this is likely to be Microsoft CL.EXE.
47647    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47648    if test $? -ne 0; then
47649      { $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
47650$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47651      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47652$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47653      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47654    fi
47655    # Collapse compiler output into a single line
47656    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47657    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47658        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47659  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47660    # gcc --version output typically looks like
47661    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47662    #     Copyright (C) 2013 Free Software Foundation, Inc.
47663    #     This is free software; see the source for copying conditions.  There is NO
47664    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47665    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47666    # Check that this is likely to be GCC.
47667    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47668    if test $? -ne 0; then
47669      { $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
47670$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47671      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47672$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47673      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47674    fi
47675    # Remove Copyright and legalese from version string, and
47676    # collapse into a single line
47677    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47678        $SED -e 's/ *Copyright .*//'`
47679    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47680        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47681  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47682    # clang --version output typically looks like
47683    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47684    #    clang version 3.3 (tags/RELEASE_33/final)
47685    # or
47686    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47687    #    Target: x86_64-pc-linux-gnu
47688    #    Thread model: posix
47689    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47690    # Check that this is likely to be clang
47691    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47692    if test $? -ne 0; then
47693      { $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
47694$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47695      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47696$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47697      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47698    fi
47699    # Collapse compiler output into a single line
47700    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47701    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47702        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47703  else
47704      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47705  fi
47706  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47707  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47708  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47709  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47710
47711  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47712$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47713
47714
47715  COMPILER=$BUILD_CXX
47716  COMPILER_NAME=BuildC++
47717
47718  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47719    # cc -V output typically looks like
47720    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47721    # or
47722    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47723    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47724    # Check that this is likely to be the Solaris Studio cc.
47725    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47726    if test $? -ne 0; then
47727      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47728      { $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
47729$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47730      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47731$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47732      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47733$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47734      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47735    fi
47736    # Remove usage instructions (if present), and
47737    # collapse compiler output into a single line
47738    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47739        $SED -e 's/ *[Uu]sage:.*//'`
47740    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47741        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47742  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47743    # xlc -qversion output typically looks like
47744    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47745    #     Version: 11.01.0000.0015
47746    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47747    # Check that this is likely to be the IBM XL C compiler.
47748    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47749    if test $? -ne 0; then
47750      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47751      { $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
47752$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47753      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47754$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47755      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47756$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47757      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47758    fi
47759    # Collapse compiler output into a single line
47760    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47761    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47762        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47763  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47764    # There is no specific version flag, but all output starts with a version string.
47765    # First line typically looks something like:
47766    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47767    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47768    # Check that this is likely to be Microsoft CL.EXE.
47769    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47770    if test $? -ne 0; then
47771      { $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
47772$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47773      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47774$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47775      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47776    fi
47777    # Collapse compiler output into a single line
47778    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47779    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47780        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47781  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47782    # gcc --version output typically looks like
47783    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47784    #     Copyright (C) 2013 Free Software Foundation, Inc.
47785    #     This is free software; see the source for copying conditions.  There is NO
47786    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47787    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47788    # Check that this is likely to be GCC.
47789    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47790    if test $? -ne 0; then
47791      { $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
47792$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47793      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47794$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47795      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47796    fi
47797    # Remove Copyright and legalese from version string, and
47798    # collapse into a single line
47799    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47800        $SED -e 's/ *Copyright .*//'`
47801    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47802        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47803  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47804    # clang --version output typically looks like
47805    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47806    #    clang version 3.3 (tags/RELEASE_33/final)
47807    # or
47808    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47809    #    Target: x86_64-pc-linux-gnu
47810    #    Thread model: posix
47811    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47812    # Check that this is likely to be clang
47813    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47814    if test $? -ne 0; then
47815      { $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
47816$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47817      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47818$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47819      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47820    fi
47821    # Collapse compiler output into a single line
47822    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47823    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47824        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47825  else
47826      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47827  fi
47828  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47829  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47830  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47831  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47832
47833  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47834$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47835
47836
47837  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47838    { $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
47839$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47840    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47841$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47842  fi
47843
47844  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47845  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47846    { $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
47847$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;}
47848  fi
47849
47850  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47851    { $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
47852$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47853  fi
47854
47855  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47856
47857  else
47858    # If we are not cross compiling, use the normal target compilers for
47859    # building the build platform executables.
47860    BUILD_CC="$CC"
47861    BUILD_CXX="$CXX"
47862    BUILD_LD="$LD"
47863    BUILD_LDCXX="$LDCXX"
47864    BUILD_NM="$NM"
47865    BUILD_AS="$AS"
47866    BUILD_OBJCOPY="$OBJCOPY"
47867    BUILD_STRIP="$STRIP"
47868    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47869    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47870    BUILD_AR="$AR"
47871
47872
47873  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47874    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47875$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47876    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47877$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47878  fi
47879
47880  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47881  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47882    { $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
47883$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;}
47884  fi
47885
47886  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47887    { $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
47888$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47889  fi
47890
47891  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47892
47893  fi
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908  # The package path is used only on macosx?
47909  # FIXME: clean this up, and/or move it elsewhere.
47910  PACKAGE_PATH=/opt/local
47911
47912
47913  # Check for extra potential brokenness.
47914  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47915    # On Windows, double-check that we got the right compiler.
47916    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47917    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47918    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47919      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47920        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
47921      fi
47922    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47923      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47924        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47925      fi
47926    fi
47927  fi
47928
47929  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47930    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47931    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47932    # This is later checked when setting flags.
47933
47934    # "-Og" suppported for GCC 4.8 and later
47935    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983    # Execute function body
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026
48027
48028
48029
48030
48031
48032    # Execute function body
48033
48034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48035$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48036  supports=yes
48037
48038  saved_cflags="$CFLAGS"
48039  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48040  ac_ext=c
48041ac_cpp='$CPP $CPPFLAGS'
48042ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48043ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48044ac_compiler_gnu=$ac_cv_c_compiler_gnu
48045
48046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48047/* end confdefs.h.  */
48048int i;
48049_ACEOF
48050if ac_fn_c_try_compile "$LINENO"; then :
48051
48052else
48053  supports=no
48054fi
48055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48056  ac_ext=cpp
48057ac_cpp='$CXXCPP $CPPFLAGS'
48058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48061
48062  CFLAGS="$saved_cflags"
48063
48064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48065$as_echo "$supports" >&6; }
48066  if test "x$supports" = "xyes" ; then
48067    :
48068    C_COMP_SUPPORTS="yes"
48069  else
48070    :
48071    C_COMP_SUPPORTS="no"
48072  fi
48073
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132    # Execute function body
48133
48134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48135$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48136  supports=yes
48137
48138  saved_cxxflags="$CXXFLAGS"
48139  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48140  ac_ext=cpp
48141ac_cpp='$CXXCPP $CPPFLAGS'
48142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48145
48146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48147/* end confdefs.h.  */
48148int i;
48149_ACEOF
48150if ac_fn_cxx_try_compile "$LINENO"; then :
48151
48152else
48153  supports=no
48154fi
48155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48156  ac_ext=cpp
48157ac_cpp='$CXXCPP $CPPFLAGS'
48158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48161
48162  CXXFLAGS="$saved_cxxflags"
48163
48164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48165$as_echo "$supports" >&6; }
48166  if test "x$supports" = "xyes" ; then
48167    :
48168    CXX_COMP_SUPPORTS="yes"
48169  else
48170    :
48171    CXX_COMP_SUPPORTS="no"
48172  fi
48173
48174
48175
48176
48177
48178
48179
48180
48181
48182
48183
48184
48185
48186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48187$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48188  supports=no
48189  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48190
48191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48192$as_echo "$supports" >&6; }
48193  if test "x$supports" = "xyes" ; then
48194    :
48195    HAS_CFLAG_OPTIMIZE_DEBUG=true
48196  else
48197    :
48198    HAS_CFLAG_OPTIMIZE_DEBUG=false
48199  fi
48200
48201
48202
48203
48204
48205
48206
48207    # "-z relro" supported in GNU binutils 2.17 and later
48208    LINKER_RELRO_FLAG="-Wl,-z,relro"
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256    # Execute function body
48257
48258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48259$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48260  supports=yes
48261
48262  saved_ldflags="$LDFLAGS"
48263  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48264  ac_ext=c
48265ac_cpp='$CPP $CPPFLAGS'
48266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48268ac_compiler_gnu=$ac_cv_c_compiler_gnu
48269
48270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48271/* end confdefs.h.  */
48272
48273int
48274main ()
48275{
48276
48277  ;
48278  return 0;
48279}
48280_ACEOF
48281if ac_fn_c_try_link "$LINENO"; then :
48282
48283else
48284  supports=no
48285fi
48286rm -f core conftest.err conftest.$ac_objext \
48287    conftest$ac_exeext conftest.$ac_ext
48288  ac_ext=cpp
48289ac_cpp='$CXXCPP $CPPFLAGS'
48290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48293
48294  LDFLAGS="$saved_ldflags"
48295
48296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48297$as_echo "$supports" >&6; }
48298  if test "x$supports" = "xyes" ; then
48299    :
48300    HAS_LINKER_RELRO=true
48301  else
48302    :
48303    HAS_LINKER_RELRO=false
48304  fi
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318    # "-z now" supported in GNU binutils 2.11 and later
48319    LINKER_NOW_FLAG="-Wl,-z,now"
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367    # Execute function body
48368
48369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48370$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48371  supports=yes
48372
48373  saved_ldflags="$LDFLAGS"
48374  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48375  ac_ext=c
48376ac_cpp='$CPP $CPPFLAGS'
48377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48379ac_compiler_gnu=$ac_cv_c_compiler_gnu
48380
48381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48382/* end confdefs.h.  */
48383
48384int
48385main ()
48386{
48387
48388  ;
48389  return 0;
48390}
48391_ACEOF
48392if ac_fn_c_try_link "$LINENO"; then :
48393
48394else
48395  supports=no
48396fi
48397rm -f core conftest.err conftest.$ac_objext \
48398    conftest$ac_exeext conftest.$ac_ext
48399  ac_ext=cpp
48400ac_cpp='$CXXCPP $CPPFLAGS'
48401ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48402ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48403ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48404
48405  LDFLAGS="$saved_ldflags"
48406
48407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48408$as_echo "$supports" >&6; }
48409  if test "x$supports" = "xyes" ; then
48410    :
48411    HAS_LINKER_NOW=true
48412  else
48413    :
48414    HAS_LINKER_NOW=false
48415  fi
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428  fi
48429
48430  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48431  # in executable.'
48432  USING_BROKEN_SUSE_LD=no
48433  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48435$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48436    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48437    $ECHO "int main() { }" > main.c
48438    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48440$as_echo "no" >&6; }
48441      USING_BROKEN_SUSE_LD=no
48442    else
48443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48444$as_echo "yes" >&6; }
48445      USING_BROKEN_SUSE_LD=yes
48446    fi
48447    $RM version-script.map main.c a.out
48448  fi
48449
48450
48451  # Setup hotspot lecagy names for toolchains
48452  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48453  if test "x$TOOLCHAIN_TYPE" = xclang; then
48454    HOTSPOT_TOOLCHAIN_TYPE=gcc
48455  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48456    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48457  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48458    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48459  fi
48460
48461
48462
48463# Setup the JTReg Regression Test Harness.
48464
48465
48466# Check whether --with-jtreg was given.
48467if test "${with_jtreg+set}" = set; then :
48468  withval=$with_jtreg;
48469else
48470  with_jtreg=no
48471fi
48472
48473
48474  if test "x$with_jtreg" = xno; then
48475    # jtreg disabled
48476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48477$as_echo_n "checking for jtreg... " >&6; }
48478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48479$as_echo "no" >&6; }
48480  else
48481    if test "x$with_jtreg" != xyes; then
48482      # with path specified.
48483      JT_HOME="$with_jtreg"
48484    fi
48485
48486    if test "x$JT_HOME" != x; then
48487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48488$as_echo_n "checking for jtreg... " >&6; }
48489
48490      # use JT_HOME enviroment var.
48491
48492  # Only process if variable expands to non-empty
48493
48494  if test "x$JT_HOME" != x; then
48495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48496
48497  # Input might be given as Windows format, start by converting to
48498  # unix format.
48499  path="$JT_HOME"
48500  new_path=`$CYGPATH -u "$path"`
48501
48502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48505  # "foo.exe" is OK but "foo" is an error.
48506  #
48507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48508  # It is also a way to make sure we got the proper file name for the real test later on.
48509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48510  if test "x$test_shortpath" = x; then
48511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48512$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48513    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48514  fi
48515
48516  # Call helper function which possibly converts this using DOS-style short mode.
48517  # If so, the updated path is stored in $new_path.
48518
48519  input_path="$new_path"
48520  # Check if we need to convert this using DOS-style short mode. If the path
48521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48522  # take no chances and rewrite it.
48523  # Note: m4 eats our [], so we need to use [ and ] instead.
48524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48525  if test "x$has_forbidden_chars" != x; then
48526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48530      # Going to short mode and back again did indeed matter. Since short mode is
48531      # case insensitive, let's make it lowercase to improve readability.
48532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48533      # Now convert it back to Unix-style (cygpath)
48534      input_path=`$CYGPATH -u "$shortmode_path"`
48535      new_path="$input_path"
48536    fi
48537  fi
48538
48539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48540  if test "x$test_cygdrive_prefix" = x; then
48541    # As a simple fix, exclude /usr/bin since it's not a real path.
48542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48544      # a path prefixed by /cygdrive for fixpath to work.
48545      new_path="$CYGWIN_ROOT_PATH$input_path"
48546    fi
48547  fi
48548
48549
48550  if test "x$path" != "x$new_path"; then
48551    JT_HOME="$new_path"
48552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48553$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48554  fi
48555
48556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48557
48558  path="$JT_HOME"
48559  has_colon=`$ECHO $path | $GREP ^.:`
48560  new_path="$path"
48561  if test "x$has_colon" = x; then
48562    # Not in mixed or Windows style, start by that.
48563    new_path=`cmd //c echo $path`
48564  fi
48565
48566
48567  input_path="$new_path"
48568  # Check if we need to convert this using DOS-style short mode. If the path
48569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48570  # take no chances and rewrite it.
48571  # Note: m4 eats our [], so we need to use [ and ] instead.
48572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48573  if test "x$has_forbidden_chars" != x; then
48574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48576  fi
48577
48578
48579  windows_path="$new_path"
48580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48581    unix_path=`$CYGPATH -u "$windows_path"`
48582    new_path="$unix_path"
48583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48585    new_path="$unix_path"
48586  fi
48587
48588  if test "x$path" != "x$new_path"; then
48589    JT_HOME="$new_path"
48590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48591$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48592  fi
48593
48594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48596
48597    else
48598      # We're on a unix platform. Hooray! :)
48599      path="$JT_HOME"
48600      has_space=`$ECHO "$path" | $GREP " "`
48601      if test "x$has_space" != x; then
48602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48603$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48605      fi
48606
48607      # Use eval to expand a potential ~
48608      eval path="$path"
48609      if test ! -f "$path" && test ! -d "$path"; then
48610        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48611      fi
48612
48613      if test -d "$path"; then
48614        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48615      else
48616        dir="`$DIRNAME "$path"`"
48617        base="`$BASENAME "$path"`"
48618        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48619      fi
48620    fi
48621  fi
48622
48623
48624      # jtreg win32 script works for everybody
48625      JTREGEXE="$JT_HOME/bin/jtreg"
48626
48627      if test ! -f "$JTREGEXE"; then
48628        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48629      fi
48630
48631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48632$as_echo "$JTREGEXE" >&6; }
48633    else
48634      # try to find jtreg on path
48635
48636
48637
48638  # Publish this variable in the help.
48639
48640
48641  if [ -z "${JTREGEXE+x}" ]; then
48642    # The variable is not set by user, try to locate tool using the code snippet
48643    for ac_prog in jtreg
48644do
48645  # Extract the first word of "$ac_prog", so it can be a program name with args.
48646set dummy $ac_prog; ac_word=$2
48647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48648$as_echo_n "checking for $ac_word... " >&6; }
48649if ${ac_cv_path_JTREGEXE+:} false; then :
48650  $as_echo_n "(cached) " >&6
48651else
48652  case $JTREGEXE in
48653  [\\/]* | ?:[\\/]*)
48654  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48655  ;;
48656  *)
48657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48658for as_dir in $PATH
48659do
48660  IFS=$as_save_IFS
48661  test -z "$as_dir" && as_dir=.
48662    for ac_exec_ext in '' $ac_executable_extensions; do
48663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48664    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48666    break 2
48667  fi
48668done
48669  done
48670IFS=$as_save_IFS
48671
48672  ;;
48673esac
48674fi
48675JTREGEXE=$ac_cv_path_JTREGEXE
48676if test -n "$JTREGEXE"; then
48677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48678$as_echo "$JTREGEXE" >&6; }
48679else
48680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48681$as_echo "no" >&6; }
48682fi
48683
48684
48685  test -n "$JTREGEXE" && break
48686done
48687
48688  else
48689    # The variable is set, but is it from the command line or the environment?
48690
48691    # Try to remove the string !JTREGEXE! from our list.
48692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48694      # If it failed, the variable was not from the command line. Ignore it,
48695      # but warn the user (except for BASH, which is always set by the calling BASH).
48696      if test "xJTREGEXE" != xBASH; then
48697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48698$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48699      fi
48700      # Try to locate tool using the code snippet
48701      for ac_prog in jtreg
48702do
48703  # Extract the first word of "$ac_prog", so it can be a program name with args.
48704set dummy $ac_prog; ac_word=$2
48705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48706$as_echo_n "checking for $ac_word... " >&6; }
48707if ${ac_cv_path_JTREGEXE+:} false; then :
48708  $as_echo_n "(cached) " >&6
48709else
48710  case $JTREGEXE in
48711  [\\/]* | ?:[\\/]*)
48712  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48713  ;;
48714  *)
48715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48716for as_dir in $PATH
48717do
48718  IFS=$as_save_IFS
48719  test -z "$as_dir" && as_dir=.
48720    for ac_exec_ext in '' $ac_executable_extensions; do
48721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48722    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48724    break 2
48725  fi
48726done
48727  done
48728IFS=$as_save_IFS
48729
48730  ;;
48731esac
48732fi
48733JTREGEXE=$ac_cv_path_JTREGEXE
48734if test -n "$JTREGEXE"; then
48735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48736$as_echo "$JTREGEXE" >&6; }
48737else
48738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48739$as_echo "no" >&6; }
48740fi
48741
48742
48743  test -n "$JTREGEXE" && break
48744done
48745
48746    else
48747      # If it succeeded, then it was overridden by the user. We will use it
48748      # for the tool.
48749
48750      # First remove it from the list of overridden variables, so we can test
48751      # for unknown variables in the end.
48752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48753
48754      # Check if we try to supply an empty value
48755      if test "x$JTREGEXE" = x; then
48756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48757$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48759$as_echo_n "checking for JTREGEXE... " >&6; }
48760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48761$as_echo "disabled" >&6; }
48762      else
48763        # Check if the provided tool contains a complete path.
48764        tool_specified="$JTREGEXE"
48765        tool_basename="${tool_specified##*/}"
48766        if test "x$tool_basename" = "x$tool_specified"; then
48767          # A command without a complete path is provided, search $PATH.
48768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48769$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48770          # Extract the first word of "$tool_basename", so it can be a program name with args.
48771set dummy $tool_basename; ac_word=$2
48772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48773$as_echo_n "checking for $ac_word... " >&6; }
48774if ${ac_cv_path_JTREGEXE+:} false; then :
48775  $as_echo_n "(cached) " >&6
48776else
48777  case $JTREGEXE in
48778  [\\/]* | ?:[\\/]*)
48779  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48780  ;;
48781  *)
48782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48783for as_dir in $PATH
48784do
48785  IFS=$as_save_IFS
48786  test -z "$as_dir" && as_dir=.
48787    for ac_exec_ext in '' $ac_executable_extensions; do
48788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48789    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48791    break 2
48792  fi
48793done
48794  done
48795IFS=$as_save_IFS
48796
48797  ;;
48798esac
48799fi
48800JTREGEXE=$ac_cv_path_JTREGEXE
48801if test -n "$JTREGEXE"; then
48802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48803$as_echo "$JTREGEXE" >&6; }
48804else
48805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48806$as_echo "no" >&6; }
48807fi
48808
48809
48810          if test "x$JTREGEXE" = x; then
48811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48812          fi
48813        else
48814          # Otherwise we believe it is a complete path. Use it as it is.
48815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48816$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48818$as_echo_n "checking for JTREGEXE... " >&6; }
48819          if test ! -x "$tool_specified"; then
48820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48821$as_echo "not found" >&6; }
48822            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48823          fi
48824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48825$as_echo "$tool_specified" >&6; }
48826        fi
48827      fi
48828    fi
48829
48830  fi
48831
48832
48833
48834  if test "x$JTREGEXE" = x; then
48835    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48836  fi
48837
48838
48839      JT_HOME="`$DIRNAME $JTREGEXE`"
48840    fi
48841  fi
48842
48843
48844
48845
48846
48847# Setup Jib dependency tool
48848
48849
48850# Check whether --with-jib was given.
48851if test "${with_jib+set}" = set; then :
48852  withval=$with_jib;
48853fi
48854
48855
48856  if test "x$with_jib" = xno || test "x$with_jib" = x; then
48857    # jib disabled
48858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
48859$as_echo_n "checking for jib... " >&6; }
48860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48861$as_echo "no" >&6; }
48862  elif test "x$with_jib" = xyes; then
48863    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
48864  else
48865    JIB_HOME="${with_jib}"
48866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
48867$as_echo_n "checking for jib... " >&6; }
48868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
48869$as_echo "${JIB_HOME}" >&6; }
48870    if test ! -d "${JIB_HOME}"; then
48871      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
48872    fi
48873    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
48874    if test ! -f "${JIB_JAR}"; then
48875      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
48876    fi
48877  fi
48878
48879
48880
48881
48882
48883  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48884  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48885  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48886  #                              commands produced by the link step (currently AIX only)
48887  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48888    COMPILER_TARGET_BITS_FLAG="-q"
48889    COMPILER_COMMAND_FILE_FLAG="-f"
48890    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48891  else
48892    COMPILER_TARGET_BITS_FLAG="-m"
48893    COMPILER_COMMAND_FILE_FLAG="@"
48894    COMPILER_BINDCMD_FILE_FLAG=""
48895
48896    # The solstudio linker does not support @-files.
48897    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48898      COMPILER_COMMAND_FILE_FLAG=
48899    fi
48900
48901    # Check if @file is supported by gcc
48902    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48904$as_echo_n "checking if @file is supported by gcc... " >&6; }
48905      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48906      $ECHO "" "--version" > command.file
48907      if $CXX @command.file 2>&5 >&5; then
48908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48909$as_echo "yes" >&6; }
48910        COMPILER_COMMAND_FILE_FLAG="@"
48911      else
48912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48913$as_echo "no" >&6; }
48914        COMPILER_COMMAND_FILE_FLAG=
48915      fi
48916      $RM command.file
48917    fi
48918  fi
48919
48920
48921
48922
48923  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48924  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48925    ARFLAGS="-r"
48926  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48927    ARFLAGS="-X64"
48928  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48929    # lib.exe is used as AR to create static libraries.
48930    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48931  else
48932    ARFLAGS=""
48933  fi
48934
48935
48936  ## Setup strip.
48937  # FIXME: should this really be per platform, or should it be per toolchain type?
48938  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48939  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48940  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48941    STRIPFLAGS="-g"
48942  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48943    STRIPFLAGS="-x"
48944  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48945    STRIPFLAGS="-S"
48946  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48947    STRIPFLAGS="-X32_64"
48948  fi
48949
48950
48951
48952  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48953    CC_OUT_OPTION=-Fo
48954    EXE_OUT_OPTION=-out:
48955    LD_OUT_OPTION=-out:
48956    AR_OUT_OPTION=-out:
48957  else
48958    # The option used to specify the target .o,.a or .so file.
48959    # When compiling, how to specify the to be created object file.
48960    CC_OUT_OPTION='-o$(SPACE)'
48961    # When linking, how to specify the to be created executable.
48962    EXE_OUT_OPTION='-o$(SPACE)'
48963    # When linking, how to specify the to be created dynamically linkable library.
48964    LD_OUT_OPTION='-o$(SPACE)'
48965    # When archiving, how to specify the to be create static archive for object files.
48966    AR_OUT_OPTION='rcs$(SPACE)'
48967  fi
48968
48969
48970
48971
48972
48973  # On Windows, we need to set RC flags.
48974  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48975    RC_FLAGS="-nologo -l0x409"
48976    JVM_RCFLAGS="-nologo"
48977    if test "x$DEBUG_LEVEL" = xrelease; then
48978      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48979      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48980    fi
48981
48982    # The version variables used to create RC_FLAGS may be overridden
48983    # in a custom configure script, or possibly the command line.
48984    # Let those variables be expanded at make time in spec.gmk.
48985    # The \$ are escaped to the shell, and the $(...) variables
48986    # are evaluated by make.
48987    RC_FLAGS="$RC_FLAGS \
48988        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48989        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48990        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48991        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48992        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48993        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48994        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48995
48996    JVM_RCFLAGS="$JVM_RCFLAGS \
48997        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48998        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48999        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49000        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49001        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49002        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49003        -D\"HS_FNAME=jvm.dll\" \
49004        -D\"HS_INTERNAL_NAME=jvm\""
49005  fi
49006
49007
49008
49009  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49010    # silence copyright notice and other headers.
49011    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49012  fi
49013
49014
49015# Now we can test some aspects on the target using configure macros.
49016
49017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49018$as_echo_n "checking for ANSI C header files... " >&6; }
49019if ${ac_cv_header_stdc+:} false; then :
49020  $as_echo_n "(cached) " >&6
49021else
49022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49023/* end confdefs.h.  */
49024#include <stdlib.h>
49025#include <stdarg.h>
49026#include <string.h>
49027#include <float.h>
49028
49029int
49030main ()
49031{
49032
49033  ;
49034  return 0;
49035}
49036_ACEOF
49037if ac_fn_cxx_try_compile "$LINENO"; then :
49038  ac_cv_header_stdc=yes
49039else
49040  ac_cv_header_stdc=no
49041fi
49042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49043
49044if test $ac_cv_header_stdc = yes; then
49045  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49047/* end confdefs.h.  */
49048#include <string.h>
49049
49050_ACEOF
49051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49052  $EGREP "memchr" >/dev/null 2>&1; then :
49053
49054else
49055  ac_cv_header_stdc=no
49056fi
49057rm -f conftest*
49058
49059fi
49060
49061if test $ac_cv_header_stdc = yes; then
49062  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49064/* end confdefs.h.  */
49065#include <stdlib.h>
49066
49067_ACEOF
49068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49069  $EGREP "free" >/dev/null 2>&1; then :
49070
49071else
49072  ac_cv_header_stdc=no
49073fi
49074rm -f conftest*
49075
49076fi
49077
49078if test $ac_cv_header_stdc = yes; then
49079  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49080  if test "$cross_compiling" = yes; then :
49081  :
49082else
49083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49084/* end confdefs.h.  */
49085#include <ctype.h>
49086#include <stdlib.h>
49087#if ((' ' & 0x0FF) == 0x020)
49088# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49089# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49090#else
49091# define ISLOWER(c) \
49092		   (('a' <= (c) && (c) <= 'i') \
49093		     || ('j' <= (c) && (c) <= 'r') \
49094		     || ('s' <= (c) && (c) <= 'z'))
49095# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49096#endif
49097
49098#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49099int
49100main ()
49101{
49102  int i;
49103  for (i = 0; i < 256; i++)
49104    if (XOR (islower (i), ISLOWER (i))
49105	|| toupper (i) != TOUPPER (i))
49106      return 2;
49107  return 0;
49108}
49109_ACEOF
49110if ac_fn_cxx_try_run "$LINENO"; then :
49111
49112else
49113  ac_cv_header_stdc=no
49114fi
49115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49116  conftest.$ac_objext conftest.beam conftest.$ac_ext
49117fi
49118
49119fi
49120fi
49121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49122$as_echo "$ac_cv_header_stdc" >&6; }
49123if test $ac_cv_header_stdc = yes; then
49124
49125$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49126
49127fi
49128
49129# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49130for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49131		  inttypes.h stdint.h unistd.h
49132do :
49133  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49134ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49135"
49136if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49137  cat >>confdefs.h <<_ACEOF
49138#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49139_ACEOF
49140
49141fi
49142
49143done
49144
49145
49146
49147  ###############################################################################
49148  #
49149  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49150  # (The JVM can use 32 or 64 bit Java pointers but that decision
49151  # is made at runtime.)
49152  #
49153
49154  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49155    # Always specify -m flag on Solaris
49156    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49157
49158  # When we add flags to the "official" CFLAGS etc, we need to
49159  # keep track of these additions in ADDED_CFLAGS etc. These
49160  # will later be checked to make sure only controlled additions
49161  # have been made to CFLAGS etc.
49162  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49163  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49164  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49165
49166  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49167  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49168  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49169
49170  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49171  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49172  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49173
49174  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49175  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49176  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49177
49178  elif test "x$COMPILE_TYPE" = xreduced; then
49179    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49180      # Specify -m if running reduced on unix platforms
49181
49182  # When we add flags to the "official" CFLAGS etc, we need to
49183  # keep track of these additions in ADDED_CFLAGS etc. These
49184  # will later be checked to make sure only controlled additions
49185  # have been made to CFLAGS etc.
49186  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49187  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49188  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49189
49190  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49191  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49192  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49193
49194  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49195  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49196  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49197
49198  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49199  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49200  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49201
49202    fi
49203  fi
49204  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49205    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49206    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49207    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49208  fi
49209
49210  # Make compilation sanity check
49211  for ac_header in stdio.h
49212do :
49213  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49214if test "x$ac_cv_header_stdio_h" = xyes; then :
49215  cat >>confdefs.h <<_ACEOF
49216#define HAVE_STDIO_H 1
49217_ACEOF
49218
49219else
49220
49221    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49222$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49223    if test "x$COMPILE_TYPE" = xreduced; then
49224
49225  # Print a helpful message on how to acquire the necessary build dependency.
49226  # reduced is the help tag: freetype, cups, alsa etc
49227  MISSING_DEPENDENCY=reduced
49228
49229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49230    cygwin_help $MISSING_DEPENDENCY
49231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49232    msys_help $MISSING_DEPENDENCY
49233  else
49234    PKGHANDLER_COMMAND=
49235
49236    case $PKGHANDLER in
49237      apt-get)
49238        apt_help     $MISSING_DEPENDENCY ;;
49239      yum)
49240        yum_help     $MISSING_DEPENDENCY ;;
49241      brew)
49242        brew_help    $MISSING_DEPENDENCY ;;
49243      port)
49244        port_help    $MISSING_DEPENDENCY ;;
49245      pkgutil)
49246        pkgutil_help $MISSING_DEPENDENCY ;;
49247      pkgadd)
49248        pkgadd_help  $MISSING_DEPENDENCY ;;
49249    esac
49250
49251    if test "x$PKGHANDLER_COMMAND" != x; then
49252      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49253    fi
49254  fi
49255
49256      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49257$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49258    elif test "x$COMPILE_TYPE" = xcross; then
49259      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49260$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49261    fi
49262    as_fn_error $? "Cannot continue." "$LINENO" 5
49263
49264fi
49265
49266done
49267
49268
49269  # The cast to long int works around a bug in the HP C Compiler
49270# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49271# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49272# This bug is HP SR number 8606223364.
49273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49274$as_echo_n "checking size of int *... " >&6; }
49275if ${ac_cv_sizeof_int_p+:} false; then :
49276  $as_echo_n "(cached) " >&6
49277else
49278  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49279
49280else
49281  if test "$ac_cv_type_int_p" = yes; then
49282     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49284as_fn_error 77 "cannot compute sizeof (int *)
49285See \`config.log' for more details" "$LINENO" 5; }
49286   else
49287     ac_cv_sizeof_int_p=0
49288   fi
49289fi
49290
49291fi
49292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49293$as_echo "$ac_cv_sizeof_int_p" >&6; }
49294
49295
49296
49297cat >>confdefs.h <<_ACEOF
49298#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49299_ACEOF
49300
49301
49302
49303  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49304  if test "x$ac_cv_sizeof_int_p" = x; then
49305    # The test failed, lets stick to the assumed value.
49306    { $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
49307$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49308  else
49309    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49310
49311    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49312      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49313      # Let's try to implicitely set the compilers target architecture and retry the test
49314      { $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
49315$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;}
49316      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49317$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49318
49319  # When we add flags to the "official" CFLAGS etc, we need to
49320  # keep track of these additions in ADDED_CFLAGS etc. These
49321  # will later be checked to make sure only controlled additions
49322  # have been made to CFLAGS etc.
49323  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49324  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49325  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49326
49327  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49328  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49329  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49330
49331  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49332  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49333  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49334
49335  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49336  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49337  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49338
49339
49340      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49341      unset ac_cv_sizeof_int_p
49342      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49343      cat >>confdefs.h <<_ACEOF
49344#undef SIZEOF_INT_P
49345_ACEOF
49346
49347      # The cast to long int works around a bug in the HP C Compiler
49348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49350# This bug is HP SR number 8606223364.
49351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49352$as_echo_n "checking size of int *... " >&6; }
49353if ${ac_cv_sizeof_int_p+:} false; then :
49354  $as_echo_n "(cached) " >&6
49355else
49356  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49357
49358else
49359  if test "$ac_cv_type_int_p" = yes; then
49360     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49362as_fn_error 77 "cannot compute sizeof (int *)
49363See \`config.log' for more details" "$LINENO" 5; }
49364   else
49365     ac_cv_sizeof_int_p=0
49366   fi
49367fi
49368
49369fi
49370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49371$as_echo "$ac_cv_sizeof_int_p" >&6; }
49372
49373
49374
49375cat >>confdefs.h <<_ACEOF
49376#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49377_ACEOF
49378
49379
49380
49381      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49382
49383      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49384        { $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
49385$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;}
49386        if test "x$COMPILE_TYPE" = xreduced; then
49387
49388  # Print a helpful message on how to acquire the necessary build dependency.
49389  # reduced is the help tag: freetype, cups, alsa etc
49390  MISSING_DEPENDENCY=reduced
49391
49392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49393    cygwin_help $MISSING_DEPENDENCY
49394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49395    msys_help $MISSING_DEPENDENCY
49396  else
49397    PKGHANDLER_COMMAND=
49398
49399    case $PKGHANDLER in
49400      apt-get)
49401        apt_help     $MISSING_DEPENDENCY ;;
49402      yum)
49403        yum_help     $MISSING_DEPENDENCY ;;
49404      brew)
49405        brew_help    $MISSING_DEPENDENCY ;;
49406      port)
49407        port_help    $MISSING_DEPENDENCY ;;
49408      pkgutil)
49409        pkgutil_help $MISSING_DEPENDENCY ;;
49410      pkgadd)
49411        pkgadd_help  $MISSING_DEPENDENCY ;;
49412    esac
49413
49414    if test "x$PKGHANDLER_COMMAND" != x; then
49415      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49416    fi
49417  fi
49418
49419          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49420$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49421        elif test "x$COMPILE_TYPE" = xcross; then
49422          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49423$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49424        fi
49425        as_fn_error $? "Cannot continue." "$LINENO" 5
49426      fi
49427    fi
49428  fi
49429
49430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49431$as_echo_n "checking for target address size... " >&6; }
49432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49433$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49434
49435
49436  ###############################################################################
49437  #
49438  # Is the target little of big endian?
49439  #
49440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49441$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49442if ${ac_cv_c_bigendian+:} false; then :
49443  $as_echo_n "(cached) " >&6
49444else
49445  ac_cv_c_bigendian=unknown
49446    # See if we're dealing with a universal compiler.
49447    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49448/* end confdefs.h.  */
49449#ifndef __APPLE_CC__
49450	       not a universal capable compiler
49451	     #endif
49452	     typedef int dummy;
49453
49454_ACEOF
49455if ac_fn_cxx_try_compile "$LINENO"; then :
49456
49457	# Check for potential -arch flags.  It is not universal unless
49458	# there are at least two -arch flags with different values.
49459	ac_arch=
49460	ac_prev=
49461	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49462	 if test -n "$ac_prev"; then
49463	   case $ac_word in
49464	     i?86 | x86_64 | ppc | ppc64)
49465	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49466		 ac_arch=$ac_word
49467	       else
49468		 ac_cv_c_bigendian=universal
49469		 break
49470	       fi
49471	       ;;
49472	   esac
49473	   ac_prev=
49474	 elif test "x$ac_word" = "x-arch"; then
49475	   ac_prev=arch
49476	 fi
49477       done
49478fi
49479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49480    if test $ac_cv_c_bigendian = unknown; then
49481      # See if sys/param.h defines the BYTE_ORDER macro.
49482      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49483/* end confdefs.h.  */
49484#include <sys/types.h>
49485	     #include <sys/param.h>
49486
49487int
49488main ()
49489{
49490#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49491		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49492		     && LITTLE_ENDIAN)
49493	      bogus endian macros
49494	     #endif
49495
49496  ;
49497  return 0;
49498}
49499_ACEOF
49500if ac_fn_cxx_try_compile "$LINENO"; then :
49501  # It does; now see whether it defined to BIG_ENDIAN or not.
49502	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49503/* end confdefs.h.  */
49504#include <sys/types.h>
49505		#include <sys/param.h>
49506
49507int
49508main ()
49509{
49510#if BYTE_ORDER != BIG_ENDIAN
49511		 not big endian
49512		#endif
49513
49514  ;
49515  return 0;
49516}
49517_ACEOF
49518if ac_fn_cxx_try_compile "$LINENO"; then :
49519  ac_cv_c_bigendian=yes
49520else
49521  ac_cv_c_bigendian=no
49522fi
49523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49524fi
49525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49526    fi
49527    if test $ac_cv_c_bigendian = unknown; then
49528      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49529      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49530/* end confdefs.h.  */
49531#include <limits.h>
49532
49533int
49534main ()
49535{
49536#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49537	      bogus endian macros
49538	     #endif
49539
49540  ;
49541  return 0;
49542}
49543_ACEOF
49544if ac_fn_cxx_try_compile "$LINENO"; then :
49545  # It does; now see whether it defined to _BIG_ENDIAN or not.
49546	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49547/* end confdefs.h.  */
49548#include <limits.h>
49549
49550int
49551main ()
49552{
49553#ifndef _BIG_ENDIAN
49554		 not big endian
49555		#endif
49556
49557  ;
49558  return 0;
49559}
49560_ACEOF
49561if ac_fn_cxx_try_compile "$LINENO"; then :
49562  ac_cv_c_bigendian=yes
49563else
49564  ac_cv_c_bigendian=no
49565fi
49566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49567fi
49568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49569    fi
49570    if test $ac_cv_c_bigendian = unknown; then
49571      # Compile a test program.
49572      if test "$cross_compiling" = yes; then :
49573  # Try to guess by grepping values from an object file.
49574	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49575/* end confdefs.h.  */
49576short int ascii_mm[] =
49577		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49578		short int ascii_ii[] =
49579		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49580		int use_ascii (int i) {
49581		  return ascii_mm[i] + ascii_ii[i];
49582		}
49583		short int ebcdic_ii[] =
49584		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49585		short int ebcdic_mm[] =
49586		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49587		int use_ebcdic (int i) {
49588		  return ebcdic_mm[i] + ebcdic_ii[i];
49589		}
49590		extern int foo;
49591
49592int
49593main ()
49594{
49595return use_ascii (foo) == use_ebcdic (foo);
49596  ;
49597  return 0;
49598}
49599_ACEOF
49600if ac_fn_cxx_try_compile "$LINENO"; then :
49601  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49602	      ac_cv_c_bigendian=yes
49603	    fi
49604	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49605	      if test "$ac_cv_c_bigendian" = unknown; then
49606		ac_cv_c_bigendian=no
49607	      else
49608		# finding both strings is unlikely to happen, but who knows?
49609		ac_cv_c_bigendian=unknown
49610	      fi
49611	    fi
49612fi
49613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49614else
49615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49616/* end confdefs.h.  */
49617$ac_includes_default
49618int
49619main ()
49620{
49621
49622	     /* Are we little or big endian?  From Harbison&Steele.  */
49623	     union
49624	     {
49625	       long int l;
49626	       char c[sizeof (long int)];
49627	     } u;
49628	     u.l = 1;
49629	     return u.c[sizeof (long int) - 1] == 1;
49630
49631  ;
49632  return 0;
49633}
49634_ACEOF
49635if ac_fn_cxx_try_run "$LINENO"; then :
49636  ac_cv_c_bigendian=no
49637else
49638  ac_cv_c_bigendian=yes
49639fi
49640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49641  conftest.$ac_objext conftest.beam conftest.$ac_ext
49642fi
49643
49644    fi
49645fi
49646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49647$as_echo "$ac_cv_c_bigendian" >&6; }
49648 case $ac_cv_c_bigendian in #(
49649   yes)
49650     ENDIAN="big";; #(
49651   no)
49652     ENDIAN="little" ;; #(
49653   universal)
49654     ENDIAN="universal_endianness"
49655     ;; #(
49656   *)
49657     ENDIAN="unknown" ;;
49658 esac
49659
49660
49661  if test "x$ENDIAN" = xuniversal_endianness; then
49662    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49663  fi
49664  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49665    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
49666  fi
49667
49668
49669# Configure flags for the tools
49670
49671  ###############################################################################
49672  #
49673  # How to compile shared libraries.
49674  #
49675
49676  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49677    PICFLAG="-fPIC"
49678    C_FLAG_REORDER=''
49679    CXX_FLAG_REORDER=''
49680
49681    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49682      # Linking is different on MacOSX
49683      if test "x$STATIC_BUILD" = xtrue; then
49684        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49685      else
49686        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49687        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49688      fi
49689      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49690      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49691      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49692      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49693    else
49694      # Default works for linux, might work on other platforms as well.
49695      SHARED_LIBRARY_FLAGS='-shared'
49696      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49697      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49698      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49699      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49700    fi
49701  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49702    C_FLAG_REORDER=''
49703    CXX_FLAG_REORDER=''
49704
49705    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49706      # Linking is different on MacOSX
49707      PICFLAG=''
49708      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49709      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49710      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49711      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49712      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49713
49714      if test "x$STATIC_BUILD" = xfalse; then
49715        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49716      fi
49717    else
49718      # Default works for linux, might work on other platforms as well.
49719      PICFLAG='-fPIC'
49720      SHARED_LIBRARY_FLAGS='-shared'
49721      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49722      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49723      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49724
49725      # arm specific settings
49726      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49727        # '-Wl,-z,origin' isn't used on arm.
49728        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49729      else
49730        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49731      fi
49732
49733    fi
49734  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49735    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49736      PICFLAG="-xcode=pic32"
49737    else
49738      PICFLAG="-KPIC"
49739    fi
49740    C_FLAG_REORDER='-xF'
49741    CXX_FLAG_REORDER='-xF'
49742    SHARED_LIBRARY_FLAGS="-G"
49743    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49744    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49745    SET_SHARED_LIBRARY_NAME='-h $1'
49746    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49747  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49748    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49749    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49750    # will have to patch this single instruction with a call to some out-of-order code which
49751    # does the load from the TOC. This is of course slow. But in that case we also would have
49752    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49753    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49754    # can be patched directly by the linker and does not require a jump to out-of-order code.
49755    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49756    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49757    # loads for accessing a global variable). But there are rumors that this may be seen as a
49758    # 'performance feature' because of improved code locality of the symbols used in a
49759    # compilation unit.
49760    PICFLAG="-qpic"
49761    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49762    C_FLAG_REORDER=''
49763    CXX_FLAG_REORDER=''
49764    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49765    SET_EXECUTABLE_ORIGIN=""
49766    SET_SHARED_LIBRARY_ORIGIN=''
49767    SET_SHARED_LIBRARY_NAME=''
49768    SET_SHARED_LIBRARY_MAPFILE=''
49769  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49770    PICFLAG=""
49771    C_FLAG_REORDER=''
49772    CXX_FLAG_REORDER=''
49773    SHARED_LIBRARY_FLAGS="-dll"
49774    SET_EXECUTABLE_ORIGIN=''
49775    SET_SHARED_LIBRARY_ORIGIN=''
49776    SET_SHARED_LIBRARY_NAME=''
49777    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49778  fi
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788  # The (cross) compiler is now configured, we can now test capabilities
49789  # of the target platform.
49790
49791
49792
49793  ###############################################################################
49794  #
49795  # Setup the opt flags for different compilers
49796  # and different operating systems.
49797  #
49798
49799  # FIXME: this was indirectly the old default, but just inherited.
49800  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49801  #   C_FLAG_DEPS="-MMD -MF"
49802  # fi
49803
49804  # Generate make dependency files
49805  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49806    C_FLAG_DEPS="-MMD -MF"
49807  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49808    C_FLAG_DEPS="-MMD -MF"
49809  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49810    C_FLAG_DEPS="-xMMD -xMF"
49811  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49812    C_FLAG_DEPS="-qmakedep=gcc -MF"
49813  fi
49814  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49815
49816
49817
49818  # Debug symbols
49819  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49820    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49821      # reduce from default "-g2" option to save space
49822      CFLAGS_DEBUG_SYMBOLS="-g1"
49823      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49824    else
49825      CFLAGS_DEBUG_SYMBOLS="-g"
49826      CXXFLAGS_DEBUG_SYMBOLS="-g"
49827    fi
49828  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49829    CFLAGS_DEBUG_SYMBOLS="-g"
49830    CXXFLAGS_DEBUG_SYMBOLS="-g"
49831  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49832    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49833    # -g0 enables debug symbols without disabling inlining.
49834    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49835  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49836    CFLAGS_DEBUG_SYMBOLS="-g"
49837    CXXFLAGS_DEBUG_SYMBOLS="-g"
49838  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49839    CFLAGS_DEBUG_SYMBOLS="-Zi"
49840    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49841  fi
49842
49843
49844
49845  # Debug symbols for JVM_CFLAGS
49846  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49847    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49848    if test "x$DEBUG_LEVEL" = xslowdebug; then
49849      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49850    else
49851      # -g0 does not disable inlining, which -g does.
49852      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49853    fi
49854  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49855    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49856  else
49857    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49858  fi
49859
49860
49861  # bounds, memory and behavior checking options
49862  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49863    case $DEBUG_LEVEL in
49864    release )
49865      # no adjustment
49866      ;;
49867    fastdebug )
49868      # no adjustment
49869      ;;
49870    slowdebug )
49871      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49872      # get's added conditionally on whether we produce debug symbols or not.
49873      # This is most likely not really correct.
49874
49875      # Add runtime stack smashing and undefined behavior checks.
49876      # Not all versions of gcc support -fstack-protector
49877      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920    # Execute function body
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969    # Execute function body
49970
49971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49972$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49973  supports=yes
49974
49975  saved_cflags="$CFLAGS"
49976  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49977  ac_ext=c
49978ac_cpp='$CPP $CPPFLAGS'
49979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49981ac_compiler_gnu=$ac_cv_c_compiler_gnu
49982
49983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49984/* end confdefs.h.  */
49985int i;
49986_ACEOF
49987if ac_fn_c_try_compile "$LINENO"; then :
49988
49989else
49990  supports=no
49991fi
49992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49993  ac_ext=cpp
49994ac_cpp='$CXXCPP $CPPFLAGS'
49995ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49996ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49997ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49998
49999  CFLAGS="$saved_cflags"
50000
50001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50002$as_echo "$supports" >&6; }
50003  if test "x$supports" = "xyes" ; then
50004    :
50005    C_COMP_SUPPORTS="yes"
50006  else
50007    :
50008    C_COMP_SUPPORTS="no"
50009  fi
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069    # Execute function body
50070
50071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50072$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50073  supports=yes
50074
50075  saved_cxxflags="$CXXFLAGS"
50076  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50077  ac_ext=cpp
50078ac_cpp='$CXXCPP $CPPFLAGS'
50079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50082
50083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50084/* end confdefs.h.  */
50085int i;
50086_ACEOF
50087if ac_fn_cxx_try_compile "$LINENO"; then :
50088
50089else
50090  supports=no
50091fi
50092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50093  ac_ext=cpp
50094ac_cpp='$CXXCPP $CPPFLAGS'
50095ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50096ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50097ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50098
50099  CXXFLAGS="$saved_cxxflags"
50100
50101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50102$as_echo "$supports" >&6; }
50103  if test "x$supports" = "xyes" ; then
50104    :
50105    CXX_COMP_SUPPORTS="yes"
50106  else
50107    :
50108    CXX_COMP_SUPPORTS="no"
50109  fi
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50124$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50125  supports=no
50126  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50127
50128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50129$as_echo "$supports" >&6; }
50130  if test "x$supports" = "xyes" ; then
50131    :
50132
50133  else
50134    :
50135    STACK_PROTECTOR_CFLAG=""
50136  fi
50137
50138
50139
50140
50141
50142
50143
50144      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50145      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50146      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50147        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50148      fi
50149      ;;
50150    esac
50151  fi
50152
50153  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50154    if test "x$DEBUG_LEVEL" != xrelease; then
50155      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50156        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50157      fi
50158    fi
50159  fi
50160
50161  # Optimization levels
50162  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50163    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50164
50165    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50166      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50167      C_O_FLAG_HIGHEST_JVM="-xO4"
50168      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50169      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50170      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50171      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50172      C_O_FLAG_DEBUG_JVM=""
50173      C_O_FLAG_NONE="-xregs=no%frameptr"
50174      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50175      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50176      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50177      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50178      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50179      CXX_O_FLAG_DEBUG_JVM=""
50180      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50181      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50182        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50183        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50184      fi
50185    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50186      C_O_FLAG_HIGHEST_JVM="-xO4"
50187      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50188      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50189      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50190      C_O_FLAG_DEBUG=""
50191      C_O_FLAG_DEBUG_JVM=""
50192      C_O_FLAG_NONE=""
50193      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50194      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50195      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50196      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50197      CXX_O_FLAG_DEBUG=""
50198      CXX_O_FLAG_DEBUG_JVM=""
50199      CXX_O_FLAG_NONE=""
50200    fi
50201  else
50202    # The remaining toolchains share opt flags between CC and CXX;
50203    # setup for C and duplicate afterwards.
50204    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50205      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50206        # On MacOSX we optimize for size, something
50207        # we should do for all platforms?
50208        C_O_FLAG_HIGHEST_JVM="-Os"
50209        C_O_FLAG_HIGHEST="-Os"
50210        C_O_FLAG_HI="-Os"
50211        C_O_FLAG_NORM="-Os"
50212        C_O_FLAG_SIZE="-Os"
50213      else
50214        C_O_FLAG_HIGHEST_JVM="-O3"
50215        C_O_FLAG_HIGHEST="-O3"
50216        C_O_FLAG_HI="-O3"
50217        C_O_FLAG_NORM="-O2"
50218        C_O_FLAG_SIZE="-Os"
50219      fi
50220      C_O_FLAG_DEBUG="-O0"
50221      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50222        C_O_FLAG_DEBUG_JVM=""
50223      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50224        C_O_FLAG_DEBUG_JVM="-O0"
50225      fi
50226      C_O_FLAG_NONE="-O0"
50227    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50228      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50229        # On MacOSX we optimize for size, something
50230        # we should do for all platforms?
50231        C_O_FLAG_HIGHEST_JVM="-Os"
50232        C_O_FLAG_HIGHEST="-Os"
50233        C_O_FLAG_HI="-Os"
50234        C_O_FLAG_NORM="-Os"
50235        C_O_FLAG_SIZE="-Os"
50236      else
50237        C_O_FLAG_HIGHEST_JVM="-O3"
50238        C_O_FLAG_HIGHEST="-O3"
50239        C_O_FLAG_HI="-O3"
50240        C_O_FLAG_NORM="-O2"
50241        C_O_FLAG_SIZE="-Os"
50242      fi
50243      C_O_FLAG_DEBUG="-O0"
50244      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50245        C_O_FLAG_DEBUG_JVM=""
50246      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50247        C_O_FLAG_DEBUG_JVM="-O0"
50248      fi
50249      C_O_FLAG_NONE="-O0"
50250    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50251      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50252      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50253      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50254      C_O_FLAG_NORM="-O2"
50255      C_O_FLAG_DEBUG="-qnoopt"
50256      # FIXME: Value below not verified.
50257      C_O_FLAG_DEBUG_JVM=""
50258      C_O_FLAG_NONE="-qnoopt"
50259    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50260      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50261      C_O_FLAG_HIGHEST="-O2"
50262      C_O_FLAG_HI="-O1"
50263      C_O_FLAG_NORM="-O1"
50264      C_O_FLAG_DEBUG="-Od"
50265      C_O_FLAG_DEBUG_JVM=""
50266      C_O_FLAG_NONE="-Od"
50267      C_O_FLAG_SIZE="-Os"
50268    fi
50269    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50270    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50271    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50272    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50273    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50274    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50275    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50276    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50277  fi
50278
50279  # Adjust optimization flags according to debug level.
50280  case $DEBUG_LEVEL in
50281    release )
50282      # no adjustment
50283      ;;
50284    fastdebug )
50285      # Not quite so much optimization
50286      C_O_FLAG_HI="$C_O_FLAG_NORM"
50287      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50288      ;;
50289    slowdebug )
50290      # Disable optimization
50291      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50292      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50293      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50294      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50295      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50296      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50297      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50298      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50299      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50300      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50301      ;;
50302  esac
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323# Check whether --with-abi-profile was given.
50324if test "${with_abi_profile+set}" = set; then :
50325  withval=$with_abi_profile;
50326fi
50327
50328
50329  if test "x$with_abi_profile" != x; then
50330    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50331        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50332      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50333    fi
50334
50335    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50337$as_echo_n "checking for ABI profle... " >&6; }
50338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50339$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50340
50341    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50342      ARM_FLOAT_TYPE=vfp-sflt
50343      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50344    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50345      ARM_FLOAT_TYPE=vfp-hflt
50346      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50347    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50348      ARM_FLOAT_TYPE=sflt
50349      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50350    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50351      ARM_FLOAT_TYPE=vfp-sflt
50352      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50353    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50354      ARM_FLOAT_TYPE=vfp-hflt
50355      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50356    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50357      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50358      ARM_FLOAT_TYPE=
50359      ARM_ARCH_TYPE_FLAGS=
50360    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50361      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50362      ARM_FLOAT_TYPE=
50363      ARM_ARCH_TYPE_FLAGS=
50364    else
50365      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50366    fi
50367
50368    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50369      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50370    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50371      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50372    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50373      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50374    fi
50375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50376$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50378$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50379
50380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50381$as_echo_n "checking for arch type flags... " >&6; }
50382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50383$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50384
50385    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50386    # autoconf target triplet.
50387     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50388    # Sanity check that it is a known ABI.
50389    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50390        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50391        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50392          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50393$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50394    fi
50395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50396$as_echo_n "checking for ABI property name... " >&6; }
50397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50398$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50399
50400
50401    # Pass these on to the open part of configure as if they were set using
50402    # --with-extra-c[xx]flags.
50403    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50404    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50405    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50406    # FIXME: This should not really be set using extra_cflags.
50407    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50408        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50409        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50410    fi
50411    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50412    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50413    # And pass the architecture flags to the linker as well
50414    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50415  fi
50416
50417  # When building with an abi profile, the name of that profile is appended on the
50418  # bundle platform, which is used in bundle names.
50419  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50420    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50421  fi
50422
50423
50424  # Special extras...
50425  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50426    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50427      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50428      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50429    fi
50430    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50431    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50432  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50433    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50434    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50435  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50436    CXXSTD_CXXFLAG="-std=gnu++98"
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479    # Execute function body
50480
50481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50482$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50483  supports=yes
50484
50485  saved_cxxflags="$CXXFLAGS"
50486  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50487  ac_ext=cpp
50488ac_cpp='$CXXCPP $CPPFLAGS'
50489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50492
50493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50494/* end confdefs.h.  */
50495int i;
50496_ACEOF
50497if ac_fn_cxx_try_compile "$LINENO"; then :
50498
50499else
50500  supports=no
50501fi
50502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50503  ac_ext=cpp
50504ac_cpp='$CXXCPP $CPPFLAGS'
50505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50508
50509  CXXFLAGS="$saved_cxxflags"
50510
50511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50512$as_echo "$supports" >&6; }
50513  if test "x$supports" = "xyes" ; then
50514    :
50515
50516  else
50517    :
50518    CXXSTD_CXXFLAG=""
50519  fi
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50533    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50534
50535  fi
50536  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50537    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50538    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50539  fi
50540
50541  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50542  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50543  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50544
50545  ###############################################################################
50546  #
50547  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50548  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50549  #
50550
50551  # Setup compiler/platform specific flags into
50552  #    CFLAGS_JDK    - C Compiler flags
50553  #    CXXFLAGS_JDK  - C++ Compiler flags
50554  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50555  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50556    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50557    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50558    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50559    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50560      # Force compatibility with i586 on 32 bit intel platforms.
50561      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50562      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50563    fi
50564    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50565        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50566    case $OPENJDK_TARGET_CPU_ARCH in
50567      arm )
50568        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50569        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50570        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50571        ;;
50572      ppc )
50573        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50574        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50575        ;;
50576      s390 )
50577        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50578        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50579        ;;
50580      * )
50581        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50582        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50583        ;;
50584    esac
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639    # Execute function body
50640
50641  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50642  REFERENCE_VERSION=6
50643
50644  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50645    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50646  fi
50647
50648  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50649    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50650  fi
50651
50652  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50653  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50654
50655  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50656    :
50657
50658  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50659  # runs afoul of the more aggressive versions of these optimisations.
50660  # Notably, value range propagation now assumes that the this pointer of C++
50661  # member functions is non-null.
50662  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50663        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50664        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50665$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50666  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50667  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50668
50669  else
50670    :
50671
50672  fi
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50688    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50689
50690    # Restrict the debug information created by Clang to avoid
50691    # too big object files and speed the build up a little bit
50692    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50693    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50694    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50695      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50696        # Force compatibility with i586 on 32 bit intel platforms.
50697        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50698        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50699      fi
50700      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50701      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50702          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50703      case $OPENJDK_TARGET_CPU_ARCH in
50704        ppc )
50705          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50706          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50707          ;;
50708        * )
50709          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50710          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50711          ;;
50712      esac
50713    fi
50714  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50715    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50716    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50717    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50718      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50719    fi
50720
50721    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50722    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50723  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50724    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50725    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50726    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50727  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50728    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50729        -MD -Zc:wchar_t- -W3 -wd4800 \
50730        -DWIN32_LEAN_AND_MEAN \
50731        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50732        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50733        -DWIN32 -DIAL"
50734    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50735      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50736    else
50737      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50738    fi
50739    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50740    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50741    # studio.
50742    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50743      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50744      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50745      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50746    fi
50747  fi
50748
50749  ###############################################################################
50750
50751  # Adjust flags according to debug level.
50752  case $DEBUG_LEVEL in
50753    fastdebug | slowdebug )
50754      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50755      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50756      ;;
50757    release )
50758      ;;
50759    * )
50760      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50761      ;;
50762  esac
50763
50764  # Set some common defines. These works for all compilers, but assume
50765  # -D is universally accepted.
50766
50767  # Setup endianness
50768  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50769    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50770    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50771    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50772    #   Note: -Dmacro         is the same as    #define macro 1
50773    #         -Dmacro=        is the same as    #define macro
50774    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50775      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50776    else
50777      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50778    fi
50779  else
50780    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50781    # are defined in the system?
50782    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50783      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50784    else
50785      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50786    fi
50787  fi
50788
50789  # Setup target OS define. Use OS target name but in upper case.
50790  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50791  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50792
50793  # Setup target CPU
50794  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50795      $OPENJDK_TARGET_ADD_LP64 \
50796      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50797
50798  # Setup debug/release defines
50799  if test "x$DEBUG_LEVEL" = xrelease; then
50800    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50801    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50802      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50803    fi
50804  else
50805    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50806  fi
50807
50808  # Set some additional per-OS defines.
50809  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50810    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50811    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50812        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50813  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50814    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50815    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50816        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50817  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50818    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50819    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50820    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50821    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50822        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50823        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50824        -fno-omit-frame-pointer"
50825  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50826    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50827    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50828    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50829        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50830        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50831  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50832    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50833  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50834    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50835    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50836  fi
50837
50838  # Set some additional per-CPU defines.
50839  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50840    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50841  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50842    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50843  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50844    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50845      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50846      # fixes `relocation truncated to fit' error for gcc 4.1.
50847      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50848      # Use ppc64 instructions, but schedule for power5
50849      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50850    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50851      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50852    fi
50853  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50854    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50855      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50856      # Little endian machine uses ELFv2 ABI.
50857      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50858      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50859      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50860    fi
50861  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50862    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50863      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50864    fi
50865  fi
50866
50867  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50868    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50869  fi
50870
50871  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50872    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50873      # Solaris does not have _LP64=1 in the old build.
50874      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50875      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50876    fi
50877  fi
50878
50879  # Set JVM_CFLAGS warning handling
50880  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50881    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50882        -Wunused-value -Woverloaded-virtual"
50883
50884    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939    # Execute function body
50940
50941  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50942  REFERENCE_VERSION=4.8
50943
50944  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50945    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50946  fi
50947
50948  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50949    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50950  fi
50951
50952  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50953  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50954
50955  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50956    :
50957
50958            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50959            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50960
50961
50962  else
50963    :
50964
50965  fi
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980    fi
50981    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50982      # Non-zero builds have stricter warnings
50983      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50984    else
50985      if test "x$TOOLCHAIN_TYPE" = xclang; then
50986        # Some versions of llvm do not like -Wundef
50987        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50988      fi
50989    fi
50990  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50991    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50992        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50993  fi
50994
50995  # Additional macosx handling
50996  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50997    # Setting these parameters makes it an error to link to macosx APIs that are
50998    # newer than the given OS version and makes the linked binaries compatible
50999    # even if built on a newer version of the OS.
51000    # The expected format is X.Y.Z
51001    MACOSX_VERSION_MIN=10.7.0
51002
51003
51004    # The macro takes the version with no dots, ex: 1070
51005    # Let the flags variables get resolved in make for easier override on make
51006    # command line.
51007    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51008    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51009  fi
51010
51011  # Setup some hard coded includes
51012  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51013      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51014      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51015      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51016      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51017      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51018      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51019
51020  # The shared libraries are compiled using the picflag.
51021  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51022      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51023  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51024      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51025
51026  # Executable flags
51027  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51028  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51029
51030
51031
51032
51033
51034
51035  # Setup LDFLAGS et al.
51036  #
51037
51038  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51039    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51040    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51041    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51042    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51043      LDFLAGS_SAFESH="-safeseh"
51044      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51045      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51046      # NOTE: Old build added -machine. Probably not needed.
51047      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51048    else
51049      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51050    fi
51051  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51052      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51053      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51054        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51055        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51056    fi
51057  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51058    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51059    # We have previously set HAS_GNU_HASH if this is the case
51060    if test -n "$HAS_GNU_HASH"; then
51061      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51062      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51063      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51064    fi
51065      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51066        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51067    fi
51068    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51069      # And since we now know that the linker is gnu, then add -z defs, to forbid
51070      # undefined symbols in object files.
51071      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51072      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51073      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51074      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51075      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51076      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51077        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51078      fi
51079      case $DEBUG_LEVEL in
51080        release )
51081          # tell linker to optimize libraries.
51082          # Should this be supplied to the OSS linker as well?
51083          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51084          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51085          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51086          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51087            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51088          fi
51089          ;;
51090        slowdebug )
51091          # Hotspot always let the linker optimize
51092          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51093          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51094            # do relocations at load
51095            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51096            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51097            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51098          fi
51099          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51100            # mark relocations read only
51101            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51102            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51103            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51104          fi
51105          ;;
51106        fastdebug )
51107          # Hotspot always let the linker optimize
51108          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51109          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51110            # mark relocations read only
51111            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51112            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51113            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51114          fi
51115          ;;
51116        * )
51117          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51118          ;;
51119        esac
51120    fi
51121  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51122    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51123    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51124    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51125    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51126    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51127    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51128      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51129    fi
51130  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51131    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51132    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51133    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51134  fi
51135
51136  # Customize LDFLAGS for executables
51137
51138  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51139
51140  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51141    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51142      LDFLAGS_STACK_SIZE=1048576
51143    else
51144      LDFLAGS_STACK_SIZE=327680
51145    fi
51146    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51147  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51148    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51149  fi
51150
51151  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51152
51153  # Customize LDFLAGS for libs
51154  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51155
51156  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51157  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51158    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51159        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51160    JDKLIB_LIBS=""
51161  else
51162    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51163        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51164
51165    if test "xTARGET" = "xTARGET"; then
51166      # On some platforms (mac) the linker warns about non existing -L dirs.
51167      # For any of the variants server, client or minimal, the dir matches the
51168      # variant name. The "main" variant should be used for linking. For the
51169      # rest, the dir is just server.
51170      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51171          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51172        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51173            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51174      else
51175        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51176            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51177      fi
51178    elif test "xTARGET" = "xBUILD"; then
51179      # When building a buildjdk, it's always only the server variant
51180      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51181          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51182    fi
51183
51184    JDKLIB_LIBS="-ljava -ljvm"
51185    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51186      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51187    fi
51188
51189  fi
51190
51191LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51192
51193  # Set JVM_LIBS (per os)
51194  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51195    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51196  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51197    # FIXME: This hard-coded path is not really proper.
51198    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51199      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51200    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51201      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51202    fi
51203    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51204        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51205  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51206    JVM_LIBS="$JVM_LIBS -lm"
51207  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51208    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51209  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51210    JVM_LIBS="$JVM_LIBS -lm"
51211  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51212    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51213        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51214        wsock32.lib winmm.lib version.lib psapi.lib"
51215    fi
51216
51217  # Set JVM_ASFLAGS
51218  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51219    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51220      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51221    fi
51222  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51223    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51224  fi
51225
51226  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242  # Special extras...
51243  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51244    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51245      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51246      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51247    fi
51248    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51249    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51250  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51251    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51252    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51253  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51254    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297    # Execute function body
51298
51299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51300$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51301  supports=yes
51302
51303  saved_cxxflags="$CXXFLAGS"
51304  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51305  ac_ext=cpp
51306ac_cpp='$CXXCPP $CPPFLAGS'
51307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51310
51311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51312/* end confdefs.h.  */
51313int i;
51314_ACEOF
51315if ac_fn_cxx_try_compile "$LINENO"; then :
51316
51317else
51318  supports=no
51319fi
51320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51321  ac_ext=cpp
51322ac_cpp='$CXXCPP $CPPFLAGS'
51323ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51324ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51325ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51326
51327  CXXFLAGS="$saved_cxxflags"
51328
51329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51330$as_echo "$supports" >&6; }
51331  if test "x$supports" = "xyes" ; then
51332    :
51333
51334  else
51335    :
51336    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51337  fi
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51351    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51352
51353  fi
51354  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51355    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51356    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51357  fi
51358
51359  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51360  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51361  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51362
51363  ###############################################################################
51364  #
51365  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51366  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51367  #
51368
51369  # Setup compiler/platform specific flags into
51370  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51371  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51372  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51373  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51374    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51375    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51376    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51377    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51378      # Force compatibility with i586 on 32 bit intel platforms.
51379      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51380      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51381    fi
51382    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51383        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51384    case $OPENJDK_BUILD_CPU_ARCH in
51385      arm )
51386        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51387        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51388        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51389        ;;
51390      ppc )
51391        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51392        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51393        ;;
51394      s390 )
51395        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51396        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51397        ;;
51398      * )
51399        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51400        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51401        ;;
51402    esac
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457    # Execute function body
51458
51459  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51460  REFERENCE_VERSION=6
51461
51462  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51463    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51464  fi
51465
51466  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51467    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51468  fi
51469
51470  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51471  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51472
51473  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51474    :
51475
51476  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51477  # runs afoul of the more aggressive versions of these optimisations.
51478  # Notably, value range propagation now assumes that the this pointer of C++
51479  # member functions is non-null.
51480  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51481        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51482        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51483$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51484  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51485  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51486
51487  else
51488    :
51489
51490  fi
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51506    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51507
51508    # Restrict the debug information created by Clang to avoid
51509    # too big object files and speed the build up a little bit
51510    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51511    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51512    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51513      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51514        # Force compatibility with i586 on 32 bit intel platforms.
51515        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51516        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51517      fi
51518      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51519      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51520          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51521      case $OPENJDK_BUILD_CPU_ARCH in
51522        ppc )
51523          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51524          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51525          ;;
51526        * )
51527          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51528          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51529          ;;
51530      esac
51531    fi
51532  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51533    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51534    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51535    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51536      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51537    fi
51538
51539    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51540    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51541  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51542    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51543    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51544    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51545  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51546    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51547        -MD -Zc:wchar_t- -W3 -wd4800 \
51548        -DWIN32_LEAN_AND_MEAN \
51549        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51550        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51551        -DWIN32 -DIAL"
51552    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51553      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51554    else
51555      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51556    fi
51557    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51558    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51559    # studio.
51560    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51561      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51562      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51563      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51564    fi
51565  fi
51566
51567  ###############################################################################
51568
51569  # Adjust flags according to debug level.
51570  case $DEBUG_LEVEL in
51571    fastdebug | slowdebug )
51572      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51573      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51574      ;;
51575    release )
51576      ;;
51577    * )
51578      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51579      ;;
51580  esac
51581
51582  # Set some common defines. These works for all compilers, but assume
51583  # -D is universally accepted.
51584
51585  # Setup endianness
51586  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51587    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51588    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51589    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51590    #   Note: -Dmacro         is the same as    #define macro 1
51591    #         -Dmacro=        is the same as    #define macro
51592    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51593      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51594    else
51595      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51596    fi
51597  else
51598    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51599    # are defined in the system?
51600    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51601      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51602    else
51603      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51604    fi
51605  fi
51606
51607  # Setup target OS define. Use OS target name but in upper case.
51608  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51609  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51610
51611  # Setup target CPU
51612  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51613      $OPENJDK_BUILD_ADD_LP64 \
51614      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51615
51616  # Setup debug/release defines
51617  if test "x$DEBUG_LEVEL" = xrelease; then
51618    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51619    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51620      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51621    fi
51622  else
51623    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51624  fi
51625
51626  # Set some additional per-OS defines.
51627  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51628    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51629    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51630        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51631  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51632    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51633    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51634        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51635  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51636    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51637    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51638    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51639    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51640        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51641        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51642        -fno-omit-frame-pointer"
51643  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51644    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51645    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51646    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51647        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51648        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51649  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51650    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51651  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51652    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51653    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51654  fi
51655
51656  # Set some additional per-CPU defines.
51657  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51658    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51659  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51660    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51661  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51662    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51663      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51664      # fixes `relocation truncated to fit' error for gcc 4.1.
51665      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51666      # Use ppc64 instructions, but schedule for power5
51667      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51668    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51669      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51670    fi
51671  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51672    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51673      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51674      # Little endian machine uses ELFv2 ABI.
51675      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51676      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51677      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51678    fi
51679  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51680    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51681      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51682    fi
51683  fi
51684
51685  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51686    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51687  fi
51688
51689  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51690    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51691      # Solaris does not have _LP64=1 in the old build.
51692      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51693      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51694    fi
51695  fi
51696
51697  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51698  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51699    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51700        -Wunused-value -Woverloaded-virtual"
51701
51702    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
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    # Execute function body
51758
51759  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51760  REFERENCE_VERSION=4.8
51761
51762  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51763    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51764  fi
51765
51766  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51767    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51768  fi
51769
51770  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51771  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51772
51773  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51774    :
51775
51776            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51777            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51778
51779
51780  else
51781    :
51782
51783  fi
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798    fi
51799    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51800      # Non-zero builds have stricter warnings
51801      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51802    else
51803      if test "x$TOOLCHAIN_TYPE" = xclang; then
51804        # Some versions of llvm do not like -Wundef
51805        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51806      fi
51807    fi
51808  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51809    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51810        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51811  fi
51812
51813  # Additional macosx handling
51814  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51815    # Setting these parameters makes it an error to link to macosx APIs that are
51816    # newer than the given OS version and makes the linked binaries compatible
51817    # even if built on a newer version of the OS.
51818    # The expected format is X.Y.Z
51819    MACOSX_VERSION_MIN=10.7.0
51820
51821
51822    # The macro takes the version with no dots, ex: 1070
51823    # Let the flags variables get resolved in make for easier override on make
51824    # command line.
51825    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)"
51826    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51827  fi
51828
51829  # Setup some hard coded includes
51830  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51831      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51832      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51833      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51834      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51835      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51836      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51837
51838  # The shared libraries are compiled using the picflag.
51839  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51840      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51841  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51842      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51843
51844  # Executable flags
51845  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51846  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51847
51848
51849
51850
51851
51852
51853  # Setup LDFLAGS et al.
51854  #
51855
51856  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51857    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51858    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51859    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51860    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51861      LDFLAGS_SAFESH="-safeseh"
51862      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51863      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51864      # NOTE: Old build added -machine. Probably not needed.
51865      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51866    else
51867      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51868    fi
51869  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51870      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51871      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51872        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51873        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51874    fi
51875  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51876    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51877    # We have previously set HAS_GNU_HASH if this is the case
51878    if test -n "$HAS_GNU_HASH"; then
51879      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51880      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51881      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51882    fi
51883      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51884        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51885    fi
51886    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51887      # And since we now know that the linker is gnu, then add -z defs, to forbid
51888      # undefined symbols in object files.
51889      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51890      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51891      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51892      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51893      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51894      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51895        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51896      fi
51897      case $DEBUG_LEVEL in
51898        release )
51899          # tell linker to optimize libraries.
51900          # Should this be supplied to the OSS linker as well?
51901          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51902          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51903          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51904          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51905            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51906          fi
51907          ;;
51908        slowdebug )
51909          # Hotspot always let the linker optimize
51910          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51911          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51912            # do relocations at load
51913            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51914            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51915            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51916          fi
51917          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51918            # mark relocations read only
51919            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51920            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51921            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51922          fi
51923          ;;
51924        fastdebug )
51925          # Hotspot always let the linker optimize
51926          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51927          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51928            # mark relocations read only
51929            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51930            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51931            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51932          fi
51933          ;;
51934        * )
51935          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51936          ;;
51937        esac
51938    fi
51939  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51940    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51941    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51942    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51943    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51944    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51945    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51946      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51947    fi
51948  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51949    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51950    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51951    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51952  fi
51953
51954  # Customize LDFLAGS for executables
51955
51956  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51957
51958  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51959    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51960      LDFLAGS_STACK_SIZE=1048576
51961    else
51962      LDFLAGS_STACK_SIZE=327680
51963    fi
51964    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51965  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51966    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51967  fi
51968
51969  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51970
51971  # Customize LDFLAGS for libs
51972  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51973
51974  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51975  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51976    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51977        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51978    OPENJDK_BUILD_JDKLIB_LIBS=""
51979  else
51980    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51981        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51982
51983    if test "xBUILD" = "xTARGET"; then
51984      # On some platforms (mac) the linker warns about non existing -L dirs.
51985      # For any of the variants server, client or minimal, the dir matches the
51986      # variant name. The "main" variant should be used for linking. For the
51987      # rest, the dir is just server.
51988      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51989          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51990        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51991            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51992      else
51993        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51994            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51995      fi
51996    elif test "xBUILD" = "xBUILD"; then
51997      # When building a buildjdk, it's always only the server variant
51998      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51999          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52000    fi
52001
52002    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52003    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52004      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52005    fi
52006
52007  fi
52008
52009OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52010
52011  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52012  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52013    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52014  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52015    # FIXME: This hard-coded path is not really proper.
52016    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52017      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52018    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52019      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52020    fi
52021    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52022        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52023  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52024    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52025  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52026    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52027  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52028    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52029  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52030    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52031        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52032        wsock32.lib winmm.lib version.lib psapi.lib"
52033    fi
52034
52035  # Set OPENJDK_BUILD_JVM_ASFLAGS
52036  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52037    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52038      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52039    fi
52040  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52041    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52042  fi
52043
52044  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060  # Tests are only ever compiled for TARGET
52061  # Flags for compiling test libraries
52062  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52063  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52064
52065  # Flags for compiling test executables
52066  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52067  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52068
52069
52070
52071
52072
52073
52074  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52075  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52076
52077
52078
52079
52080
52081
52082  # Check that the compiler supports -mX (or -qX on AIX) flags
52083  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131    # Execute function body
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180    # Execute function body
52181
52182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52183$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52184  supports=yes
52185
52186  saved_cflags="$CFLAGS"
52187  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52188  ac_ext=c
52189ac_cpp='$CPP $CPPFLAGS'
52190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52192ac_compiler_gnu=$ac_cv_c_compiler_gnu
52193
52194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52195/* end confdefs.h.  */
52196int i;
52197_ACEOF
52198if ac_fn_c_try_compile "$LINENO"; then :
52199
52200else
52201  supports=no
52202fi
52203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52204  ac_ext=cpp
52205ac_cpp='$CXXCPP $CPPFLAGS'
52206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52209
52210  CFLAGS="$saved_cflags"
52211
52212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52213$as_echo "$supports" >&6; }
52214  if test "x$supports" = "xyes" ; then
52215    :
52216    C_COMP_SUPPORTS="yes"
52217  else
52218    :
52219    C_COMP_SUPPORTS="no"
52220  fi
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280    # Execute function body
52281
52282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52283$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52284  supports=yes
52285
52286  saved_cxxflags="$CXXFLAGS"
52287  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52288  ac_ext=cpp
52289ac_cpp='$CXXCPP $CPPFLAGS'
52290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52293
52294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52295/* end confdefs.h.  */
52296int i;
52297_ACEOF
52298if ac_fn_cxx_try_compile "$LINENO"; then :
52299
52300else
52301  supports=no
52302fi
52303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52304  ac_ext=cpp
52305ac_cpp='$CXXCPP $CPPFLAGS'
52306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52309
52310  CXXFLAGS="$saved_cxxflags"
52311
52312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52313$as_echo "$supports" >&6; }
52314  if test "x$supports" = "xyes" ; then
52315    :
52316    CXX_COMP_SUPPORTS="yes"
52317  else
52318    :
52319    CXX_COMP_SUPPORTS="no"
52320  fi
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52335$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52336  supports=no
52337  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52338
52339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52340$as_echo "$supports" >&6; }
52341  if test "x$supports" = "xyes" ; then
52342    :
52343    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52344  else
52345    :
52346    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52347  fi
52348
52349
52350
52351
52352
52353
52354
52355
52356  # Check whether --enable-warnings-as-errors was given.
52357if test "${enable_warnings_as_errors+set}" = set; then :
52358  enableval=$enable_warnings_as_errors;
52359fi
52360
52361
52362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52363$as_echo_n "checking if native warnings are errors... " >&6; }
52364  if test "x$enable_warnings_as_errors" = "xyes"; then
52365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52366$as_echo "yes (explicitly set)" >&6; }
52367    WARNINGS_AS_ERRORS=true
52368  elif test "x$enable_warnings_as_errors" = "xno"; then
52369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52370$as_echo "no" >&6; }
52371    WARNINGS_AS_ERRORS=false
52372  elif test "x$enable_warnings_as_errors" = "x"; then
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52374$as_echo "yes (default)" >&6; }
52375    WARNINGS_AS_ERRORS=true
52376  else
52377    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52378  fi
52379
52380
52381
52382  case "${TOOLCHAIN_TYPE}" in
52383    microsoft)
52384      DISABLE_WARNING_PREFIX="-wd"
52385      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52386      ;;
52387    solstudio)
52388      DISABLE_WARNING_PREFIX="-erroff="
52389      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52390      ;;
52391    gcc)
52392      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440    # Execute function body
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489    # Execute function body
52490
52491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52492$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52493  supports=yes
52494
52495  saved_cflags="$CFLAGS"
52496  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52497  ac_ext=c
52498ac_cpp='$CPP $CPPFLAGS'
52499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52501ac_compiler_gnu=$ac_cv_c_compiler_gnu
52502
52503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52504/* end confdefs.h.  */
52505int i;
52506_ACEOF
52507if ac_fn_c_try_compile "$LINENO"; then :
52508
52509else
52510  supports=no
52511fi
52512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52513  ac_ext=cpp
52514ac_cpp='$CXXCPP $CPPFLAGS'
52515ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52516ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52517ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52518
52519  CFLAGS="$saved_cflags"
52520
52521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52522$as_echo "$supports" >&6; }
52523  if test "x$supports" = "xyes" ; then
52524    :
52525    C_COMP_SUPPORTS="yes"
52526  else
52527    :
52528    C_COMP_SUPPORTS="no"
52529  fi
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589    # Execute function body
52590
52591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52592$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52593  supports=yes
52594
52595  saved_cxxflags="$CXXFLAGS"
52596  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52597  ac_ext=cpp
52598ac_cpp='$CXXCPP $CPPFLAGS'
52599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52602
52603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52604/* end confdefs.h.  */
52605int i;
52606_ACEOF
52607if ac_fn_cxx_try_compile "$LINENO"; then :
52608
52609else
52610  supports=no
52611fi
52612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52613  ac_ext=cpp
52614ac_cpp='$CXXCPP $CPPFLAGS'
52615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52618
52619  CXXFLAGS="$saved_cxxflags"
52620
52621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52622$as_echo "$supports" >&6; }
52623  if test "x$supports" = "xyes" ; then
52624    :
52625    CXX_COMP_SUPPORTS="yes"
52626  else
52627    :
52628    CXX_COMP_SUPPORTS="no"
52629  fi
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52644$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52645  supports=no
52646  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52647
52648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52649$as_echo "$supports" >&6; }
52650  if test "x$supports" = "xyes" ; then
52651    :
52652    GCC_CAN_DISABLE_WARNINGS=true
52653  else
52654    :
52655    GCC_CAN_DISABLE_WARNINGS=false
52656
52657  fi
52658
52659
52660
52661
52662
52663
52664      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52665        DISABLE_WARNING_PREFIX="-Wno-"
52666      else
52667        DISABLE_WARNING_PREFIX=
52668      fi
52669      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52670      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52671      # CFLAGS since any target specific flags will likely not work with the
52672      # build compiler
52673      CC_OLD="$CC"
52674      CXX_OLD="$CXX"
52675      CC="$BUILD_CC"
52676      CXX="$BUILD_CXX"
52677      CFLAGS_OLD="$CFLAGS"
52678      CFLAGS=""
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726    # Execute function body
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775    # Execute function body
52776
52777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52778$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52779  supports=yes
52780
52781  saved_cflags="$CFLAGS"
52782  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52783  ac_ext=c
52784ac_cpp='$CPP $CPPFLAGS'
52785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52787ac_compiler_gnu=$ac_cv_c_compiler_gnu
52788
52789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52790/* end confdefs.h.  */
52791int i;
52792_ACEOF
52793if ac_fn_c_try_compile "$LINENO"; then :
52794
52795else
52796  supports=no
52797fi
52798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52799  ac_ext=cpp
52800ac_cpp='$CXXCPP $CPPFLAGS'
52801ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52802ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52803ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52804
52805  CFLAGS="$saved_cflags"
52806
52807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52808$as_echo "$supports" >&6; }
52809  if test "x$supports" = "xyes" ; then
52810    :
52811    C_COMP_SUPPORTS="yes"
52812  else
52813    :
52814    C_COMP_SUPPORTS="no"
52815  fi
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875    # Execute function body
52876
52877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52878$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52879  supports=yes
52880
52881  saved_cxxflags="$CXXFLAGS"
52882  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52883  ac_ext=cpp
52884ac_cpp='$CXXCPP $CPPFLAGS'
52885ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52886ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52887ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52888
52889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52890/* end confdefs.h.  */
52891int i;
52892_ACEOF
52893if ac_fn_cxx_try_compile "$LINENO"; then :
52894
52895else
52896  supports=no
52897fi
52898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52899  ac_ext=cpp
52900ac_cpp='$CXXCPP $CPPFLAGS'
52901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52904
52905  CXXFLAGS="$saved_cxxflags"
52906
52907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52908$as_echo "$supports" >&6; }
52909  if test "x$supports" = "xyes" ; then
52910    :
52911    CXX_COMP_SUPPORTS="yes"
52912  else
52913    :
52914    CXX_COMP_SUPPORTS="no"
52915  fi
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52930$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52931  supports=no
52932  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52933
52934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52935$as_echo "$supports" >&6; }
52936  if test "x$supports" = "xyes" ; then
52937    :
52938    BUILD_CC_CAN_DISABLE_WARNINGS=true
52939  else
52940    :
52941    BUILD_CC_CAN_DISABLE_WARNINGS=false
52942
52943  fi
52944
52945
52946
52947
52948
52949
52950      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52951        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52952      else
52953        BUILD_CC_DISABLE_WARNING_PREFIX=
52954      fi
52955      CC="$CC_OLD"
52956      CXX="$CXX_OLD"
52957      CFLAGS="$CFLAGS_OLD"
52958      ;;
52959    clang)
52960      DISABLE_WARNING_PREFIX="-Wno-"
52961      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52962      ;;
52963    xlc)
52964      DISABLE_WARNING_PREFIX="-qsuppress="
52965      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52966      ;;
52967  esac
52968
52969
52970
52971
52972
52973# Setup debug symbols (need objcopy from the toolchain for that)
52974
52975  #
52976  # NATIVE_DEBUG_SYMBOLS
52977  # This must be done after the toolchain is setup, since we're looking at objcopy.
52978  #
52979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52980$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52981
52982# Check whether --with-native-debug-symbols was given.
52983if test "${with_native_debug_symbols+set}" = set; then :
52984  withval=$with_native_debug_symbols;
52985        if test "x$OPENJDK_TARGET_OS" = xaix; then
52986          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52987            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52988          fi
52989        fi
52990
52991else
52992
52993        if test "x$OPENJDK_TARGET_OS" = xaix; then
52994          # AIX doesn't support 'zipped' so use 'internal' as default
52995          with_native_debug_symbols="internal"
52996        else
52997          if test "x$STATIC_BUILD" = xtrue; then
52998            with_native_debug_symbols="none"
52999          else
53000            with_native_debug_symbols="zipped"
53001          fi
53002        fi
53003
53004fi
53005
53006  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53008$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53009
53010  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53011
53012    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53013      if test "x$OBJCOPY" = x; then
53014        # enabling of enable-debug-symbols and can't find objcopy
53015        # this is an error
53016        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53017      fi
53018    fi
53019
53020    COMPILE_WITH_DEBUG_SYMBOLS=true
53021    COPY_DEBUG_SYMBOLS=true
53022    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53023  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53024    COMPILE_WITH_DEBUG_SYMBOLS=false
53025    COPY_DEBUG_SYMBOLS=false
53026    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53027  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53028    COMPILE_WITH_DEBUG_SYMBOLS=true
53029    COPY_DEBUG_SYMBOLS=false
53030    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53031  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53032
53033    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53034      if test "x$OBJCOPY" = x; then
53035        # enabling of enable-debug-symbols and can't find objcopy
53036        # this is an error
53037        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53038      fi
53039    fi
53040
53041    COMPILE_WITH_DEBUG_SYMBOLS=true
53042    COPY_DEBUG_SYMBOLS=true
53043    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53044  else
53045    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53046  fi
53047
53048  # --enable-debug-symbols is deprecated.
53049  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53050
53051  # Check whether --enable-debug-symbols was given.
53052if test "${enable_debug_symbols+set}" = set; then :
53053  enableval=$enable_debug_symbols;
53054fi
53055
53056  if test "x$enable_debug_symbols" != x; then
53057    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53058$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53059
53060    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53061      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53062$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53063    fi
53064
53065  fi
53066
53067
53068  # --enable-zip-debug-info is deprecated.
53069  # Please use --with-native-debug-symbols=zipped .
53070
53071  # Check whether --enable-zip-debug-info was given.
53072if test "${enable_zip_debug_info+set}" = set; then :
53073  enableval=$enable_zip_debug_info;
53074fi
53075
53076  if test "x$enable_zip_debug_info" != x; then
53077    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53078$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53079
53080    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53081      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53082$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53083    fi
53084
53085  fi
53086
53087
53088
53089
53090
53091
53092
53093  # Check whether --enable-native-coverage was given.
53094if test "${enable_native_coverage+set}" = set; then :
53095  enableval=$enable_native_coverage;
53096fi
53097
53098  GCOV_ENABLED="false"
53099  if test "x$enable_native_coverage" = "xyes"; then
53100    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53102$as_echo_n "checking if native coverage is enabled... " >&6; }
53103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53104$as_echo "yes" >&6; }
53105      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53106      GCOV_LDFLAGS="-fprofile-arcs"
53107      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53108      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53109      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53110      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53111      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53112      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53113      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53114      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53115      GCOV_ENABLED="true"
53116    else
53117      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53118    fi
53119  elif test "x$enable_native_coverage" = "xno"; then
53120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53121$as_echo_n "checking if native coverage is enabled... " >&6; }
53122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53123$as_echo "no" >&6; }
53124  elif test "x$enable_native_coverage" != "x"; then
53125    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53126  fi
53127
53128
53129
53130
53131# Need toolchain to setup dtrace
53132
53133  # Test for dtrace dependencies
53134  # Check whether --enable-dtrace was given.
53135if test "${enable_dtrace+set}" = set; then :
53136  enableval=$enable_dtrace;
53137fi
53138
53139
53140  DTRACE_DEP_MISSING=false
53141
53142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53143$as_echo_n "checking for dtrace tool... " >&6; }
53144  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53146$as_echo "$DTRACE" >&6; }
53147  else
53148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53149$as_echo "not found, cannot build dtrace" >&6; }
53150    DTRACE_DEP_MISSING=true
53151  fi
53152
53153  for ac_header in sys/sdt.h
53154do :
53155  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53156if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53157  cat >>confdefs.h <<_ACEOF
53158#define HAVE_SYS_SDT_H 1
53159_ACEOF
53160 DTRACE_HEADERS_OK=yes
53161else
53162  DTRACE_HEADERS_OK=no
53163fi
53164
53165done
53166
53167  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53168    DTRACE_DEP_MISSING=true
53169  fi
53170
53171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53172$as_echo_n "checking if dtrace should be built... " >&6; }
53173  if test "x$enable_dtrace" = "xyes"; then
53174    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53176$as_echo "no, missing dependencies" >&6; }
53177
53178  # Print a helpful message on how to acquire the necessary build dependency.
53179  # dtrace is the help tag: freetype, cups, alsa etc
53180  MISSING_DEPENDENCY=dtrace
53181
53182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53183    cygwin_help $MISSING_DEPENDENCY
53184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53185    msys_help $MISSING_DEPENDENCY
53186  else
53187    PKGHANDLER_COMMAND=
53188
53189    case $PKGHANDLER in
53190      apt-get)
53191        apt_help     $MISSING_DEPENDENCY ;;
53192      yum)
53193        yum_help     $MISSING_DEPENDENCY ;;
53194      brew)
53195        brew_help    $MISSING_DEPENDENCY ;;
53196      port)
53197        port_help    $MISSING_DEPENDENCY ;;
53198      pkgutil)
53199        pkgutil_help $MISSING_DEPENDENCY ;;
53200      pkgadd)
53201        pkgadd_help  $MISSING_DEPENDENCY ;;
53202    esac
53203
53204    if test "x$PKGHANDLER_COMMAND" != x; then
53205      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53206    fi
53207  fi
53208
53209      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53210    else
53211      INCLUDE_DTRACE=true
53212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53213$as_echo "yes, forced" >&6; }
53214    fi
53215  elif test "x$enable_dtrace" = "xno"; then
53216    INCLUDE_DTRACE=false
53217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53218$as_echo "no, forced" >&6; }
53219  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53220    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53221      INCLUDE_DTRACE=false
53222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53223$as_echo "no, missing dependencies" >&6; }
53224    else
53225      INCLUDE_DTRACE=true
53226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53227$as_echo "yes, dependencies present" >&6; }
53228    fi
53229  else
53230    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53231  fi
53232
53233
53234  # Check whether --enable-aot was given.
53235if test "${enable_aot+set}" = set; then :
53236  enableval=$enable_aot;
53237fi
53238
53239
53240  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53241    ENABLE_AOT="true"
53242  elif test "x$enable_aot" = "xyes"; then
53243    ENABLE_AOT="true"
53244  elif test "x$enable_aot" = "xno"; then
53245    ENABLE_AOT="false"
53246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53247$as_echo_n "checking if aot should be enabled... " >&6; }
53248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53249$as_echo "no, forced" >&6; }
53250  else
53251    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53252  fi
53253
53254  if test "x$ENABLE_AOT" = "xtrue"; then
53255    # Only enable AOT on X64 platforms.
53256    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
53257      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53258        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53259          ENABLE_AOT="true"
53260        else
53261          ENABLE_AOT="false"
53262          if test "x$enable_aot" = "xyes"; then
53263            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53264          fi
53265        fi
53266      else
53267        ENABLE_AOT="false"
53268        if test "x$enable_aot" = "xyes"; then
53269          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53270        fi
53271      fi
53272    else
53273      ENABLE_AOT="false"
53274      if test "x$enable_aot" = "xyes"; then
53275        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53276      fi
53277    fi
53278  fi
53279
53280
53281
53282
53283  # Check whether --enable-hotspot-gtest was given.
53284if test "${enable_hotspot_gtest+set}" = set; then :
53285  enableval=$enable_hotspot_gtest;
53286fi
53287
53288
53289  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53290    GTEST_DIR_EXISTS="true"
53291  else
53292    GTEST_DIR_EXISTS="false"
53293  fi
53294
53295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53296$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53297  if test "x$enable_hotspot_gtest" = "xyes"; then
53298    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53300$as_echo "yes, forced" >&6; }
53301      BUILD_GTEST="true"
53302    else
53303      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53304    fi
53305  elif test "x$enable_hotspot_gtest" = "xno"; then
53306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53307$as_echo "no, forced" >&6; }
53308    BUILD_GTEST="false"
53309  elif test "x$enable_hotspot_gtest" = "x"; then
53310    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53312$as_echo "yes" >&6; }
53313      BUILD_GTEST="true"
53314    else
53315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53316$as_echo "no" >&6; }
53317      BUILD_GTEST="false"
53318    fi
53319  else
53320    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53321  fi
53322
53323
53324
53325
53326###############################################################################
53327#
53328# Check dependencies for external and internal libraries.
53329#
53330###############################################################################
53331
53332# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53333
53334  # When using cygwin or msys, we need a wrapper binary that renames
53335  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53336  # @files and rewrites these too! This wrapper binary is
53337  # called fixpath.
53338  FIXPATH=
53339  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53341$as_echo_n "checking if fixpath can be created... " >&6; }
53342    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53343    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53344    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53345    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53346      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53347      FIXPATH="$FIXPATH_BIN -c"
53348    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53349      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53350      # @ was chosen as separator to minimize risk of other tools messing around with it
53351      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53352          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53353      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53354      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53355    fi
53356    FIXPATH_SRC_W="$FIXPATH_SRC"
53357    FIXPATH_BIN_W="$FIXPATH_BIN"
53358
53359  unix_path="$FIXPATH_SRC_W"
53360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53361    windows_path=`$CYGPATH -m "$unix_path"`
53362    FIXPATH_SRC_W="$windows_path"
53363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53364    windows_path=`cmd //c echo $unix_path`
53365    FIXPATH_SRC_W="$windows_path"
53366  fi
53367
53368
53369  unix_path="$FIXPATH_BIN_W"
53370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53371    windows_path=`$CYGPATH -m "$unix_path"`
53372    FIXPATH_BIN_W="$windows_path"
53373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53374    windows_path=`cmd //c echo $unix_path`
53375    FIXPATH_BIN_W="$windows_path"
53376  fi
53377
53378    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53379    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53380    cd $FIXPATH_DIR
53381    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53382    cd $CURDIR
53383
53384    if test ! -x $FIXPATH_BIN; then
53385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53386$as_echo "no" >&6; }
53387      cat $FIXPATH_DIR/fixpath1.log
53388      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53389    fi
53390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53391$as_echo "yes" >&6; }
53392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53393$as_echo_n "checking if fixpath.exe works... " >&6; }
53394    cd $FIXPATH_DIR
53395    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53396        > $FIXPATH_DIR/fixpath2.log 2>&1
53397    cd $CURDIR
53398    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53400$as_echo "no" >&6; }
53401      cat $FIXPATH_DIR/fixpath2.log
53402      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53403    fi
53404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53405$as_echo "yes" >&6; }
53406
53407    FIXPATH_DETACH_FLAG="--detach"
53408  fi
53409
53410
53411
53412
53413
53414
53415  # Check if X11 is needed
53416  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53417    # No X11 support on windows or macosx
53418    NEEDS_LIB_X11=false
53419  else
53420    # All other instances need X11, even if building headless only, libawt still
53421    # needs X11 headers.
53422    NEEDS_LIB_X11=true
53423  fi
53424
53425  # Check if cups is needed
53426  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53427    # Windows have a separate print system
53428    NEEDS_LIB_CUPS=false
53429  else
53430    NEEDS_LIB_CUPS=true
53431  fi
53432
53433  # A custom hook may have set this already
53434  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53435    NEEDS_LIB_FREETYPE=true
53436  fi
53437
53438  # Check if alsa is needed
53439  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53440    NEEDS_LIB_ALSA=true
53441  else
53442    NEEDS_LIB_ALSA=false
53443  fi
53444
53445  # Check if ffi is needed
53446  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53447    NEEDS_LIB_FFI=true
53448  else
53449    NEEDS_LIB_FFI=false
53450  fi
53451
53452
53453  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53454  # dynamic build is configured on command line.
53455
53456# Check whether --with-stdc++lib was given.
53457if test "${with_stdc__lib+set}" = set; then :
53458  withval=$with_stdc__lib;
53459        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53460                && test "x$with_stdc__lib" != xdefault; then
53461          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53462        fi
53463
53464else
53465  with_stdc__lib=default
53466
53467fi
53468
53469
53470  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53471    # Test if stdc++ can be linked statically.
53472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53473$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53474    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53475    ac_ext=cpp
53476ac_cpp='$CXXCPP $CPPFLAGS'
53477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53480
53481    OLD_LIBS="$LIBS"
53482    LIBS="$STATIC_STDCXX_FLAGS"
53483    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53484/* end confdefs.h.  */
53485
53486int
53487main ()
53488{
53489return 0;
53490  ;
53491  return 0;
53492}
53493_ACEOF
53494if ac_fn_cxx_try_link "$LINENO"; then :
53495  has_static_libstdcxx=yes
53496else
53497  has_static_libstdcxx=no
53498fi
53499rm -f core conftest.err conftest.$ac_objext \
53500    conftest$ac_exeext conftest.$ac_ext
53501    LIBS="$OLD_LIBS"
53502    ac_ext=cpp
53503ac_cpp='$CXXCPP $CPPFLAGS'
53504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53507
53508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53509$as_echo "$has_static_libstdcxx" >&6; }
53510
53511    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53512      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53513    fi
53514
53515    # If dynamic was requested, it's available since it would fail above otherwise.
53516    # If dynamic wasn't requested, go with static unless it isn't available.
53517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53518$as_echo_n "checking how to link with libstdc++... " >&6; }
53519    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53520        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53522$as_echo "dynamic" >&6; }
53523    else
53524      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53525      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53526      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53527      # just use the same setting as for the TARGET toolchain.
53528      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53530$as_echo "static" >&6; }
53531    fi
53532  fi
53533
53534  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53535  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53536    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53537  fi
53538
53539
53540
53541  # Setup Windows runtime dlls
53542  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53543
53544
53545# Check whether --with-msvcr-dll was given.
53546if test "${with_msvcr_dll+set}" = set; then :
53547  withval=$with_msvcr_dll;
53548fi
53549
53550
53551  if test "x$with_msvcr_dll" != x; then
53552    # If given explicitly by user, do not probe. If not present, fail directly.
53553
53554  DLL_NAME="$MSVCR_NAME"
53555  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53556  METHOD="--with-msvcr-dll"
53557  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53559$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53560
53561    # Need to check if the found msvcr is correct architecture
53562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53563$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53564    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53566      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53567      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53569        CORRECT_MSVCR_ARCH="PE32 executable"
53570      else
53571        CORRECT_MSVCR_ARCH="PE32+ executable"
53572      fi
53573    else
53574      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53575        CORRECT_MSVCR_ARCH=386
53576      else
53577        CORRECT_MSVCR_ARCH=x86-64
53578      fi
53579    fi
53580    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53582$as_echo "ok" >&6; }
53583      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53584
53585  # Only process if variable expands to non-empty
53586
53587  if test "x$MSVC_DLL" != x; then
53588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53589
53590  # Input might be given as Windows format, start by converting to
53591  # unix format.
53592  path="$MSVC_DLL"
53593  new_path=`$CYGPATH -u "$path"`
53594
53595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53598  # "foo.exe" is OK but "foo" is an error.
53599  #
53600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53601  # It is also a way to make sure we got the proper file name for the real test later on.
53602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53603  if test "x$test_shortpath" = x; then
53604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53605$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53606    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53607  fi
53608
53609  # Call helper function which possibly converts this using DOS-style short mode.
53610  # If so, the updated path is stored in $new_path.
53611
53612  input_path="$new_path"
53613  # Check if we need to convert this using DOS-style short mode. If the path
53614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53615  # take no chances and rewrite it.
53616  # Note: m4 eats our [], so we need to use [ and ] instead.
53617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53618  if test "x$has_forbidden_chars" != x; then
53619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53623      # Going to short mode and back again did indeed matter. Since short mode is
53624      # case insensitive, let's make it lowercase to improve readability.
53625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53626      # Now convert it back to Unix-style (cygpath)
53627      input_path=`$CYGPATH -u "$shortmode_path"`
53628      new_path="$input_path"
53629    fi
53630  fi
53631
53632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53633  if test "x$test_cygdrive_prefix" = x; then
53634    # As a simple fix, exclude /usr/bin since it's not a real path.
53635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53637      # a path prefixed by /cygdrive for fixpath to work.
53638      new_path="$CYGWIN_ROOT_PATH$input_path"
53639    fi
53640  fi
53641
53642
53643  if test "x$path" != "x$new_path"; then
53644    MSVC_DLL="$new_path"
53645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53646$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53647  fi
53648
53649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53650
53651  path="$MSVC_DLL"
53652  has_colon=`$ECHO $path | $GREP ^.:`
53653  new_path="$path"
53654  if test "x$has_colon" = x; then
53655    # Not in mixed or Windows style, start by that.
53656    new_path=`cmd //c echo $path`
53657  fi
53658
53659
53660  input_path="$new_path"
53661  # Check if we need to convert this using DOS-style short mode. If the path
53662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53663  # take no chances and rewrite it.
53664  # Note: m4 eats our [], so we need to use [ and ] instead.
53665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53666  if test "x$has_forbidden_chars" != x; then
53667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53669  fi
53670
53671
53672  windows_path="$new_path"
53673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53674    unix_path=`$CYGPATH -u "$windows_path"`
53675    new_path="$unix_path"
53676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53678    new_path="$unix_path"
53679  fi
53680
53681  if test "x$path" != "x$new_path"; then
53682    MSVC_DLL="$new_path"
53683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53684$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53685  fi
53686
53687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53689
53690    else
53691      # We're on a unix platform. Hooray! :)
53692      path="$MSVC_DLL"
53693      has_space=`$ECHO "$path" | $GREP " "`
53694      if test "x$has_space" != x; then
53695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53696$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53698      fi
53699
53700      # Use eval to expand a potential ~
53701      eval path="$path"
53702      if test ! -f "$path" && test ! -d "$path"; then
53703        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53704      fi
53705
53706      if test -d "$path"; then
53707        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53708      else
53709        dir="`$DIRNAME "$path"`"
53710        base="`$BASENAME "$path"`"
53711        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53712      fi
53713    fi
53714  fi
53715
53716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53717$as_echo_n "checking for $DLL_NAME... " >&6; }
53718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53719$as_echo "$MSVC_DLL" >&6; }
53720    else
53721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53722$as_echo "incorrect, ignoring" >&6; }
53723      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53724$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53725    fi
53726  fi
53727
53728    if test "x$MSVC_DLL" = x; then
53729      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53730    fi
53731    MSVCR_DLL="$MSVC_DLL"
53732  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53733
53734  DLL_NAME="$MSVCR_NAME"
53735  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53736  METHOD="devkit"
53737  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53738    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53739$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53740
53741    # Need to check if the found msvcr is correct architecture
53742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53743$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53744    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53746      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53747      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53748      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53749        CORRECT_MSVCR_ARCH="PE32 executable"
53750      else
53751        CORRECT_MSVCR_ARCH="PE32+ executable"
53752      fi
53753    else
53754      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53755        CORRECT_MSVCR_ARCH=386
53756      else
53757        CORRECT_MSVCR_ARCH=x86-64
53758      fi
53759    fi
53760    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53762$as_echo "ok" >&6; }
53763      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53764
53765  # Only process if variable expands to non-empty
53766
53767  if test "x$MSVC_DLL" != x; then
53768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53769
53770  # Input might be given as Windows format, start by converting to
53771  # unix format.
53772  path="$MSVC_DLL"
53773  new_path=`$CYGPATH -u "$path"`
53774
53775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53778  # "foo.exe" is OK but "foo" is an error.
53779  #
53780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53781  # It is also a way to make sure we got the proper file name for the real test later on.
53782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53783  if test "x$test_shortpath" = x; then
53784    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53785$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53786    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53787  fi
53788
53789  # Call helper function which possibly converts this using DOS-style short mode.
53790  # If so, the updated path is stored in $new_path.
53791
53792  input_path="$new_path"
53793  # Check if we need to convert this using DOS-style short mode. If the path
53794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53795  # take no chances and rewrite it.
53796  # Note: m4 eats our [], so we need to use [ and ] instead.
53797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53798  if test "x$has_forbidden_chars" != x; then
53799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53803      # Going to short mode and back again did indeed matter. Since short mode is
53804      # case insensitive, let's make it lowercase to improve readability.
53805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53806      # Now convert it back to Unix-style (cygpath)
53807      input_path=`$CYGPATH -u "$shortmode_path"`
53808      new_path="$input_path"
53809    fi
53810  fi
53811
53812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53813  if test "x$test_cygdrive_prefix" = x; then
53814    # As a simple fix, exclude /usr/bin since it's not a real path.
53815    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53817      # a path prefixed by /cygdrive for fixpath to work.
53818      new_path="$CYGWIN_ROOT_PATH$input_path"
53819    fi
53820  fi
53821
53822
53823  if test "x$path" != "x$new_path"; then
53824    MSVC_DLL="$new_path"
53825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53826$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53827  fi
53828
53829    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53830
53831  path="$MSVC_DLL"
53832  has_colon=`$ECHO $path | $GREP ^.:`
53833  new_path="$path"
53834  if test "x$has_colon" = x; then
53835    # Not in mixed or Windows style, start by that.
53836    new_path=`cmd //c echo $path`
53837  fi
53838
53839
53840  input_path="$new_path"
53841  # Check if we need to convert this using DOS-style short mode. If the path
53842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53843  # take no chances and rewrite it.
53844  # Note: m4 eats our [], so we need to use [ and ] instead.
53845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53846  if test "x$has_forbidden_chars" != x; then
53847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53849  fi
53850
53851
53852  windows_path="$new_path"
53853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53854    unix_path=`$CYGPATH -u "$windows_path"`
53855    new_path="$unix_path"
53856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53858    new_path="$unix_path"
53859  fi
53860
53861  if test "x$path" != "x$new_path"; then
53862    MSVC_DLL="$new_path"
53863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53864$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53865  fi
53866
53867  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53868  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53869
53870    else
53871      # We're on a unix platform. Hooray! :)
53872      path="$MSVC_DLL"
53873      has_space=`$ECHO "$path" | $GREP " "`
53874      if test "x$has_space" != x; then
53875        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53876$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53877        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53878      fi
53879
53880      # Use eval to expand a potential ~
53881      eval path="$path"
53882      if test ! -f "$path" && test ! -d "$path"; then
53883        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53884      fi
53885
53886      if test -d "$path"; then
53887        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53888      else
53889        dir="`$DIRNAME "$path"`"
53890        base="`$BASENAME "$path"`"
53891        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53892      fi
53893    fi
53894  fi
53895
53896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53897$as_echo_n "checking for $DLL_NAME... " >&6; }
53898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53899$as_echo "$MSVC_DLL" >&6; }
53900    else
53901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53902$as_echo "incorrect, ignoring" >&6; }
53903      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53904$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53905    fi
53906  fi
53907
53908    if test "x$MSVC_DLL" = x; then
53909      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53910    fi
53911    MSVCR_DLL="$MSVC_DLL"
53912  else
53913
53914  DLL_NAME="${MSVCR_NAME}"
53915  MSVC_DLL=
53916
53917  if test "x$MSVC_DLL" = x; then
53918    # Probe: Using well-known location from Visual Studio 10.0
53919    if test "x$VCINSTALLDIR" != x; then
53920      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53921
53922  windows_path="$CYGWIN_VC_INSTALL_DIR"
53923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53924    unix_path=`$CYGPATH -u "$windows_path"`
53925    CYGWIN_VC_INSTALL_DIR="$unix_path"
53926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53928    CYGWIN_VC_INSTALL_DIR="$unix_path"
53929  fi
53930
53931      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53932        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53933      else
53934        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53935      fi
53936      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53937
53938  DLL_NAME="$DLL_NAME"
53939  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53940  METHOD="well-known location in VCINSTALLDIR"
53941  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53942    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53943$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53944
53945    # Need to check if the found msvcr is correct architecture
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53947$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53948    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53950      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53951      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53952      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53953        CORRECT_MSVCR_ARCH="PE32 executable"
53954      else
53955        CORRECT_MSVCR_ARCH="PE32+ executable"
53956      fi
53957    else
53958      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53959        CORRECT_MSVCR_ARCH=386
53960      else
53961        CORRECT_MSVCR_ARCH=x86-64
53962      fi
53963    fi
53964    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53966$as_echo "ok" >&6; }
53967      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53968
53969  # Only process if variable expands to non-empty
53970
53971  if test "x$MSVC_DLL" != x; then
53972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53973
53974  # Input might be given as Windows format, start by converting to
53975  # unix format.
53976  path="$MSVC_DLL"
53977  new_path=`$CYGPATH -u "$path"`
53978
53979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53982  # "foo.exe" is OK but "foo" is an error.
53983  #
53984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53985  # It is also a way to make sure we got the proper file name for the real test later on.
53986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53987  if test "x$test_shortpath" = x; then
53988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53989$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53990    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53991  fi
53992
53993  # Call helper function which possibly converts this using DOS-style short mode.
53994  # If so, the updated path is stored in $new_path.
53995
53996  input_path="$new_path"
53997  # Check if we need to convert this using DOS-style short mode. If the path
53998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53999  # take no chances and rewrite it.
54000  # Note: m4 eats our [], so we need to use [ and ] instead.
54001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54002  if test "x$has_forbidden_chars" != x; then
54003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54007      # Going to short mode and back again did indeed matter. Since short mode is
54008      # case insensitive, let's make it lowercase to improve readability.
54009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54010      # Now convert it back to Unix-style (cygpath)
54011      input_path=`$CYGPATH -u "$shortmode_path"`
54012      new_path="$input_path"
54013    fi
54014  fi
54015
54016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54017  if test "x$test_cygdrive_prefix" = x; then
54018    # As a simple fix, exclude /usr/bin since it's not a real path.
54019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54021      # a path prefixed by /cygdrive for fixpath to work.
54022      new_path="$CYGWIN_ROOT_PATH$input_path"
54023    fi
54024  fi
54025
54026
54027  if test "x$path" != "x$new_path"; then
54028    MSVC_DLL="$new_path"
54029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54030$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54031  fi
54032
54033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54034
54035  path="$MSVC_DLL"
54036  has_colon=`$ECHO $path | $GREP ^.:`
54037  new_path="$path"
54038  if test "x$has_colon" = x; then
54039    # Not in mixed or Windows style, start by that.
54040    new_path=`cmd //c echo $path`
54041  fi
54042
54043
54044  input_path="$new_path"
54045  # Check if we need to convert this using DOS-style short mode. If the path
54046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54047  # take no chances and rewrite it.
54048  # Note: m4 eats our [], so we need to use [ and ] instead.
54049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54050  if test "x$has_forbidden_chars" != x; then
54051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54053  fi
54054
54055
54056  windows_path="$new_path"
54057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54058    unix_path=`$CYGPATH -u "$windows_path"`
54059    new_path="$unix_path"
54060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54062    new_path="$unix_path"
54063  fi
54064
54065  if test "x$path" != "x$new_path"; then
54066    MSVC_DLL="$new_path"
54067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54068$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54069  fi
54070
54071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54073
54074    else
54075      # We're on a unix platform. Hooray! :)
54076      path="$MSVC_DLL"
54077      has_space=`$ECHO "$path" | $GREP " "`
54078      if test "x$has_space" != x; then
54079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54080$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54082      fi
54083
54084      # Use eval to expand a potential ~
54085      eval path="$path"
54086      if test ! -f "$path" && test ! -d "$path"; then
54087        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54088      fi
54089
54090      if test -d "$path"; then
54091        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54092      else
54093        dir="`$DIRNAME "$path"`"
54094        base="`$BASENAME "$path"`"
54095        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54096      fi
54097    fi
54098  fi
54099
54100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54101$as_echo_n "checking for $DLL_NAME... " >&6; }
54102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54103$as_echo "$MSVC_DLL" >&6; }
54104    else
54105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54106$as_echo "incorrect, ignoring" >&6; }
54107      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54108$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54109    fi
54110  fi
54111
54112    fi
54113  fi
54114
54115  if test "x$MSVC_DLL" = x; then
54116    # Probe: Check in the Boot JDK directory.
54117    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54118
54119  DLL_NAME="$DLL_NAME"
54120  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54121  METHOD="well-known location in Boot JDK"
54122  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54124$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54125
54126    # Need to check if the found msvcr is correct architecture
54127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54128$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54129    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54131      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54132      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54133      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54134        CORRECT_MSVCR_ARCH="PE32 executable"
54135      else
54136        CORRECT_MSVCR_ARCH="PE32+ executable"
54137      fi
54138    else
54139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54140        CORRECT_MSVCR_ARCH=386
54141      else
54142        CORRECT_MSVCR_ARCH=x86-64
54143      fi
54144    fi
54145    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54147$as_echo "ok" >&6; }
54148      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54149
54150  # Only process if variable expands to non-empty
54151
54152  if test "x$MSVC_DLL" != x; then
54153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54154
54155  # Input might be given as Windows format, start by converting to
54156  # unix format.
54157  path="$MSVC_DLL"
54158  new_path=`$CYGPATH -u "$path"`
54159
54160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54163  # "foo.exe" is OK but "foo" is an error.
54164  #
54165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54166  # It is also a way to make sure we got the proper file name for the real test later on.
54167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54168  if test "x$test_shortpath" = x; then
54169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54170$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54171    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54172  fi
54173
54174  # Call helper function which possibly converts this using DOS-style short mode.
54175  # If so, the updated path is stored in $new_path.
54176
54177  input_path="$new_path"
54178  # Check if we need to convert this using DOS-style short mode. If the path
54179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54180  # take no chances and rewrite it.
54181  # Note: m4 eats our [], so we need to use [ and ] instead.
54182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54183  if test "x$has_forbidden_chars" != x; then
54184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54188      # Going to short mode and back again did indeed matter. Since short mode is
54189      # case insensitive, let's make it lowercase to improve readability.
54190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54191      # Now convert it back to Unix-style (cygpath)
54192      input_path=`$CYGPATH -u "$shortmode_path"`
54193      new_path="$input_path"
54194    fi
54195  fi
54196
54197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54198  if test "x$test_cygdrive_prefix" = x; then
54199    # As a simple fix, exclude /usr/bin since it's not a real path.
54200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54202      # a path prefixed by /cygdrive for fixpath to work.
54203      new_path="$CYGWIN_ROOT_PATH$input_path"
54204    fi
54205  fi
54206
54207
54208  if test "x$path" != "x$new_path"; then
54209    MSVC_DLL="$new_path"
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54211$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54212  fi
54213
54214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54215
54216  path="$MSVC_DLL"
54217  has_colon=`$ECHO $path | $GREP ^.:`
54218  new_path="$path"
54219  if test "x$has_colon" = x; then
54220    # Not in mixed or Windows style, start by that.
54221    new_path=`cmd //c echo $path`
54222  fi
54223
54224
54225  input_path="$new_path"
54226  # Check if we need to convert this using DOS-style short mode. If the path
54227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54228  # take no chances and rewrite it.
54229  # Note: m4 eats our [], so we need to use [ and ] instead.
54230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54231  if test "x$has_forbidden_chars" != x; then
54232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54234  fi
54235
54236
54237  windows_path="$new_path"
54238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54239    unix_path=`$CYGPATH -u "$windows_path"`
54240    new_path="$unix_path"
54241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54243    new_path="$unix_path"
54244  fi
54245
54246  if test "x$path" != "x$new_path"; then
54247    MSVC_DLL="$new_path"
54248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54249$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54250  fi
54251
54252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54254
54255    else
54256      # We're on a unix platform. Hooray! :)
54257      path="$MSVC_DLL"
54258      has_space=`$ECHO "$path" | $GREP " "`
54259      if test "x$has_space" != x; then
54260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54263      fi
54264
54265      # Use eval to expand a potential ~
54266      eval path="$path"
54267      if test ! -f "$path" && test ! -d "$path"; then
54268        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54269      fi
54270
54271      if test -d "$path"; then
54272        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54273      else
54274        dir="`$DIRNAME "$path"`"
54275        base="`$BASENAME "$path"`"
54276        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54277      fi
54278    fi
54279  fi
54280
54281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54282$as_echo_n "checking for $DLL_NAME... " >&6; }
54283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54284$as_echo "$MSVC_DLL" >&6; }
54285    else
54286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54287$as_echo "incorrect, ignoring" >&6; }
54288      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54289$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54290    fi
54291  fi
54292
54293  fi
54294
54295  if test "x$MSVC_DLL" = x; then
54296    # Probe: Look in the Windows system32 directory
54297    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54298
54299  windows_path="$CYGWIN_SYSTEMROOT"
54300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54301    unix_path=`$CYGPATH -u "$windows_path"`
54302    CYGWIN_SYSTEMROOT="$unix_path"
54303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54305    CYGWIN_SYSTEMROOT="$unix_path"
54306  fi
54307
54308    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54309
54310  DLL_NAME="$DLL_NAME"
54311  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54312  METHOD="well-known location in SYSTEMROOT"
54313  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54315$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54316
54317    # Need to check if the found msvcr is correct architecture
54318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54319$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54320    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54322      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54323      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54324      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54325        CORRECT_MSVCR_ARCH="PE32 executable"
54326      else
54327        CORRECT_MSVCR_ARCH="PE32+ executable"
54328      fi
54329    else
54330      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54331        CORRECT_MSVCR_ARCH=386
54332      else
54333        CORRECT_MSVCR_ARCH=x86-64
54334      fi
54335    fi
54336    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54338$as_echo "ok" >&6; }
54339      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54340
54341  # Only process if variable expands to non-empty
54342
54343  if test "x$MSVC_DLL" != x; then
54344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54345
54346  # Input might be given as Windows format, start by converting to
54347  # unix format.
54348  path="$MSVC_DLL"
54349  new_path=`$CYGPATH -u "$path"`
54350
54351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54354  # "foo.exe" is OK but "foo" is an error.
54355  #
54356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54357  # It is also a way to make sure we got the proper file name for the real test later on.
54358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54359  if test "x$test_shortpath" = x; then
54360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54361$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54362    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54363  fi
54364
54365  # Call helper function which possibly converts this using DOS-style short mode.
54366  # If so, the updated path is stored in $new_path.
54367
54368  input_path="$new_path"
54369  # Check if we need to convert this using DOS-style short mode. If the path
54370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54371  # take no chances and rewrite it.
54372  # Note: m4 eats our [], so we need to use [ and ] instead.
54373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54374  if test "x$has_forbidden_chars" != x; then
54375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54379      # Going to short mode and back again did indeed matter. Since short mode is
54380      # case insensitive, let's make it lowercase to improve readability.
54381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54382      # Now convert it back to Unix-style (cygpath)
54383      input_path=`$CYGPATH -u "$shortmode_path"`
54384      new_path="$input_path"
54385    fi
54386  fi
54387
54388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54389  if test "x$test_cygdrive_prefix" = x; then
54390    # As a simple fix, exclude /usr/bin since it's not a real path.
54391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54393      # a path prefixed by /cygdrive for fixpath to work.
54394      new_path="$CYGWIN_ROOT_PATH$input_path"
54395    fi
54396  fi
54397
54398
54399  if test "x$path" != "x$new_path"; then
54400    MSVC_DLL="$new_path"
54401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54402$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54403  fi
54404
54405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54406
54407  path="$MSVC_DLL"
54408  has_colon=`$ECHO $path | $GREP ^.:`
54409  new_path="$path"
54410  if test "x$has_colon" = x; then
54411    # Not in mixed or Windows style, start by that.
54412    new_path=`cmd //c echo $path`
54413  fi
54414
54415
54416  input_path="$new_path"
54417  # Check if we need to convert this using DOS-style short mode. If the path
54418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54419  # take no chances and rewrite it.
54420  # Note: m4 eats our [], so we need to use [ and ] instead.
54421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54422  if test "x$has_forbidden_chars" != x; then
54423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54425  fi
54426
54427
54428  windows_path="$new_path"
54429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54430    unix_path=`$CYGPATH -u "$windows_path"`
54431    new_path="$unix_path"
54432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54434    new_path="$unix_path"
54435  fi
54436
54437  if test "x$path" != "x$new_path"; then
54438    MSVC_DLL="$new_path"
54439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54440$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54441  fi
54442
54443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54445
54446    else
54447      # We're on a unix platform. Hooray! :)
54448      path="$MSVC_DLL"
54449      has_space=`$ECHO "$path" | $GREP " "`
54450      if test "x$has_space" != x; then
54451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54452$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54454      fi
54455
54456      # Use eval to expand a potential ~
54457      eval path="$path"
54458      if test ! -f "$path" && test ! -d "$path"; then
54459        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54460      fi
54461
54462      if test -d "$path"; then
54463        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54464      else
54465        dir="`$DIRNAME "$path"`"
54466        base="`$BASENAME "$path"`"
54467        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54468      fi
54469    fi
54470  fi
54471
54472      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54473$as_echo_n "checking for $DLL_NAME... " >&6; }
54474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54475$as_echo "$MSVC_DLL" >&6; }
54476    else
54477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54478$as_echo "incorrect, ignoring" >&6; }
54479      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54480$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54481    fi
54482  fi
54483
54484  fi
54485
54486  if test "x$MSVC_DLL" = x; then
54487    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54488    if test "x$VS100COMNTOOLS" != x; then
54489      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54490
54491  windows_path="$CYGWIN_VS_TOOLS_DIR"
54492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54493    unix_path=`$CYGPATH -u "$windows_path"`
54494    CYGWIN_VS_TOOLS_DIR="$unix_path"
54495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54497    CYGWIN_VS_TOOLS_DIR="$unix_path"
54498  fi
54499
54500      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54501        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54502	    | $GREP -i /x64/ | $HEAD --lines 1`
54503      else
54504        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54505	    | $GREP -i /x86/ | $HEAD --lines 1`
54506      fi
54507
54508  DLL_NAME="$DLL_NAME"
54509  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54510  METHOD="search of VS100COMNTOOLS"
54511  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54512    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54513$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54514
54515    # Need to check if the found msvcr is correct architecture
54516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54517$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54518    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54520      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54521      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54522      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54523        CORRECT_MSVCR_ARCH="PE32 executable"
54524      else
54525        CORRECT_MSVCR_ARCH="PE32+ executable"
54526      fi
54527    else
54528      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54529        CORRECT_MSVCR_ARCH=386
54530      else
54531        CORRECT_MSVCR_ARCH=x86-64
54532      fi
54533    fi
54534    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54536$as_echo "ok" >&6; }
54537      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54538
54539  # Only process if variable expands to non-empty
54540
54541  if test "x$MSVC_DLL" != x; then
54542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54543
54544  # Input might be given as Windows format, start by converting to
54545  # unix format.
54546  path="$MSVC_DLL"
54547  new_path=`$CYGPATH -u "$path"`
54548
54549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54552  # "foo.exe" is OK but "foo" is an error.
54553  #
54554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54555  # It is also a way to make sure we got the proper file name for the real test later on.
54556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54557  if test "x$test_shortpath" = x; then
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54559$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54560    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54561  fi
54562
54563  # Call helper function which possibly converts this using DOS-style short mode.
54564  # If so, the updated path is stored in $new_path.
54565
54566  input_path="$new_path"
54567  # Check if we need to convert this using DOS-style short mode. If the path
54568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54569  # take no chances and rewrite it.
54570  # Note: m4 eats our [], so we need to use [ and ] instead.
54571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54572  if test "x$has_forbidden_chars" != x; then
54573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54577      # Going to short mode and back again did indeed matter. Since short mode is
54578      # case insensitive, let's make it lowercase to improve readability.
54579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54580      # Now convert it back to Unix-style (cygpath)
54581      input_path=`$CYGPATH -u "$shortmode_path"`
54582      new_path="$input_path"
54583    fi
54584  fi
54585
54586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54587  if test "x$test_cygdrive_prefix" = x; then
54588    # As a simple fix, exclude /usr/bin since it's not a real path.
54589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54591      # a path prefixed by /cygdrive for fixpath to work.
54592      new_path="$CYGWIN_ROOT_PATH$input_path"
54593    fi
54594  fi
54595
54596
54597  if test "x$path" != "x$new_path"; then
54598    MSVC_DLL="$new_path"
54599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54600$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54601  fi
54602
54603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54604
54605  path="$MSVC_DLL"
54606  has_colon=`$ECHO $path | $GREP ^.:`
54607  new_path="$path"
54608  if test "x$has_colon" = x; then
54609    # Not in mixed or Windows style, start by that.
54610    new_path=`cmd //c echo $path`
54611  fi
54612
54613
54614  input_path="$new_path"
54615  # Check if we need to convert this using DOS-style short mode. If the path
54616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54617  # take no chances and rewrite it.
54618  # Note: m4 eats our [], so we need to use [ and ] instead.
54619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54620  if test "x$has_forbidden_chars" != x; then
54621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54623  fi
54624
54625
54626  windows_path="$new_path"
54627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54628    unix_path=`$CYGPATH -u "$windows_path"`
54629    new_path="$unix_path"
54630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54632    new_path="$unix_path"
54633  fi
54634
54635  if test "x$path" != "x$new_path"; then
54636    MSVC_DLL="$new_path"
54637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54638$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54639  fi
54640
54641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54643
54644    else
54645      # We're on a unix platform. Hooray! :)
54646      path="$MSVC_DLL"
54647      has_space=`$ECHO "$path" | $GREP " "`
54648      if test "x$has_space" != x; then
54649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54650$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54652      fi
54653
54654      # Use eval to expand a potential ~
54655      eval path="$path"
54656      if test ! -f "$path" && test ! -d "$path"; then
54657        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54658      fi
54659
54660      if test -d "$path"; then
54661        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54662      else
54663        dir="`$DIRNAME "$path"`"
54664        base="`$BASENAME "$path"`"
54665        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54666      fi
54667    fi
54668  fi
54669
54670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54671$as_echo_n "checking for $DLL_NAME... " >&6; }
54672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54673$as_echo "$MSVC_DLL" >&6; }
54674    else
54675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54676$as_echo "incorrect, ignoring" >&6; }
54677      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54678$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54679    fi
54680  fi
54681
54682    fi
54683  fi
54684
54685  if test "x$MSVC_DLL" = x; then
54686    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54687    # (This was the original behaviour; kept since it might turn something up)
54688    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54689      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54690        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54691	    | $GREP x64 | $HEAD --lines 1`
54692      else
54693        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54694	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54695        if test "x$POSSIBLE_MSVC_DLL" = x; then
54696          # We're grasping at straws now...
54697          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54698	      | $HEAD --lines 1`
54699        fi
54700      fi
54701
54702
54703  DLL_NAME="$DLL_NAME"
54704  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54705  METHOD="search of VCINSTALLDIR"
54706  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54708$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54709
54710    # Need to check if the found msvcr is correct architecture
54711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54712$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54713    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54715      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54716      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54717      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54718        CORRECT_MSVCR_ARCH="PE32 executable"
54719      else
54720        CORRECT_MSVCR_ARCH="PE32+ executable"
54721      fi
54722    else
54723      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54724        CORRECT_MSVCR_ARCH=386
54725      else
54726        CORRECT_MSVCR_ARCH=x86-64
54727      fi
54728    fi
54729    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54731$as_echo "ok" >&6; }
54732      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54733
54734  # Only process if variable expands to non-empty
54735
54736  if test "x$MSVC_DLL" != x; then
54737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54738
54739  # Input might be given as Windows format, start by converting to
54740  # unix format.
54741  path="$MSVC_DLL"
54742  new_path=`$CYGPATH -u "$path"`
54743
54744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54747  # "foo.exe" is OK but "foo" is an error.
54748  #
54749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54750  # It is also a way to make sure we got the proper file name for the real test later on.
54751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54752  if test "x$test_shortpath" = x; then
54753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54754$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54755    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54756  fi
54757
54758  # Call helper function which possibly converts this using DOS-style short mode.
54759  # If so, the updated path is stored in $new_path.
54760
54761  input_path="$new_path"
54762  # Check if we need to convert this using DOS-style short mode. If the path
54763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54764  # take no chances and rewrite it.
54765  # Note: m4 eats our [], so we need to use [ and ] instead.
54766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54767  if test "x$has_forbidden_chars" != x; then
54768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54772      # Going to short mode and back again did indeed matter. Since short mode is
54773      # case insensitive, let's make it lowercase to improve readability.
54774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54775      # Now convert it back to Unix-style (cygpath)
54776      input_path=`$CYGPATH -u "$shortmode_path"`
54777      new_path="$input_path"
54778    fi
54779  fi
54780
54781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54782  if test "x$test_cygdrive_prefix" = x; then
54783    # As a simple fix, exclude /usr/bin since it's not a real path.
54784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54786      # a path prefixed by /cygdrive for fixpath to work.
54787      new_path="$CYGWIN_ROOT_PATH$input_path"
54788    fi
54789  fi
54790
54791
54792  if test "x$path" != "x$new_path"; then
54793    MSVC_DLL="$new_path"
54794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54795$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54796  fi
54797
54798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54799
54800  path="$MSVC_DLL"
54801  has_colon=`$ECHO $path | $GREP ^.:`
54802  new_path="$path"
54803  if test "x$has_colon" = x; then
54804    # Not in mixed or Windows style, start by that.
54805    new_path=`cmd //c echo $path`
54806  fi
54807
54808
54809  input_path="$new_path"
54810  # Check if we need to convert this using DOS-style short mode. If the path
54811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54812  # take no chances and rewrite it.
54813  # Note: m4 eats our [], so we need to use [ and ] instead.
54814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54815  if test "x$has_forbidden_chars" != x; then
54816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54818  fi
54819
54820
54821  windows_path="$new_path"
54822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54823    unix_path=`$CYGPATH -u "$windows_path"`
54824    new_path="$unix_path"
54825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54827    new_path="$unix_path"
54828  fi
54829
54830  if test "x$path" != "x$new_path"; then
54831    MSVC_DLL="$new_path"
54832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54833$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54834  fi
54835
54836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54838
54839    else
54840      # We're on a unix platform. Hooray! :)
54841      path="$MSVC_DLL"
54842      has_space=`$ECHO "$path" | $GREP " "`
54843      if test "x$has_space" != x; then
54844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54845$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54846        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54847      fi
54848
54849      # Use eval to expand a potential ~
54850      eval path="$path"
54851      if test ! -f "$path" && test ! -d "$path"; then
54852        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54853      fi
54854
54855      if test -d "$path"; then
54856        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54857      else
54858        dir="`$DIRNAME "$path"`"
54859        base="`$BASENAME "$path"`"
54860        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54861      fi
54862    fi
54863  fi
54864
54865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54866$as_echo_n "checking for $DLL_NAME... " >&6; }
54867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54868$as_echo "$MSVC_DLL" >&6; }
54869    else
54870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54871$as_echo "incorrect, ignoring" >&6; }
54872      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54873$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54874    fi
54875  fi
54876
54877    fi
54878  fi
54879
54880  if test "x$MSVC_DLL" = x; then
54881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54882$as_echo_n "checking for $DLL_NAME... " >&6; }
54883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54884$as_echo "no" >&6; }
54885    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54886  fi
54887
54888    MSVCR_DLL="$MSVC_DLL"
54889  fi
54890
54891
54892
54893# Check whether --with-msvcp-dll was given.
54894if test "${with_msvcp_dll+set}" = set; then :
54895  withval=$with_msvcp_dll;
54896fi
54897
54898
54899  if test "x$MSVCP_NAME" != "x"; then
54900    if test "x$with_msvcp_dll" != x; then
54901      # If given explicitly by user, do not probe. If not present, fail directly.
54902
54903  DLL_NAME="$MSVCP_NAME"
54904  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54905  METHOD="--with-msvcp-dll"
54906  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54908$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54909
54910    # Need to check if the found msvcr is correct architecture
54911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54912$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54913    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54915      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54916      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54917      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54918        CORRECT_MSVCR_ARCH="PE32 executable"
54919      else
54920        CORRECT_MSVCR_ARCH="PE32+ executable"
54921      fi
54922    else
54923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54924        CORRECT_MSVCR_ARCH=386
54925      else
54926        CORRECT_MSVCR_ARCH=x86-64
54927      fi
54928    fi
54929    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54931$as_echo "ok" >&6; }
54932      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54933
54934  # Only process if variable expands to non-empty
54935
54936  if test "x$MSVC_DLL" != x; then
54937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54938
54939  # Input might be given as Windows format, start by converting to
54940  # unix format.
54941  path="$MSVC_DLL"
54942  new_path=`$CYGPATH -u "$path"`
54943
54944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54947  # "foo.exe" is OK but "foo" is an error.
54948  #
54949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54950  # It is also a way to make sure we got the proper file name for the real test later on.
54951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54952  if test "x$test_shortpath" = x; then
54953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54954$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54955    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54956  fi
54957
54958  # Call helper function which possibly converts this using DOS-style short mode.
54959  # If so, the updated path is stored in $new_path.
54960
54961  input_path="$new_path"
54962  # Check if we need to convert this using DOS-style short mode. If the path
54963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54964  # take no chances and rewrite it.
54965  # Note: m4 eats our [], so we need to use [ and ] instead.
54966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54967  if test "x$has_forbidden_chars" != x; then
54968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54972      # Going to short mode and back again did indeed matter. Since short mode is
54973      # case insensitive, let's make it lowercase to improve readability.
54974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54975      # Now convert it back to Unix-style (cygpath)
54976      input_path=`$CYGPATH -u "$shortmode_path"`
54977      new_path="$input_path"
54978    fi
54979  fi
54980
54981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54982  if test "x$test_cygdrive_prefix" = x; then
54983    # As a simple fix, exclude /usr/bin since it's not a real path.
54984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54986      # a path prefixed by /cygdrive for fixpath to work.
54987      new_path="$CYGWIN_ROOT_PATH$input_path"
54988    fi
54989  fi
54990
54991
54992  if test "x$path" != "x$new_path"; then
54993    MSVC_DLL="$new_path"
54994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54995$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54996  fi
54997
54998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54999
55000  path="$MSVC_DLL"
55001  has_colon=`$ECHO $path | $GREP ^.:`
55002  new_path="$path"
55003  if test "x$has_colon" = x; then
55004    # Not in mixed or Windows style, start by that.
55005    new_path=`cmd //c echo $path`
55006  fi
55007
55008
55009  input_path="$new_path"
55010  # Check if we need to convert this using DOS-style short mode. If the path
55011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55012  # take no chances and rewrite it.
55013  # Note: m4 eats our [], so we need to use [ and ] instead.
55014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55015  if test "x$has_forbidden_chars" != x; then
55016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55018  fi
55019
55020
55021  windows_path="$new_path"
55022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55023    unix_path=`$CYGPATH -u "$windows_path"`
55024    new_path="$unix_path"
55025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55027    new_path="$unix_path"
55028  fi
55029
55030  if test "x$path" != "x$new_path"; then
55031    MSVC_DLL="$new_path"
55032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55033$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55034  fi
55035
55036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55038
55039    else
55040      # We're on a unix platform. Hooray! :)
55041      path="$MSVC_DLL"
55042      has_space=`$ECHO "$path" | $GREP " "`
55043      if test "x$has_space" != x; then
55044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55045$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55047      fi
55048
55049      # Use eval to expand a potential ~
55050      eval path="$path"
55051      if test ! -f "$path" && test ! -d "$path"; then
55052        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55053      fi
55054
55055      if test -d "$path"; then
55056        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55057      else
55058        dir="`$DIRNAME "$path"`"
55059        base="`$BASENAME "$path"`"
55060        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55061      fi
55062    fi
55063  fi
55064
55065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55066$as_echo_n "checking for $DLL_NAME... " >&6; }
55067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55068$as_echo "$MSVC_DLL" >&6; }
55069    else
55070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55071$as_echo "incorrect, ignoring" >&6; }
55072      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55073$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55074    fi
55075  fi
55076
55077      if test "x$MSVC_DLL" = x; then
55078        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55079      fi
55080      MSVCP_DLL="$MSVC_DLL"
55081    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55082
55083  DLL_NAME="$MSVCP_NAME"
55084  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55085  METHOD="devkit"
55086  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55087    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55088$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55089
55090    # Need to check if the found msvcr is correct architecture
55091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55092$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55093    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55095      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55096      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55097      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55098        CORRECT_MSVCR_ARCH="PE32 executable"
55099      else
55100        CORRECT_MSVCR_ARCH="PE32+ executable"
55101      fi
55102    else
55103      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55104        CORRECT_MSVCR_ARCH=386
55105      else
55106        CORRECT_MSVCR_ARCH=x86-64
55107      fi
55108    fi
55109    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55111$as_echo "ok" >&6; }
55112      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55113
55114  # Only process if variable expands to non-empty
55115
55116  if test "x$MSVC_DLL" != x; then
55117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55118
55119  # Input might be given as Windows format, start by converting to
55120  # unix format.
55121  path="$MSVC_DLL"
55122  new_path=`$CYGPATH -u "$path"`
55123
55124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55127  # "foo.exe" is OK but "foo" is an error.
55128  #
55129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55130  # It is also a way to make sure we got the proper file name for the real test later on.
55131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55132  if test "x$test_shortpath" = x; then
55133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55134$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55135    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55136  fi
55137
55138  # Call helper function which possibly converts this using DOS-style short mode.
55139  # If so, the updated path is stored in $new_path.
55140
55141  input_path="$new_path"
55142  # Check if we need to convert this using DOS-style short mode. If the path
55143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55144  # take no chances and rewrite it.
55145  # Note: m4 eats our [], so we need to use [ and ] instead.
55146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55147  if test "x$has_forbidden_chars" != x; then
55148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55152      # Going to short mode and back again did indeed matter. Since short mode is
55153      # case insensitive, let's make it lowercase to improve readability.
55154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55155      # Now convert it back to Unix-style (cygpath)
55156      input_path=`$CYGPATH -u "$shortmode_path"`
55157      new_path="$input_path"
55158    fi
55159  fi
55160
55161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55162  if test "x$test_cygdrive_prefix" = x; then
55163    # As a simple fix, exclude /usr/bin since it's not a real path.
55164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55166      # a path prefixed by /cygdrive for fixpath to work.
55167      new_path="$CYGWIN_ROOT_PATH$input_path"
55168    fi
55169  fi
55170
55171
55172  if test "x$path" != "x$new_path"; then
55173    MSVC_DLL="$new_path"
55174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55175$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55176  fi
55177
55178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55179
55180  path="$MSVC_DLL"
55181  has_colon=`$ECHO $path | $GREP ^.:`
55182  new_path="$path"
55183  if test "x$has_colon" = x; then
55184    # Not in mixed or Windows style, start by that.
55185    new_path=`cmd //c echo $path`
55186  fi
55187
55188
55189  input_path="$new_path"
55190  # Check if we need to convert this using DOS-style short mode. If the path
55191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55192  # take no chances and rewrite it.
55193  # Note: m4 eats our [], so we need to use [ and ] instead.
55194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55195  if test "x$has_forbidden_chars" != x; then
55196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55198  fi
55199
55200
55201  windows_path="$new_path"
55202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55203    unix_path=`$CYGPATH -u "$windows_path"`
55204    new_path="$unix_path"
55205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55207    new_path="$unix_path"
55208  fi
55209
55210  if test "x$path" != "x$new_path"; then
55211    MSVC_DLL="$new_path"
55212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55213$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55214  fi
55215
55216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55218
55219    else
55220      # We're on a unix platform. Hooray! :)
55221      path="$MSVC_DLL"
55222      has_space=`$ECHO "$path" | $GREP " "`
55223      if test "x$has_space" != x; then
55224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55225$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55227      fi
55228
55229      # Use eval to expand a potential ~
55230      eval path="$path"
55231      if test ! -f "$path" && test ! -d "$path"; then
55232        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55233      fi
55234
55235      if test -d "$path"; then
55236        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55237      else
55238        dir="`$DIRNAME "$path"`"
55239        base="`$BASENAME "$path"`"
55240        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55241      fi
55242    fi
55243  fi
55244
55245      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55246$as_echo_n "checking for $DLL_NAME... " >&6; }
55247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55248$as_echo "$MSVC_DLL" >&6; }
55249    else
55250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55251$as_echo "incorrect, ignoring" >&6; }
55252      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55253$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55254    fi
55255  fi
55256
55257      if test "x$MSVC_DLL" = x; then
55258        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55259      fi
55260      MSVCP_DLL="$MSVC_DLL"
55261    else
55262
55263  DLL_NAME="${MSVCP_NAME}"
55264  MSVC_DLL=
55265
55266  if test "x$MSVC_DLL" = x; then
55267    # Probe: Using well-known location from Visual Studio 10.0
55268    if test "x$VCINSTALLDIR" != x; then
55269      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55270
55271  windows_path="$CYGWIN_VC_INSTALL_DIR"
55272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55273    unix_path=`$CYGPATH -u "$windows_path"`
55274    CYGWIN_VC_INSTALL_DIR="$unix_path"
55275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55277    CYGWIN_VC_INSTALL_DIR="$unix_path"
55278  fi
55279
55280      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55281        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55282      else
55283        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55284      fi
55285      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55286
55287  DLL_NAME="$DLL_NAME"
55288  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55289  METHOD="well-known location in VCINSTALLDIR"
55290  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55291    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55292$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55293
55294    # Need to check if the found msvcr is correct architecture
55295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55296$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55297    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55299      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55300      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55301      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55302        CORRECT_MSVCR_ARCH="PE32 executable"
55303      else
55304        CORRECT_MSVCR_ARCH="PE32+ executable"
55305      fi
55306    else
55307      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55308        CORRECT_MSVCR_ARCH=386
55309      else
55310        CORRECT_MSVCR_ARCH=x86-64
55311      fi
55312    fi
55313    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55315$as_echo "ok" >&6; }
55316      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55317
55318  # Only process if variable expands to non-empty
55319
55320  if test "x$MSVC_DLL" != x; then
55321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55322
55323  # Input might be given as Windows format, start by converting to
55324  # unix format.
55325  path="$MSVC_DLL"
55326  new_path=`$CYGPATH -u "$path"`
55327
55328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55331  # "foo.exe" is OK but "foo" is an error.
55332  #
55333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55334  # It is also a way to make sure we got the proper file name for the real test later on.
55335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55336  if test "x$test_shortpath" = x; then
55337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55338$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55339    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55340  fi
55341
55342  # Call helper function which possibly converts this using DOS-style short mode.
55343  # If so, the updated path is stored in $new_path.
55344
55345  input_path="$new_path"
55346  # Check if we need to convert this using DOS-style short mode. If the path
55347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55348  # take no chances and rewrite it.
55349  # Note: m4 eats our [], so we need to use [ and ] instead.
55350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55351  if test "x$has_forbidden_chars" != x; then
55352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55356      # Going to short mode and back again did indeed matter. Since short mode is
55357      # case insensitive, let's make it lowercase to improve readability.
55358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55359      # Now convert it back to Unix-style (cygpath)
55360      input_path=`$CYGPATH -u "$shortmode_path"`
55361      new_path="$input_path"
55362    fi
55363  fi
55364
55365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55366  if test "x$test_cygdrive_prefix" = x; then
55367    # As a simple fix, exclude /usr/bin since it's not a real path.
55368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55370      # a path prefixed by /cygdrive for fixpath to work.
55371      new_path="$CYGWIN_ROOT_PATH$input_path"
55372    fi
55373  fi
55374
55375
55376  if test "x$path" != "x$new_path"; then
55377    MSVC_DLL="$new_path"
55378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55379$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55380  fi
55381
55382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55383
55384  path="$MSVC_DLL"
55385  has_colon=`$ECHO $path | $GREP ^.:`
55386  new_path="$path"
55387  if test "x$has_colon" = x; then
55388    # Not in mixed or Windows style, start by that.
55389    new_path=`cmd //c echo $path`
55390  fi
55391
55392
55393  input_path="$new_path"
55394  # Check if we need to convert this using DOS-style short mode. If the path
55395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55396  # take no chances and rewrite it.
55397  # Note: m4 eats our [], so we need to use [ and ] instead.
55398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55399  if test "x$has_forbidden_chars" != x; then
55400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55402  fi
55403
55404
55405  windows_path="$new_path"
55406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55407    unix_path=`$CYGPATH -u "$windows_path"`
55408    new_path="$unix_path"
55409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55411    new_path="$unix_path"
55412  fi
55413
55414  if test "x$path" != "x$new_path"; then
55415    MSVC_DLL="$new_path"
55416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55417$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55418  fi
55419
55420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55422
55423    else
55424      # We're on a unix platform. Hooray! :)
55425      path="$MSVC_DLL"
55426      has_space=`$ECHO "$path" | $GREP " "`
55427      if test "x$has_space" != x; then
55428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55429$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55431      fi
55432
55433      # Use eval to expand a potential ~
55434      eval path="$path"
55435      if test ! -f "$path" && test ! -d "$path"; then
55436        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55437      fi
55438
55439      if test -d "$path"; then
55440        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55441      else
55442        dir="`$DIRNAME "$path"`"
55443        base="`$BASENAME "$path"`"
55444        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55445      fi
55446    fi
55447  fi
55448
55449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55450$as_echo_n "checking for $DLL_NAME... " >&6; }
55451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55452$as_echo "$MSVC_DLL" >&6; }
55453    else
55454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55455$as_echo "incorrect, ignoring" >&6; }
55456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55457$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55458    fi
55459  fi
55460
55461    fi
55462  fi
55463
55464  if test "x$MSVC_DLL" = x; then
55465    # Probe: Check in the Boot JDK directory.
55466    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55467
55468  DLL_NAME="$DLL_NAME"
55469  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55470  METHOD="well-known location in Boot JDK"
55471  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55472    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55473$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55474
55475    # Need to check if the found msvcr is correct architecture
55476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55477$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55478    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55480      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55481      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55482      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55483        CORRECT_MSVCR_ARCH="PE32 executable"
55484      else
55485        CORRECT_MSVCR_ARCH="PE32+ executable"
55486      fi
55487    else
55488      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55489        CORRECT_MSVCR_ARCH=386
55490      else
55491        CORRECT_MSVCR_ARCH=x86-64
55492      fi
55493    fi
55494    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55496$as_echo "ok" >&6; }
55497      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55498
55499  # Only process if variable expands to non-empty
55500
55501  if test "x$MSVC_DLL" != x; then
55502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55503
55504  # Input might be given as Windows format, start by converting to
55505  # unix format.
55506  path="$MSVC_DLL"
55507  new_path=`$CYGPATH -u "$path"`
55508
55509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55512  # "foo.exe" is OK but "foo" is an error.
55513  #
55514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55515  # It is also a way to make sure we got the proper file name for the real test later on.
55516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55517  if test "x$test_shortpath" = x; then
55518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55519$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55520    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55521  fi
55522
55523  # Call helper function which possibly converts this using DOS-style short mode.
55524  # If so, the updated path is stored in $new_path.
55525
55526  input_path="$new_path"
55527  # Check if we need to convert this using DOS-style short mode. If the path
55528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55529  # take no chances and rewrite it.
55530  # Note: m4 eats our [], so we need to use [ and ] instead.
55531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55532  if test "x$has_forbidden_chars" != x; then
55533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55537      # Going to short mode and back again did indeed matter. Since short mode is
55538      # case insensitive, let's make it lowercase to improve readability.
55539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55540      # Now convert it back to Unix-style (cygpath)
55541      input_path=`$CYGPATH -u "$shortmode_path"`
55542      new_path="$input_path"
55543    fi
55544  fi
55545
55546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55547  if test "x$test_cygdrive_prefix" = x; then
55548    # As a simple fix, exclude /usr/bin since it's not a real path.
55549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55551      # a path prefixed by /cygdrive for fixpath to work.
55552      new_path="$CYGWIN_ROOT_PATH$input_path"
55553    fi
55554  fi
55555
55556
55557  if test "x$path" != "x$new_path"; then
55558    MSVC_DLL="$new_path"
55559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55560$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55561  fi
55562
55563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55564
55565  path="$MSVC_DLL"
55566  has_colon=`$ECHO $path | $GREP ^.:`
55567  new_path="$path"
55568  if test "x$has_colon" = x; then
55569    # Not in mixed or Windows style, start by that.
55570    new_path=`cmd //c echo $path`
55571  fi
55572
55573
55574  input_path="$new_path"
55575  # Check if we need to convert this using DOS-style short mode. If the path
55576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55577  # take no chances and rewrite it.
55578  # Note: m4 eats our [], so we need to use [ and ] instead.
55579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55580  if test "x$has_forbidden_chars" != x; then
55581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55583  fi
55584
55585
55586  windows_path="$new_path"
55587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55588    unix_path=`$CYGPATH -u "$windows_path"`
55589    new_path="$unix_path"
55590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55592    new_path="$unix_path"
55593  fi
55594
55595  if test "x$path" != "x$new_path"; then
55596    MSVC_DLL="$new_path"
55597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55598$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55599  fi
55600
55601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55603
55604    else
55605      # We're on a unix platform. Hooray! :)
55606      path="$MSVC_DLL"
55607      has_space=`$ECHO "$path" | $GREP " "`
55608      if test "x$has_space" != x; then
55609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55610$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55612      fi
55613
55614      # Use eval to expand a potential ~
55615      eval path="$path"
55616      if test ! -f "$path" && test ! -d "$path"; then
55617        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55618      fi
55619
55620      if test -d "$path"; then
55621        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55622      else
55623        dir="`$DIRNAME "$path"`"
55624        base="`$BASENAME "$path"`"
55625        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55626      fi
55627    fi
55628  fi
55629
55630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55631$as_echo_n "checking for $DLL_NAME... " >&6; }
55632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55633$as_echo "$MSVC_DLL" >&6; }
55634    else
55635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55636$as_echo "incorrect, ignoring" >&6; }
55637      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55638$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55639    fi
55640  fi
55641
55642  fi
55643
55644  if test "x$MSVC_DLL" = x; then
55645    # Probe: Look in the Windows system32 directory
55646    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55647
55648  windows_path="$CYGWIN_SYSTEMROOT"
55649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55650    unix_path=`$CYGPATH -u "$windows_path"`
55651    CYGWIN_SYSTEMROOT="$unix_path"
55652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55654    CYGWIN_SYSTEMROOT="$unix_path"
55655  fi
55656
55657    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55658
55659  DLL_NAME="$DLL_NAME"
55660  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55661  METHOD="well-known location in SYSTEMROOT"
55662  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55663    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55664$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55665
55666    # Need to check if the found msvcr is correct architecture
55667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55668$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55669    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55671      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55672      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55673      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55674        CORRECT_MSVCR_ARCH="PE32 executable"
55675      else
55676        CORRECT_MSVCR_ARCH="PE32+ executable"
55677      fi
55678    else
55679      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55680        CORRECT_MSVCR_ARCH=386
55681      else
55682        CORRECT_MSVCR_ARCH=x86-64
55683      fi
55684    fi
55685    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55687$as_echo "ok" >&6; }
55688      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55689
55690  # Only process if variable expands to non-empty
55691
55692  if test "x$MSVC_DLL" != x; then
55693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55694
55695  # Input might be given as Windows format, start by converting to
55696  # unix format.
55697  path="$MSVC_DLL"
55698  new_path=`$CYGPATH -u "$path"`
55699
55700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55703  # "foo.exe" is OK but "foo" is an error.
55704  #
55705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55706  # It is also a way to make sure we got the proper file name for the real test later on.
55707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55708  if test "x$test_shortpath" = x; then
55709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55710$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55711    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55712  fi
55713
55714  # Call helper function which possibly converts this using DOS-style short mode.
55715  # If so, the updated path is stored in $new_path.
55716
55717  input_path="$new_path"
55718  # Check if we need to convert this using DOS-style short mode. If the path
55719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55720  # take no chances and rewrite it.
55721  # Note: m4 eats our [], so we need to use [ and ] instead.
55722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55723  if test "x$has_forbidden_chars" != x; then
55724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55728      # Going to short mode and back again did indeed matter. Since short mode is
55729      # case insensitive, let's make it lowercase to improve readability.
55730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55731      # Now convert it back to Unix-style (cygpath)
55732      input_path=`$CYGPATH -u "$shortmode_path"`
55733      new_path="$input_path"
55734    fi
55735  fi
55736
55737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55738  if test "x$test_cygdrive_prefix" = x; then
55739    # As a simple fix, exclude /usr/bin since it's not a real path.
55740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55742      # a path prefixed by /cygdrive for fixpath to work.
55743      new_path="$CYGWIN_ROOT_PATH$input_path"
55744    fi
55745  fi
55746
55747
55748  if test "x$path" != "x$new_path"; then
55749    MSVC_DLL="$new_path"
55750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55751$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55752  fi
55753
55754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55755
55756  path="$MSVC_DLL"
55757  has_colon=`$ECHO $path | $GREP ^.:`
55758  new_path="$path"
55759  if test "x$has_colon" = x; then
55760    # Not in mixed or Windows style, start by that.
55761    new_path=`cmd //c echo $path`
55762  fi
55763
55764
55765  input_path="$new_path"
55766  # Check if we need to convert this using DOS-style short mode. If the path
55767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55768  # take no chances and rewrite it.
55769  # Note: m4 eats our [], so we need to use [ and ] instead.
55770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55771  if test "x$has_forbidden_chars" != x; then
55772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55774  fi
55775
55776
55777  windows_path="$new_path"
55778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55779    unix_path=`$CYGPATH -u "$windows_path"`
55780    new_path="$unix_path"
55781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55783    new_path="$unix_path"
55784  fi
55785
55786  if test "x$path" != "x$new_path"; then
55787    MSVC_DLL="$new_path"
55788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55789$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55790  fi
55791
55792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55794
55795    else
55796      # We're on a unix platform. Hooray! :)
55797      path="$MSVC_DLL"
55798      has_space=`$ECHO "$path" | $GREP " "`
55799      if test "x$has_space" != x; then
55800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55801$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55803      fi
55804
55805      # Use eval to expand a potential ~
55806      eval path="$path"
55807      if test ! -f "$path" && test ! -d "$path"; then
55808        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55809      fi
55810
55811      if test -d "$path"; then
55812        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55813      else
55814        dir="`$DIRNAME "$path"`"
55815        base="`$BASENAME "$path"`"
55816        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55817      fi
55818    fi
55819  fi
55820
55821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55822$as_echo_n "checking for $DLL_NAME... " >&6; }
55823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55824$as_echo "$MSVC_DLL" >&6; }
55825    else
55826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55827$as_echo "incorrect, ignoring" >&6; }
55828      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55829$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55830    fi
55831  fi
55832
55833  fi
55834
55835  if test "x$MSVC_DLL" = x; then
55836    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55837    if test "x$VS100COMNTOOLS" != x; then
55838      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55839
55840  windows_path="$CYGWIN_VS_TOOLS_DIR"
55841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55842    unix_path=`$CYGPATH -u "$windows_path"`
55843    CYGWIN_VS_TOOLS_DIR="$unix_path"
55844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55846    CYGWIN_VS_TOOLS_DIR="$unix_path"
55847  fi
55848
55849      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55850        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55851	    | $GREP -i /x64/ | $HEAD --lines 1`
55852      else
55853        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55854	    | $GREP -i /x86/ | $HEAD --lines 1`
55855      fi
55856
55857  DLL_NAME="$DLL_NAME"
55858  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55859  METHOD="search of VS100COMNTOOLS"
55860  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55861    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55862$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55863
55864    # Need to check if the found msvcr is correct architecture
55865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55866$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55867    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55869      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55870      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55871      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55872        CORRECT_MSVCR_ARCH="PE32 executable"
55873      else
55874        CORRECT_MSVCR_ARCH="PE32+ executable"
55875      fi
55876    else
55877      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55878        CORRECT_MSVCR_ARCH=386
55879      else
55880        CORRECT_MSVCR_ARCH=x86-64
55881      fi
55882    fi
55883    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55885$as_echo "ok" >&6; }
55886      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55887
55888  # Only process if variable expands to non-empty
55889
55890  if test "x$MSVC_DLL" != x; then
55891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55892
55893  # Input might be given as Windows format, start by converting to
55894  # unix format.
55895  path="$MSVC_DLL"
55896  new_path=`$CYGPATH -u "$path"`
55897
55898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55901  # "foo.exe" is OK but "foo" is an error.
55902  #
55903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55904  # It is also a way to make sure we got the proper file name for the real test later on.
55905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55906  if test "x$test_shortpath" = x; then
55907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55908$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55909    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55910  fi
55911
55912  # Call helper function which possibly converts this using DOS-style short mode.
55913  # If so, the updated path is stored in $new_path.
55914
55915  input_path="$new_path"
55916  # Check if we need to convert this using DOS-style short mode. If the path
55917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55918  # take no chances and rewrite it.
55919  # Note: m4 eats our [], so we need to use [ and ] instead.
55920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55921  if test "x$has_forbidden_chars" != x; then
55922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55926      # Going to short mode and back again did indeed matter. Since short mode is
55927      # case insensitive, let's make it lowercase to improve readability.
55928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55929      # Now convert it back to Unix-style (cygpath)
55930      input_path=`$CYGPATH -u "$shortmode_path"`
55931      new_path="$input_path"
55932    fi
55933  fi
55934
55935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55936  if test "x$test_cygdrive_prefix" = x; then
55937    # As a simple fix, exclude /usr/bin since it's not a real path.
55938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55940      # a path prefixed by /cygdrive for fixpath to work.
55941      new_path="$CYGWIN_ROOT_PATH$input_path"
55942    fi
55943  fi
55944
55945
55946  if test "x$path" != "x$new_path"; then
55947    MSVC_DLL="$new_path"
55948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55949$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55950  fi
55951
55952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55953
55954  path="$MSVC_DLL"
55955  has_colon=`$ECHO $path | $GREP ^.:`
55956  new_path="$path"
55957  if test "x$has_colon" = x; then
55958    # Not in mixed or Windows style, start by that.
55959    new_path=`cmd //c echo $path`
55960  fi
55961
55962
55963  input_path="$new_path"
55964  # Check if we need to convert this using DOS-style short mode. If the path
55965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55966  # take no chances and rewrite it.
55967  # Note: m4 eats our [], so we need to use [ and ] instead.
55968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55969  if test "x$has_forbidden_chars" != x; then
55970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55972  fi
55973
55974
55975  windows_path="$new_path"
55976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55977    unix_path=`$CYGPATH -u "$windows_path"`
55978    new_path="$unix_path"
55979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55981    new_path="$unix_path"
55982  fi
55983
55984  if test "x$path" != "x$new_path"; then
55985    MSVC_DLL="$new_path"
55986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55987$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55988  fi
55989
55990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55992
55993    else
55994      # We're on a unix platform. Hooray! :)
55995      path="$MSVC_DLL"
55996      has_space=`$ECHO "$path" | $GREP " "`
55997      if test "x$has_space" != x; then
55998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55999$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56001      fi
56002
56003      # Use eval to expand a potential ~
56004      eval path="$path"
56005      if test ! -f "$path" && test ! -d "$path"; then
56006        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56007      fi
56008
56009      if test -d "$path"; then
56010        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56011      else
56012        dir="`$DIRNAME "$path"`"
56013        base="`$BASENAME "$path"`"
56014        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56015      fi
56016    fi
56017  fi
56018
56019      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56020$as_echo_n "checking for $DLL_NAME... " >&6; }
56021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56022$as_echo "$MSVC_DLL" >&6; }
56023    else
56024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56025$as_echo "incorrect, ignoring" >&6; }
56026      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56027$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56028    fi
56029  fi
56030
56031    fi
56032  fi
56033
56034  if test "x$MSVC_DLL" = x; then
56035    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56036    # (This was the original behaviour; kept since it might turn something up)
56037    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56038      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56039        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56040	    | $GREP x64 | $HEAD --lines 1`
56041      else
56042        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56043	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56044        if test "x$POSSIBLE_MSVC_DLL" = x; then
56045          # We're grasping at straws now...
56046          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56047	      | $HEAD --lines 1`
56048        fi
56049      fi
56050
56051
56052  DLL_NAME="$DLL_NAME"
56053  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56054  METHOD="search of VCINSTALLDIR"
56055  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56056    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56057$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56058
56059    # Need to check if the found msvcr is correct architecture
56060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56061$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56062    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56064      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56065      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56067        CORRECT_MSVCR_ARCH="PE32 executable"
56068      else
56069        CORRECT_MSVCR_ARCH="PE32+ executable"
56070      fi
56071    else
56072      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56073        CORRECT_MSVCR_ARCH=386
56074      else
56075        CORRECT_MSVCR_ARCH=x86-64
56076      fi
56077    fi
56078    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56080$as_echo "ok" >&6; }
56081      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56082
56083  # Only process if variable expands to non-empty
56084
56085  if test "x$MSVC_DLL" != x; then
56086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56087
56088  # Input might be given as Windows format, start by converting to
56089  # unix format.
56090  path="$MSVC_DLL"
56091  new_path=`$CYGPATH -u "$path"`
56092
56093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56096  # "foo.exe" is OK but "foo" is an error.
56097  #
56098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56099  # It is also a way to make sure we got the proper file name for the real test later on.
56100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56101  if test "x$test_shortpath" = x; then
56102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56103$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56104    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56105  fi
56106
56107  # Call helper function which possibly converts this using DOS-style short mode.
56108  # If so, the updated path is stored in $new_path.
56109
56110  input_path="$new_path"
56111  # Check if we need to convert this using DOS-style short mode. If the path
56112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56113  # take no chances and rewrite it.
56114  # Note: m4 eats our [], so we need to use [ and ] instead.
56115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56116  if test "x$has_forbidden_chars" != x; then
56117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56121      # Going to short mode and back again did indeed matter. Since short mode is
56122      # case insensitive, let's make it lowercase to improve readability.
56123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56124      # Now convert it back to Unix-style (cygpath)
56125      input_path=`$CYGPATH -u "$shortmode_path"`
56126      new_path="$input_path"
56127    fi
56128  fi
56129
56130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56131  if test "x$test_cygdrive_prefix" = x; then
56132    # As a simple fix, exclude /usr/bin since it's not a real path.
56133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56135      # a path prefixed by /cygdrive for fixpath to work.
56136      new_path="$CYGWIN_ROOT_PATH$input_path"
56137    fi
56138  fi
56139
56140
56141  if test "x$path" != "x$new_path"; then
56142    MSVC_DLL="$new_path"
56143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56144$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56145  fi
56146
56147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56148
56149  path="$MSVC_DLL"
56150  has_colon=`$ECHO $path | $GREP ^.:`
56151  new_path="$path"
56152  if test "x$has_colon" = x; then
56153    # Not in mixed or Windows style, start by that.
56154    new_path=`cmd //c echo $path`
56155  fi
56156
56157
56158  input_path="$new_path"
56159  # Check if we need to convert this using DOS-style short mode. If the path
56160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56161  # take no chances and rewrite it.
56162  # Note: m4 eats our [], so we need to use [ and ] instead.
56163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56164  if test "x$has_forbidden_chars" != x; then
56165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56167  fi
56168
56169
56170  windows_path="$new_path"
56171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56172    unix_path=`$CYGPATH -u "$windows_path"`
56173    new_path="$unix_path"
56174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56176    new_path="$unix_path"
56177  fi
56178
56179  if test "x$path" != "x$new_path"; then
56180    MSVC_DLL="$new_path"
56181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56182$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56183  fi
56184
56185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56187
56188    else
56189      # We're on a unix platform. Hooray! :)
56190      path="$MSVC_DLL"
56191      has_space=`$ECHO "$path" | $GREP " "`
56192      if test "x$has_space" != x; then
56193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56196      fi
56197
56198      # Use eval to expand a potential ~
56199      eval path="$path"
56200      if test ! -f "$path" && test ! -d "$path"; then
56201        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56202      fi
56203
56204      if test -d "$path"; then
56205        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56206      else
56207        dir="`$DIRNAME "$path"`"
56208        base="`$BASENAME "$path"`"
56209        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56210      fi
56211    fi
56212  fi
56213
56214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56215$as_echo_n "checking for $DLL_NAME... " >&6; }
56216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56217$as_echo "$MSVC_DLL" >&6; }
56218    else
56219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56220$as_echo "incorrect, ignoring" >&6; }
56221      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56222$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56223    fi
56224  fi
56225
56226    fi
56227  fi
56228
56229  if test "x$MSVC_DLL" = x; then
56230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56231$as_echo_n "checking for $DLL_NAME... " >&6; }
56232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56233$as_echo "no" >&6; }
56234    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56235  fi
56236
56237      MSVCP_DLL="$MSVC_DLL"
56238    fi
56239
56240  fi
56241
56242  fi
56243
56244
56245  if test "x$NEEDS_LIB_X11" = xfalse; then
56246    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56247      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56248$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56249    fi
56250    X_CFLAGS=
56251    X_LIBS=
56252  else
56253
56254    if test "x${with_x}" = xno; then
56255      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56256    fi
56257
56258    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56259      # The user has specified a X11 base directory. Use it for includes and
56260      # libraries, unless explicitly overridden.
56261      if test "x$x_includes" = xNONE; then
56262        x_includes="${with_x}/include"
56263      fi
56264      if test "x$x_libraries" = xNONE; then
56265        x_libraries="${with_x}/lib"
56266      fi
56267    else
56268      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56269      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56270      # --x-libraries for the sysroot, if that seems to be correct.
56271      if test "x$SYSROOT" != "x"; then
56272        if test "x$x_includes" = xNONE; then
56273          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56274            x_includes="$SYSROOT/usr/X11R6/include"
56275          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56276            x_includes="$SYSROOT/usr/include"
56277          fi
56278        fi
56279        if test "x$x_libraries" = xNONE; then
56280          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56281            x_libraries="$SYSROOT/usr/X11R6/lib"
56282          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56283            x_libraries="$SYSROOT/usr/lib64"
56284          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56285            x_libraries="$SYSROOT/usr/lib"
56286          fi
56287        fi
56288      fi
56289    fi
56290
56291    # Now let autoconf do it's magic
56292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56293$as_echo_n "checking for X... " >&6; }
56294
56295
56296# Check whether --with-x was given.
56297if test "${with_x+set}" = set; then :
56298  withval=$with_x;
56299fi
56300
56301# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56302if test "x$with_x" = xno; then
56303  # The user explicitly disabled X.
56304  have_x=disabled
56305else
56306  case $x_includes,$x_libraries in #(
56307    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56308    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56309  $as_echo_n "(cached) " >&6
56310else
56311  # One or both of the vars are not set, and there is no cached value.
56312ac_x_includes=no ac_x_libraries=no
56313rm -f -r conftest.dir
56314if mkdir conftest.dir; then
56315  cd conftest.dir
56316  cat >Imakefile <<'_ACEOF'
56317incroot:
56318	@echo incroot='${INCROOT}'
56319usrlibdir:
56320	@echo usrlibdir='${USRLIBDIR}'
56321libdir:
56322	@echo libdir='${LIBDIR}'
56323_ACEOF
56324  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56325    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56326    for ac_var in incroot usrlibdir libdir; do
56327      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56328    done
56329    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56330    for ac_extension in a so sl dylib la dll; do
56331      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56332	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56333	ac_im_usrlibdir=$ac_im_libdir; break
56334      fi
56335    done
56336    # Screen out bogus values from the imake configuration.  They are
56337    # bogus both because they are the default anyway, and because
56338    # using them would break gcc on systems where it needs fixed includes.
56339    case $ac_im_incroot in
56340	/usr/include) ac_x_includes= ;;
56341	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56342    esac
56343    case $ac_im_usrlibdir in
56344	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56345	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56346    esac
56347  fi
56348  cd ..
56349  rm -f -r conftest.dir
56350fi
56351
56352# Standard set of common directories for X headers.
56353# Check X11 before X11Rn because it is often a symlink to the current release.
56354ac_x_header_dirs='
56355/usr/X11/include
56356/usr/X11R7/include
56357/usr/X11R6/include
56358/usr/X11R5/include
56359/usr/X11R4/include
56360
56361/usr/include/X11
56362/usr/include/X11R7
56363/usr/include/X11R6
56364/usr/include/X11R5
56365/usr/include/X11R4
56366
56367/usr/local/X11/include
56368/usr/local/X11R7/include
56369/usr/local/X11R6/include
56370/usr/local/X11R5/include
56371/usr/local/X11R4/include
56372
56373/usr/local/include/X11
56374/usr/local/include/X11R7
56375/usr/local/include/X11R6
56376/usr/local/include/X11R5
56377/usr/local/include/X11R4
56378
56379/usr/X386/include
56380/usr/x386/include
56381/usr/XFree86/include/X11
56382
56383/usr/include
56384/usr/local/include
56385/usr/unsupported/include
56386/usr/athena/include
56387/usr/local/x11r5/include
56388/usr/lpp/Xamples/include
56389
56390/usr/openwin/include
56391/usr/openwin/share/include'
56392
56393if test "$ac_x_includes" = no; then
56394  # Guess where to find include files, by looking for Xlib.h.
56395  # First, try using that file with no special directory specified.
56396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56397/* end confdefs.h.  */
56398#include <X11/Xlib.h>
56399_ACEOF
56400if ac_fn_cxx_try_cpp "$LINENO"; then :
56401  # We can compile using X headers with no special include directory.
56402ac_x_includes=
56403else
56404  for ac_dir in $ac_x_header_dirs; do
56405  if test -r "$ac_dir/X11/Xlib.h"; then
56406    ac_x_includes=$ac_dir
56407    break
56408  fi
56409done
56410fi
56411rm -f conftest.err conftest.i conftest.$ac_ext
56412fi # $ac_x_includes = no
56413
56414if test "$ac_x_libraries" = no; then
56415  # Check for the libraries.
56416  # See if we find them without any special options.
56417  # Don't add to $LIBS permanently.
56418  ac_save_LIBS=$LIBS
56419  LIBS="-lX11 $LIBS"
56420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56421/* end confdefs.h.  */
56422#include <X11/Xlib.h>
56423int
56424main ()
56425{
56426XrmInitialize ()
56427  ;
56428  return 0;
56429}
56430_ACEOF
56431if ac_fn_cxx_try_link "$LINENO"; then :
56432  LIBS=$ac_save_LIBS
56433# We can link X programs with no special library path.
56434ac_x_libraries=
56435else
56436  LIBS=$ac_save_LIBS
56437for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56438do
56439  # Don't even attempt the hair of trying to link an X program!
56440  for ac_extension in a so sl dylib la dll; do
56441    if test -r "$ac_dir/libX11.$ac_extension"; then
56442      ac_x_libraries=$ac_dir
56443      break 2
56444    fi
56445  done
56446done
56447fi
56448rm -f core conftest.err conftest.$ac_objext \
56449    conftest$ac_exeext conftest.$ac_ext
56450fi # $ac_x_libraries = no
56451
56452case $ac_x_includes,$ac_x_libraries in #(
56453  no,* | *,no | *\'*)
56454    # Didn't find X, or a directory has "'" in its name.
56455    ac_cv_have_x="have_x=no";; #(
56456  *)
56457    # Record where we found X for the cache.
56458    ac_cv_have_x="have_x=yes\
56459	ac_x_includes='$ac_x_includes'\
56460	ac_x_libraries='$ac_x_libraries'"
56461esac
56462fi
56463;; #(
56464    *) have_x=yes;;
56465  esac
56466  eval "$ac_cv_have_x"
56467fi # $with_x != no
56468
56469if test "$have_x" != yes; then
56470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56471$as_echo "$have_x" >&6; }
56472  no_x=yes
56473else
56474  # If each of the values was on the command line, it overrides each guess.
56475  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56476  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56477  # Update the cache value to reflect the command line values.
56478  ac_cv_have_x="have_x=yes\
56479	ac_x_includes='$x_includes'\
56480	ac_x_libraries='$x_libraries'"
56481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56482$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56483fi
56484
56485    if test "$no_x" = yes; then
56486  # Not all programs may use this symbol, but it does not hurt to define it.
56487
56488$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56489
56490  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56491else
56492  if test -n "$x_includes"; then
56493    X_CFLAGS="$X_CFLAGS -I$x_includes"
56494  fi
56495
56496  # It would also be nice to do this for all -L options, not just this one.
56497  if test -n "$x_libraries"; then
56498    X_LIBS="$X_LIBS -L$x_libraries"
56499    # For Solaris; some versions of Sun CC require a space after -R and
56500    # others require no space.  Words are not sufficient . . . .
56501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56502$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56503    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56504    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56505    ac_cxx_werror_flag=yes
56506    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56507/* end confdefs.h.  */
56508
56509int
56510main ()
56511{
56512
56513  ;
56514  return 0;
56515}
56516_ACEOF
56517if ac_fn_cxx_try_link "$LINENO"; then :
56518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56519$as_echo "no" >&6; }
56520       X_LIBS="$X_LIBS -R$x_libraries"
56521else
56522  LIBS="$ac_xsave_LIBS -R $x_libraries"
56523       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56524/* end confdefs.h.  */
56525
56526int
56527main ()
56528{
56529
56530  ;
56531  return 0;
56532}
56533_ACEOF
56534if ac_fn_cxx_try_link "$LINENO"; then :
56535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56536$as_echo "yes" >&6; }
56537	  X_LIBS="$X_LIBS -R $x_libraries"
56538else
56539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56540$as_echo "neither works" >&6; }
56541fi
56542rm -f core conftest.err conftest.$ac_objext \
56543    conftest$ac_exeext conftest.$ac_ext
56544fi
56545rm -f core conftest.err conftest.$ac_objext \
56546    conftest$ac_exeext conftest.$ac_ext
56547    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56548    LIBS=$ac_xsave_LIBS
56549  fi
56550
56551  # Check for system-dependent libraries X programs must link with.
56552  # Do this before checking for the system-independent R6 libraries
56553  # (-lICE), since we may need -lsocket or whatever for X linking.
56554
56555  if test "$ISC" = yes; then
56556    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56557  else
56558    # Martyn Johnson says this is needed for Ultrix, if the X
56559    # libraries were built with DECnet support.  And Karl Berry says
56560    # the Alpha needs dnet_stub (dnet does not exist).
56561    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56562    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56563/* end confdefs.h.  */
56564
56565/* Override any GCC internal prototype to avoid an error.
56566   Use char because int might match the return type of a GCC
56567   builtin and then its argument prototype would still apply.  */
56568#ifdef __cplusplus
56569extern "C"
56570#endif
56571char XOpenDisplay ();
56572int
56573main ()
56574{
56575return XOpenDisplay ();
56576  ;
56577  return 0;
56578}
56579_ACEOF
56580if ac_fn_cxx_try_link "$LINENO"; then :
56581
56582else
56583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56584$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56585if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56586  $as_echo_n "(cached) " >&6
56587else
56588  ac_check_lib_save_LIBS=$LIBS
56589LIBS="-ldnet  $LIBS"
56590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56591/* end confdefs.h.  */
56592
56593/* Override any GCC internal prototype to avoid an error.
56594   Use char because int might match the return type of a GCC
56595   builtin and then its argument prototype would still apply.  */
56596#ifdef __cplusplus
56597extern "C"
56598#endif
56599char dnet_ntoa ();
56600int
56601main ()
56602{
56603return dnet_ntoa ();
56604  ;
56605  return 0;
56606}
56607_ACEOF
56608if ac_fn_cxx_try_link "$LINENO"; then :
56609  ac_cv_lib_dnet_dnet_ntoa=yes
56610else
56611  ac_cv_lib_dnet_dnet_ntoa=no
56612fi
56613rm -f core conftest.err conftest.$ac_objext \
56614    conftest$ac_exeext conftest.$ac_ext
56615LIBS=$ac_check_lib_save_LIBS
56616fi
56617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56618$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56619if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56620  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56621fi
56622
56623    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56625$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56626if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56627  $as_echo_n "(cached) " >&6
56628else
56629  ac_check_lib_save_LIBS=$LIBS
56630LIBS="-ldnet_stub  $LIBS"
56631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56632/* end confdefs.h.  */
56633
56634/* Override any GCC internal prototype to avoid an error.
56635   Use char because int might match the return type of a GCC
56636   builtin and then its argument prototype would still apply.  */
56637#ifdef __cplusplus
56638extern "C"
56639#endif
56640char dnet_ntoa ();
56641int
56642main ()
56643{
56644return dnet_ntoa ();
56645  ;
56646  return 0;
56647}
56648_ACEOF
56649if ac_fn_cxx_try_link "$LINENO"; then :
56650  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56651else
56652  ac_cv_lib_dnet_stub_dnet_ntoa=no
56653fi
56654rm -f core conftest.err conftest.$ac_objext \
56655    conftest$ac_exeext conftest.$ac_ext
56656LIBS=$ac_check_lib_save_LIBS
56657fi
56658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56659$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56660if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56661  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56662fi
56663
56664    fi
56665fi
56666rm -f core conftest.err conftest.$ac_objext \
56667    conftest$ac_exeext conftest.$ac_ext
56668    LIBS="$ac_xsave_LIBS"
56669
56670    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56671    # to get the SysV transport functions.
56672    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56673    # needs -lnsl.
56674    # The nsl library prevents programs from opening the X display
56675    # on Irix 5.2, according to T.E. Dickey.
56676    # The functions gethostbyname, getservbyname, and inet_addr are
56677    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56678    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56679if test "x$ac_cv_func_gethostbyname" = xyes; then :
56680
56681fi
56682
56683    if test $ac_cv_func_gethostbyname = no; then
56684      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56685$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56686if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56687  $as_echo_n "(cached) " >&6
56688else
56689  ac_check_lib_save_LIBS=$LIBS
56690LIBS="-lnsl  $LIBS"
56691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56692/* end confdefs.h.  */
56693
56694/* Override any GCC internal prototype to avoid an error.
56695   Use char because int might match the return type of a GCC
56696   builtin and then its argument prototype would still apply.  */
56697#ifdef __cplusplus
56698extern "C"
56699#endif
56700char gethostbyname ();
56701int
56702main ()
56703{
56704return gethostbyname ();
56705  ;
56706  return 0;
56707}
56708_ACEOF
56709if ac_fn_cxx_try_link "$LINENO"; then :
56710  ac_cv_lib_nsl_gethostbyname=yes
56711else
56712  ac_cv_lib_nsl_gethostbyname=no
56713fi
56714rm -f core conftest.err conftest.$ac_objext \
56715    conftest$ac_exeext conftest.$ac_ext
56716LIBS=$ac_check_lib_save_LIBS
56717fi
56718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56719$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56720if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56721  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56722fi
56723
56724      if test $ac_cv_lib_nsl_gethostbyname = no; then
56725	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56726$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56727if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56728  $as_echo_n "(cached) " >&6
56729else
56730  ac_check_lib_save_LIBS=$LIBS
56731LIBS="-lbsd  $LIBS"
56732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56733/* end confdefs.h.  */
56734
56735/* Override any GCC internal prototype to avoid an error.
56736   Use char because int might match the return type of a GCC
56737   builtin and then its argument prototype would still apply.  */
56738#ifdef __cplusplus
56739extern "C"
56740#endif
56741char gethostbyname ();
56742int
56743main ()
56744{
56745return gethostbyname ();
56746  ;
56747  return 0;
56748}
56749_ACEOF
56750if ac_fn_cxx_try_link "$LINENO"; then :
56751  ac_cv_lib_bsd_gethostbyname=yes
56752else
56753  ac_cv_lib_bsd_gethostbyname=no
56754fi
56755rm -f core conftest.err conftest.$ac_objext \
56756    conftest$ac_exeext conftest.$ac_ext
56757LIBS=$ac_check_lib_save_LIBS
56758fi
56759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56760$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56761if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56762  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56763fi
56764
56765      fi
56766    fi
56767
56768    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56769    # socket/setsockopt and other routines are undefined under SCO ODT
56770    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56771    # on later versions), says Simon Leinen: it contains gethostby*
56772    # variants that don't use the name server (or something).  -lsocket
56773    # must be given before -lnsl if both are needed.  We assume that
56774    # if connect needs -lnsl, so does gethostbyname.
56775    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56776if test "x$ac_cv_func_connect" = xyes; then :
56777
56778fi
56779
56780    if test $ac_cv_func_connect = no; then
56781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56782$as_echo_n "checking for connect in -lsocket... " >&6; }
56783if ${ac_cv_lib_socket_connect+:} false; then :
56784  $as_echo_n "(cached) " >&6
56785else
56786  ac_check_lib_save_LIBS=$LIBS
56787LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56789/* end confdefs.h.  */
56790
56791/* Override any GCC internal prototype to avoid an error.
56792   Use char because int might match the return type of a GCC
56793   builtin and then its argument prototype would still apply.  */
56794#ifdef __cplusplus
56795extern "C"
56796#endif
56797char connect ();
56798int
56799main ()
56800{
56801return connect ();
56802  ;
56803  return 0;
56804}
56805_ACEOF
56806if ac_fn_cxx_try_link "$LINENO"; then :
56807  ac_cv_lib_socket_connect=yes
56808else
56809  ac_cv_lib_socket_connect=no
56810fi
56811rm -f core conftest.err conftest.$ac_objext \
56812    conftest$ac_exeext conftest.$ac_ext
56813LIBS=$ac_check_lib_save_LIBS
56814fi
56815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56816$as_echo "$ac_cv_lib_socket_connect" >&6; }
56817if test "x$ac_cv_lib_socket_connect" = xyes; then :
56818  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56819fi
56820
56821    fi
56822
56823    # Guillermo Gomez says -lposix is necessary on A/UX.
56824    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56825if test "x$ac_cv_func_remove" = xyes; then :
56826
56827fi
56828
56829    if test $ac_cv_func_remove = no; then
56830      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56831$as_echo_n "checking for remove in -lposix... " >&6; }
56832if ${ac_cv_lib_posix_remove+:} false; then :
56833  $as_echo_n "(cached) " >&6
56834else
56835  ac_check_lib_save_LIBS=$LIBS
56836LIBS="-lposix  $LIBS"
56837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56838/* end confdefs.h.  */
56839
56840/* Override any GCC internal prototype to avoid an error.
56841   Use char because int might match the return type of a GCC
56842   builtin and then its argument prototype would still apply.  */
56843#ifdef __cplusplus
56844extern "C"
56845#endif
56846char remove ();
56847int
56848main ()
56849{
56850return remove ();
56851  ;
56852  return 0;
56853}
56854_ACEOF
56855if ac_fn_cxx_try_link "$LINENO"; then :
56856  ac_cv_lib_posix_remove=yes
56857else
56858  ac_cv_lib_posix_remove=no
56859fi
56860rm -f core conftest.err conftest.$ac_objext \
56861    conftest$ac_exeext conftest.$ac_ext
56862LIBS=$ac_check_lib_save_LIBS
56863fi
56864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56865$as_echo "$ac_cv_lib_posix_remove" >&6; }
56866if test "x$ac_cv_lib_posix_remove" = xyes; then :
56867  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56868fi
56869
56870    fi
56871
56872    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56873    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56874if test "x$ac_cv_func_shmat" = xyes; then :
56875
56876fi
56877
56878    if test $ac_cv_func_shmat = no; then
56879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56880$as_echo_n "checking for shmat in -lipc... " >&6; }
56881if ${ac_cv_lib_ipc_shmat+:} false; then :
56882  $as_echo_n "(cached) " >&6
56883else
56884  ac_check_lib_save_LIBS=$LIBS
56885LIBS="-lipc  $LIBS"
56886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56887/* end confdefs.h.  */
56888
56889/* Override any GCC internal prototype to avoid an error.
56890   Use char because int might match the return type of a GCC
56891   builtin and then its argument prototype would still apply.  */
56892#ifdef __cplusplus
56893extern "C"
56894#endif
56895char shmat ();
56896int
56897main ()
56898{
56899return shmat ();
56900  ;
56901  return 0;
56902}
56903_ACEOF
56904if ac_fn_cxx_try_link "$LINENO"; then :
56905  ac_cv_lib_ipc_shmat=yes
56906else
56907  ac_cv_lib_ipc_shmat=no
56908fi
56909rm -f core conftest.err conftest.$ac_objext \
56910    conftest$ac_exeext conftest.$ac_ext
56911LIBS=$ac_check_lib_save_LIBS
56912fi
56913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56914$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56915if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56916  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56917fi
56918
56919    fi
56920  fi
56921
56922  # Check for libraries that X11R6 Xt/Xaw programs need.
56923  ac_save_LDFLAGS=$LDFLAGS
56924  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56925  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56926  # check for ICE first), but we must link in the order -lSM -lICE or
56927  # we get undefined symbols.  So assume we have SM if we have ICE.
56928  # These have to be linked with before -lX11, unlike the other
56929  # libraries we check for below, so use a different variable.
56930  # John Interrante, Karl Berry
56931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56932$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56933if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56934  $as_echo_n "(cached) " >&6
56935else
56936  ac_check_lib_save_LIBS=$LIBS
56937LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56939/* end confdefs.h.  */
56940
56941/* Override any GCC internal prototype to avoid an error.
56942   Use char because int might match the return type of a GCC
56943   builtin and then its argument prototype would still apply.  */
56944#ifdef __cplusplus
56945extern "C"
56946#endif
56947char IceConnectionNumber ();
56948int
56949main ()
56950{
56951return IceConnectionNumber ();
56952  ;
56953  return 0;
56954}
56955_ACEOF
56956if ac_fn_cxx_try_link "$LINENO"; then :
56957  ac_cv_lib_ICE_IceConnectionNumber=yes
56958else
56959  ac_cv_lib_ICE_IceConnectionNumber=no
56960fi
56961rm -f core conftest.err conftest.$ac_objext \
56962    conftest$ac_exeext conftest.$ac_ext
56963LIBS=$ac_check_lib_save_LIBS
56964fi
56965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56966$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56967if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56968  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56969fi
56970
56971  LDFLAGS=$ac_save_LDFLAGS
56972
56973fi
56974
56975
56976    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56977    # this doesn't make sense so we remove it.
56978    if test "x$COMPILE_TYPE" = xcross; then
56979      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56980    fi
56981
56982    if test "x$no_x" = xyes; then
56983
56984  # Print a helpful message on how to acquire the necessary build dependency.
56985  # x11 is the help tag: freetype, cups, alsa etc
56986  MISSING_DEPENDENCY=x11
56987
56988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56989    cygwin_help $MISSING_DEPENDENCY
56990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56991    msys_help $MISSING_DEPENDENCY
56992  else
56993    PKGHANDLER_COMMAND=
56994
56995    case $PKGHANDLER in
56996      apt-get)
56997        apt_help     $MISSING_DEPENDENCY ;;
56998      yum)
56999        yum_help     $MISSING_DEPENDENCY ;;
57000      brew)
57001        brew_help    $MISSING_DEPENDENCY ;;
57002      port)
57003        port_help    $MISSING_DEPENDENCY ;;
57004      pkgutil)
57005        pkgutil_help $MISSING_DEPENDENCY ;;
57006      pkgadd)
57007        pkgadd_help  $MISSING_DEPENDENCY ;;
57008    esac
57009
57010    if test "x$PKGHANDLER_COMMAND" != x; then
57011      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57012    fi
57013  fi
57014
57015      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57016    fi
57017
57018    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57019      OPENWIN_HOME="/usr/openwin"
57020      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57021      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57022          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57023    fi
57024
57025    ac_ext=c
57026ac_cpp='$CPP $CPPFLAGS'
57027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57029ac_compiler_gnu=$ac_cv_c_compiler_gnu
57030
57031    OLD_CFLAGS="$CFLAGS"
57032    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57033
57034    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57035    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57036do :
57037  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57038ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57039          # include <X11/Xlib.h>
57040          # include <X11/Xutil.h>
57041
57042
57043"
57044if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57045  cat >>confdefs.h <<_ACEOF
57046#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57047_ACEOF
57048 X11_HEADERS_OK=yes
57049else
57050  X11_HEADERS_OK=no; break
57051fi
57052
57053done
57054
57055
57056    if test "x$X11_HEADERS_OK" = xno; then
57057
57058  # Print a helpful message on how to acquire the necessary build dependency.
57059  # x11 is the help tag: freetype, cups, alsa etc
57060  MISSING_DEPENDENCY=x11
57061
57062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57063    cygwin_help $MISSING_DEPENDENCY
57064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57065    msys_help $MISSING_DEPENDENCY
57066  else
57067    PKGHANDLER_COMMAND=
57068
57069    case $PKGHANDLER in
57070      apt-get)
57071        apt_help     $MISSING_DEPENDENCY ;;
57072      yum)
57073        yum_help     $MISSING_DEPENDENCY ;;
57074      brew)
57075        brew_help    $MISSING_DEPENDENCY ;;
57076      port)
57077        port_help    $MISSING_DEPENDENCY ;;
57078      pkgutil)
57079        pkgutil_help $MISSING_DEPENDENCY ;;
57080      pkgadd)
57081        pkgadd_help  $MISSING_DEPENDENCY ;;
57082    esac
57083
57084    if test "x$PKGHANDLER_COMMAND" != x; then
57085      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57086    fi
57087  fi
57088
57089      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57090    fi
57091
57092    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57093    # defined in libawt_xawt.
57094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57095$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57096    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57097/* end confdefs.h.  */
57098#include <X11/extensions/Xrender.h>
57099int
57100main ()
57101{
57102XLinearGradient x;
57103  ;
57104  return 0;
57105}
57106_ACEOF
57107if ac_fn_c_try_compile "$LINENO"; then :
57108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57109$as_echo "yes" >&6; }
57110else
57111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57112$as_echo "no" >&6; }
57113         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57114fi
57115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57116
57117    CFLAGS="$OLD_CFLAGS"
57118    ac_ext=cpp
57119ac_cpp='$CXXCPP $CPPFLAGS'
57120ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57121ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57122ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57123
57124  fi # NEEDS_LIB_X11
57125
57126
57127
57128
57129
57130
57131# Check whether --with-cups was given.
57132if test "${with_cups+set}" = set; then :
57133  withval=$with_cups;
57134fi
57135
57136
57137# Check whether --with-cups-include was given.
57138if test "${with_cups_include+set}" = set; then :
57139  withval=$with_cups_include;
57140fi
57141
57142
57143  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57144    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57145        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57146      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57147$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57148    fi
57149    CUPS_CFLAGS=
57150  else
57151    CUPS_FOUND=no
57152
57153    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57154      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57155    fi
57156
57157    if test "x${with_cups}" != x; then
57158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57159$as_echo_n "checking for cups headers... " >&6; }
57160      if test -s "${with_cups}/include/cups/cups.h"; then
57161        CUPS_CFLAGS="-I${with_cups}/include"
57162        CUPS_FOUND=yes
57163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57164$as_echo "$CUPS_FOUND" >&6; }
57165      else
57166        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57167      fi
57168    fi
57169    if test "x${with_cups_include}" != x; then
57170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57171$as_echo_n "checking for cups headers... " >&6; }
57172      if test -s "${with_cups_include}/cups/cups.h"; then
57173        CUPS_CFLAGS="-I${with_cups_include}"
57174        CUPS_FOUND=yes
57175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57176$as_echo "$CUPS_FOUND" >&6; }
57177      else
57178        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57179      fi
57180    fi
57181    if test "x$CUPS_FOUND" = xno; then
57182      # Are the cups headers installed in the default /usr/include location?
57183      for ac_header in cups/cups.h cups/ppd.h
57184do :
57185  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57186ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57187if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57188  cat >>confdefs.h <<_ACEOF
57189#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57190_ACEOF
57191
57192          CUPS_FOUND=yes
57193          CUPS_CFLAGS=
57194          DEFAULT_CUPS=yes
57195
57196fi
57197
57198done
57199
57200    fi
57201    if test "x$CUPS_FOUND" = xno; then
57202
57203  # Print a helpful message on how to acquire the necessary build dependency.
57204  # cups is the help tag: freetype, cups, alsa etc
57205  MISSING_DEPENDENCY=cups
57206
57207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57208    cygwin_help $MISSING_DEPENDENCY
57209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57210    msys_help $MISSING_DEPENDENCY
57211  else
57212    PKGHANDLER_COMMAND=
57213
57214    case $PKGHANDLER in
57215      apt-get)
57216        apt_help     $MISSING_DEPENDENCY ;;
57217      yum)
57218        yum_help     $MISSING_DEPENDENCY ;;
57219      brew)
57220        brew_help    $MISSING_DEPENDENCY ;;
57221      port)
57222        port_help    $MISSING_DEPENDENCY ;;
57223      pkgutil)
57224        pkgutil_help $MISSING_DEPENDENCY ;;
57225      pkgadd)
57226        pkgadd_help  $MISSING_DEPENDENCY ;;
57227    esac
57228
57229    if test "x$PKGHANDLER_COMMAND" != x; then
57230      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57231    fi
57232  fi
57233
57234      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57235    fi
57236  fi
57237
57238
57239
57240
57241
57242# Check whether --with-freetype was given.
57243if test "${with_freetype+set}" = set; then :
57244  withval=$with_freetype;
57245fi
57246
57247
57248# Check whether --with-freetype-include was given.
57249if test "${with_freetype_include+set}" = set; then :
57250  withval=$with_freetype_include;
57251fi
57252
57253
57254# Check whether --with-freetype-lib was given.
57255if test "${with_freetype_lib+set}" = set; then :
57256  withval=$with_freetype_lib;
57257fi
57258
57259
57260# Check whether --with-freetype-src was given.
57261if test "${with_freetype_src+set}" = set; then :
57262  withval=$with_freetype_src;
57263fi
57264
57265  # Check whether --enable-freetype-bundling was given.
57266if test "${enable_freetype_bundling+set}" = set; then :
57267  enableval=$enable_freetype_bundling;
57268fi
57269
57270
57271  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57272  FREETYPE_BASE_NAME=freetype
57273  FREETYPE_CFLAGS=
57274  FREETYPE_LIBS=
57275  FREETYPE_BUNDLE_LIB_PATH=
57276
57277  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57278    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57279        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57280        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57281        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57282      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57283$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57284    fi
57285    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57286      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57287$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57288    fi
57289  else
57290    # freetype is needed to build; go get it!
57291
57292    BUNDLE_FREETYPE="$enable_freetype_bundling"
57293
57294    if  test "x$with_freetype_src" != x; then
57295      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57296        # Try to build freetype if --with-freetype-src was given on Windows
57297
57298  FREETYPE_SRC_PATH="$with_freetype_src"
57299  BUILD_FREETYPE=yes
57300
57301  # Check if the freetype sources are acessible..
57302  if ! test -d $FREETYPE_SRC_PATH; then
57303    { $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
57304$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57305    BUILD_FREETYPE=no
57306  fi
57307  # ..and contain a vc2010 project file
57308  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57309  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57310    { $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
57311$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57312    BUILD_FREETYPE=no
57313  fi
57314  # Now check if configure found a version of 'msbuild.exe'
57315  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57316    { $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
57317$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;}
57318    BUILD_FREETYPE=no
57319  fi
57320
57321  # Ready to go..
57322  if test "x$BUILD_FREETYPE" = xyes; then
57323    # msbuild requires trailing slashes for output directories
57324    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57325    freetype_lib_path_unix="$freetype_lib_path"
57326    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57327
57328  unix_path="$vcxproj_path"
57329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57330    windows_path=`$CYGPATH -m "$unix_path"`
57331    vcxproj_path="$windows_path"
57332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57333    windows_path=`cmd //c echo $unix_path`
57334    vcxproj_path="$windows_path"
57335  fi
57336
57337
57338  unix_path="$freetype_lib_path"
57339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57340    windows_path=`$CYGPATH -m "$unix_path"`
57341    freetype_lib_path="$windows_path"
57342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57343    windows_path=`cmd //c echo $unix_path`
57344    freetype_lib_path="$windows_path"
57345  fi
57346
57347
57348  unix_path="$freetype_obj_path"
57349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57350    windows_path=`$CYGPATH -m "$unix_path"`
57351    freetype_obj_path="$windows_path"
57352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57353    windows_path=`cmd //c echo $unix_path`
57354    freetype_obj_path="$windows_path"
57355  fi
57356
57357    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57358      freetype_platform=x64
57359    else
57360      freetype_platform=win32
57361    fi
57362
57363    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57364    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57365    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57366    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57367    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57368$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57369
57370    # First we try to build the freetype.dll
57371    $ECHO -e "@echo off\n"\
57372        "$MSBUILD $vcxproj_path "\
57373        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57374        "/p:Configuration=\"Release Multithreaded\" "\
57375        "/p:Platform=$freetype_platform "\
57376        "/p:ConfigurationType=DynamicLibrary "\
57377        "/p:TargetName=freetype "\
57378        "/p:OutDir=\"$freetype_lib_path\" "\
57379        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57380    cmd /c freetype.bat
57381
57382    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57383      # If that succeeds we also build freetype.lib
57384      $ECHO -e "@echo off\n"\
57385          "$MSBUILD $vcxproj_path "\
57386          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57387          "/p:Configuration=\"Release Multithreaded\" "\
57388          "/p:Platform=$freetype_platform "\
57389          "/p:ConfigurationType=StaticLibrary "\
57390          "/p:TargetName=freetype "\
57391          "/p:OutDir=\"$freetype_lib_path\" "\
57392          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57393      cmd /c freetype.bat
57394
57395      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57396        # Once we build both, lib and dll, set freetype lib and include path appropriately
57397        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57398        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57399        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57400$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57401      else
57402        BUILD_FREETYPE=no
57403      fi
57404    else
57405      BUILD_FREETYPE=no
57406    fi
57407  fi
57408
57409        if test "x$BUILD_FREETYPE" = xyes; then
57410          # Okay, we built it. Check that it works.
57411
57412  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57413  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57414  METHOD="--with-freetype-src"
57415
57416  # Let's start with an optimistic view of the world :-)
57417  FOUND_FREETYPE=yes
57418
57419  # First look for the canonical freetype main include file ft2build.h.
57420  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57421    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57422    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57423    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57424      # Fail.
57425      FOUND_FREETYPE=no
57426    fi
57427  fi
57428
57429  if test "x$FOUND_FREETYPE" = xyes; then
57430    # Include file found, let's continue the sanity check.
57431    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57432$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57433
57434    # Reset to default value
57435    FREETYPE_BASE_NAME=freetype
57436    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57437    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57438      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57439          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57440        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57441        # for the .6 version explicitly.
57442        FREETYPE_BASE_NAME=freetype.6
57443        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57444        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57445$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57446      else
57447        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57448$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57449        FOUND_FREETYPE=no
57450      fi
57451    else
57452      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57453        # On Windows, we will need both .lib and .dll file.
57454        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57455          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57456$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57457          FOUND_FREETYPE=no
57458        fi
57459      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57460          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57461        # Found lib in isa dir, use that instead.
57462        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57463        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57464$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57465      fi
57466    fi
57467  fi
57468
57469  if test "x$FOUND_FREETYPE" = xyes; then
57470
57471  # Only process if variable expands to non-empty
57472
57473  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57475
57476  # Input might be given as Windows format, start by converting to
57477  # unix format.
57478  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57479  new_path=`$CYGPATH -u "$path"`
57480
57481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57484  # "foo.exe" is OK but "foo" is an error.
57485  #
57486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57487  # It is also a way to make sure we got the proper file name for the real test later on.
57488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57489  if test "x$test_shortpath" = x; then
57490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57492    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57493  fi
57494
57495  # Call helper function which possibly converts this using DOS-style short mode.
57496  # If so, the updated path is stored in $new_path.
57497
57498  input_path="$new_path"
57499  # Check if we need to convert this using DOS-style short mode. If the path
57500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57501  # take no chances and rewrite it.
57502  # Note: m4 eats our [], so we need to use [ and ] instead.
57503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57504  if test "x$has_forbidden_chars" != x; then
57505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57509      # Going to short mode and back again did indeed matter. Since short mode is
57510      # case insensitive, let's make it lowercase to improve readability.
57511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57512      # Now convert it back to Unix-style (cygpath)
57513      input_path=`$CYGPATH -u "$shortmode_path"`
57514      new_path="$input_path"
57515    fi
57516  fi
57517
57518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57519  if test "x$test_cygdrive_prefix" = x; then
57520    # As a simple fix, exclude /usr/bin since it's not a real path.
57521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57523      # a path prefixed by /cygdrive for fixpath to work.
57524      new_path="$CYGWIN_ROOT_PATH$input_path"
57525    fi
57526  fi
57527
57528
57529  if test "x$path" != "x$new_path"; then
57530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57533  fi
57534
57535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57536
57537  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57538  has_colon=`$ECHO $path | $GREP ^.:`
57539  new_path="$path"
57540  if test "x$has_colon" = x; then
57541    # Not in mixed or Windows style, start by that.
57542    new_path=`cmd //c echo $path`
57543  fi
57544
57545
57546  input_path="$new_path"
57547  # Check if we need to convert this using DOS-style short mode. If the path
57548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57549  # take no chances and rewrite it.
57550  # Note: m4 eats our [], so we need to use [ and ] instead.
57551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57552  if test "x$has_forbidden_chars" != x; then
57553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57555  fi
57556
57557
57558  windows_path="$new_path"
57559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57560    unix_path=`$CYGPATH -u "$windows_path"`
57561    new_path="$unix_path"
57562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57564    new_path="$unix_path"
57565  fi
57566
57567  if test "x$path" != "x$new_path"; then
57568    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57570$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57571  fi
57572
57573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57575
57576    else
57577      # We're on a unix platform. Hooray! :)
57578      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57579      has_space=`$ECHO "$path" | $GREP " "`
57580      if test "x$has_space" != x; then
57581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57582$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57584      fi
57585
57586      # Use eval to expand a potential ~
57587      eval path="$path"
57588      if test ! -f "$path" && test ! -d "$path"; then
57589        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57590      fi
57591
57592      if test -d "$path"; then
57593        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57594      else
57595        dir="`$DIRNAME "$path"`"
57596        base="`$BASENAME "$path"`"
57597        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57598      fi
57599    fi
57600  fi
57601
57602
57603  # Only process if variable expands to non-empty
57604
57605  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57607
57608  # Input might be given as Windows format, start by converting to
57609  # unix format.
57610  path="$POTENTIAL_FREETYPE_LIB_PATH"
57611  new_path=`$CYGPATH -u "$path"`
57612
57613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57616  # "foo.exe" is OK but "foo" is an error.
57617  #
57618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57619  # It is also a way to make sure we got the proper file name for the real test later on.
57620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57621  if test "x$test_shortpath" = x; then
57622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57624    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57625  fi
57626
57627  # Call helper function which possibly converts this using DOS-style short mode.
57628  # If so, the updated path is stored in $new_path.
57629
57630  input_path="$new_path"
57631  # Check if we need to convert this using DOS-style short mode. If the path
57632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57633  # take no chances and rewrite it.
57634  # Note: m4 eats our [], so we need to use [ and ] instead.
57635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57636  if test "x$has_forbidden_chars" != x; then
57637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57641      # Going to short mode and back again did indeed matter. Since short mode is
57642      # case insensitive, let's make it lowercase to improve readability.
57643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57644      # Now convert it back to Unix-style (cygpath)
57645      input_path=`$CYGPATH -u "$shortmode_path"`
57646      new_path="$input_path"
57647    fi
57648  fi
57649
57650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57651  if test "x$test_cygdrive_prefix" = x; then
57652    # As a simple fix, exclude /usr/bin since it's not a real path.
57653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57655      # a path prefixed by /cygdrive for fixpath to work.
57656      new_path="$CYGWIN_ROOT_PATH$input_path"
57657    fi
57658  fi
57659
57660
57661  if test "x$path" != "x$new_path"; then
57662    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57665  fi
57666
57667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57668
57669  path="$POTENTIAL_FREETYPE_LIB_PATH"
57670  has_colon=`$ECHO $path | $GREP ^.:`
57671  new_path="$path"
57672  if test "x$has_colon" = x; then
57673    # Not in mixed or Windows style, start by that.
57674    new_path=`cmd //c echo $path`
57675  fi
57676
57677
57678  input_path="$new_path"
57679  # Check if we need to convert this using DOS-style short mode. If the path
57680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57681  # take no chances and rewrite it.
57682  # Note: m4 eats our [], so we need to use [ and ] instead.
57683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57684  if test "x$has_forbidden_chars" != x; then
57685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57687  fi
57688
57689
57690  windows_path="$new_path"
57691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57692    unix_path=`$CYGPATH -u "$windows_path"`
57693    new_path="$unix_path"
57694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57696    new_path="$unix_path"
57697  fi
57698
57699  if test "x$path" != "x$new_path"; then
57700    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57703  fi
57704
57705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57707
57708    else
57709      # We're on a unix platform. Hooray! :)
57710      path="$POTENTIAL_FREETYPE_LIB_PATH"
57711      has_space=`$ECHO "$path" | $GREP " "`
57712      if test "x$has_space" != x; then
57713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57714$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57716      fi
57717
57718      # Use eval to expand a potential ~
57719      eval path="$path"
57720      if test ! -f "$path" && test ! -d "$path"; then
57721        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57722      fi
57723
57724      if test -d "$path"; then
57725        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57726      else
57727        dir="`$DIRNAME "$path"`"
57728        base="`$BASENAME "$path"`"
57729        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57730      fi
57731    fi
57732  fi
57733
57734
57735    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57737$as_echo_n "checking for freetype includes... " >&6; }
57738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57739$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57740    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57742$as_echo_n "checking for freetype libraries... " >&6; }
57743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57744$as_echo "$FREETYPE_LIB_PATH" >&6; }
57745  fi
57746
57747          if test "x$FOUND_FREETYPE" != xyes; then
57748            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57749          fi
57750        else
57751          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57752$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57753          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57754        fi
57755      else
57756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57757$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57758      fi
57759    fi
57760
57761    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57762      # User has specified settings
57763
57764      if test "x$BUNDLE_FREETYPE" = x; then
57765        # If not specified, default is to bundle freetype
57766        BUNDLE_FREETYPE=yes
57767      fi
57768
57769      if test "x$with_freetype" != x; then
57770        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57771        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57772      fi
57773
57774      # Allow --with-freetype-lib and --with-freetype-include to override
57775      if test "x$with_freetype_include" != x; then
57776        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57777      fi
57778      if test "x$with_freetype_lib" != x; then
57779        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57780      fi
57781
57782      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57783        # Okay, we got it. Check that it works.
57784
57785  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57786  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57787  METHOD="--with-freetype"
57788
57789  # Let's start with an optimistic view of the world :-)
57790  FOUND_FREETYPE=yes
57791
57792  # First look for the canonical freetype main include file ft2build.h.
57793  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57794    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57795    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57796    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57797      # Fail.
57798      FOUND_FREETYPE=no
57799    fi
57800  fi
57801
57802  if test "x$FOUND_FREETYPE" = xyes; then
57803    # Include file found, let's continue the sanity check.
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57805$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57806
57807    # Reset to default value
57808    FREETYPE_BASE_NAME=freetype
57809    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57810    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57811      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57812          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57813        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57814        # for the .6 version explicitly.
57815        FREETYPE_BASE_NAME=freetype.6
57816        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57817        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57818$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57819      else
57820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57822        FOUND_FREETYPE=no
57823      fi
57824    else
57825      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57826        # On Windows, we will need both .lib and .dll file.
57827        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57828          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57830          FOUND_FREETYPE=no
57831        fi
57832      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57833          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57834        # Found lib in isa dir, use that instead.
57835        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57836        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57837$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57838      fi
57839    fi
57840  fi
57841
57842  if test "x$FOUND_FREETYPE" = xyes; then
57843
57844  # Only process if variable expands to non-empty
57845
57846  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57848
57849  # Input might be given as Windows format, start by converting to
57850  # unix format.
57851  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57852  new_path=`$CYGPATH -u "$path"`
57853
57854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57857  # "foo.exe" is OK but "foo" is an error.
57858  #
57859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57860  # It is also a way to make sure we got the proper file name for the real test later on.
57861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57862  if test "x$test_shortpath" = x; then
57863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57865    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57866  fi
57867
57868  # Call helper function which possibly converts this using DOS-style short mode.
57869  # If so, the updated path is stored in $new_path.
57870
57871  input_path="$new_path"
57872  # Check if we need to convert this using DOS-style short mode. If the path
57873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57874  # take no chances and rewrite it.
57875  # Note: m4 eats our [], so we need to use [ and ] instead.
57876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57877  if test "x$has_forbidden_chars" != x; then
57878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57882      # Going to short mode and back again did indeed matter. Since short mode is
57883      # case insensitive, let's make it lowercase to improve readability.
57884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57885      # Now convert it back to Unix-style (cygpath)
57886      input_path=`$CYGPATH -u "$shortmode_path"`
57887      new_path="$input_path"
57888    fi
57889  fi
57890
57891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57892  if test "x$test_cygdrive_prefix" = x; then
57893    # As a simple fix, exclude /usr/bin since it's not a real path.
57894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57896      # a path prefixed by /cygdrive for fixpath to work.
57897      new_path="$CYGWIN_ROOT_PATH$input_path"
57898    fi
57899  fi
57900
57901
57902  if test "x$path" != "x$new_path"; then
57903    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57906  fi
57907
57908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57909
57910  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57911  has_colon=`$ECHO $path | $GREP ^.:`
57912  new_path="$path"
57913  if test "x$has_colon" = x; then
57914    # Not in mixed or Windows style, start by that.
57915    new_path=`cmd //c echo $path`
57916  fi
57917
57918
57919  input_path="$new_path"
57920  # Check if we need to convert this using DOS-style short mode. If the path
57921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57922  # take no chances and rewrite it.
57923  # Note: m4 eats our [], so we need to use [ and ] instead.
57924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57925  if test "x$has_forbidden_chars" != x; then
57926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57928  fi
57929
57930
57931  windows_path="$new_path"
57932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57933    unix_path=`$CYGPATH -u "$windows_path"`
57934    new_path="$unix_path"
57935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57937    new_path="$unix_path"
57938  fi
57939
57940  if test "x$path" != "x$new_path"; then
57941    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57944  fi
57945
57946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57948
57949    else
57950      # We're on a unix platform. Hooray! :)
57951      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57952      has_space=`$ECHO "$path" | $GREP " "`
57953      if test "x$has_space" != x; then
57954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57957      fi
57958
57959      # Use eval to expand a potential ~
57960      eval path="$path"
57961      if test ! -f "$path" && test ! -d "$path"; then
57962        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57963      fi
57964
57965      if test -d "$path"; then
57966        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57967      else
57968        dir="`$DIRNAME "$path"`"
57969        base="`$BASENAME "$path"`"
57970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57971      fi
57972    fi
57973  fi
57974
57975
57976  # Only process if variable expands to non-empty
57977
57978  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57980
57981  # Input might be given as Windows format, start by converting to
57982  # unix format.
57983  path="$POTENTIAL_FREETYPE_LIB_PATH"
57984  new_path=`$CYGPATH -u "$path"`
57985
57986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57989  # "foo.exe" is OK but "foo" is an error.
57990  #
57991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57992  # It is also a way to make sure we got the proper file name for the real test later on.
57993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57994  if test "x$test_shortpath" = x; then
57995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57997    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57998  fi
57999
58000  # Call helper function which possibly converts this using DOS-style short mode.
58001  # If so, the updated path is stored in $new_path.
58002
58003  input_path="$new_path"
58004  # Check if we need to convert this using DOS-style short mode. If the path
58005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58006  # take no chances and rewrite it.
58007  # Note: m4 eats our [], so we need to use [ and ] instead.
58008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58009  if test "x$has_forbidden_chars" != x; then
58010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58014      # Going to short mode and back again did indeed matter. Since short mode is
58015      # case insensitive, let's make it lowercase to improve readability.
58016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58017      # Now convert it back to Unix-style (cygpath)
58018      input_path=`$CYGPATH -u "$shortmode_path"`
58019      new_path="$input_path"
58020    fi
58021  fi
58022
58023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58024  if test "x$test_cygdrive_prefix" = x; then
58025    # As a simple fix, exclude /usr/bin since it's not a real path.
58026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58028      # a path prefixed by /cygdrive for fixpath to work.
58029      new_path="$CYGWIN_ROOT_PATH$input_path"
58030    fi
58031  fi
58032
58033
58034  if test "x$path" != "x$new_path"; then
58035    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58038  fi
58039
58040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58041
58042  path="$POTENTIAL_FREETYPE_LIB_PATH"
58043  has_colon=`$ECHO $path | $GREP ^.:`
58044  new_path="$path"
58045  if test "x$has_colon" = x; then
58046    # Not in mixed or Windows style, start by that.
58047    new_path=`cmd //c echo $path`
58048  fi
58049
58050
58051  input_path="$new_path"
58052  # Check if we need to convert this using DOS-style short mode. If the path
58053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58054  # take no chances and rewrite it.
58055  # Note: m4 eats our [], so we need to use [ and ] instead.
58056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58057  if test "x$has_forbidden_chars" != x; then
58058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58060  fi
58061
58062
58063  windows_path="$new_path"
58064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58065    unix_path=`$CYGPATH -u "$windows_path"`
58066    new_path="$unix_path"
58067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58069    new_path="$unix_path"
58070  fi
58071
58072  if test "x$path" != "x$new_path"; then
58073    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58076  fi
58077
58078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58080
58081    else
58082      # We're on a unix platform. Hooray! :)
58083      path="$POTENTIAL_FREETYPE_LIB_PATH"
58084      has_space=`$ECHO "$path" | $GREP " "`
58085      if test "x$has_space" != x; then
58086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58087$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58089      fi
58090
58091      # Use eval to expand a potential ~
58092      eval path="$path"
58093      if test ! -f "$path" && test ! -d "$path"; then
58094        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58095      fi
58096
58097      if test -d "$path"; then
58098        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58099      else
58100        dir="`$DIRNAME "$path"`"
58101        base="`$BASENAME "$path"`"
58102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58103      fi
58104    fi
58105  fi
58106
58107
58108    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58110$as_echo_n "checking for freetype includes... " >&6; }
58111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58112$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58113    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58115$as_echo_n "checking for freetype libraries... " >&6; }
58116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58117$as_echo "$FREETYPE_LIB_PATH" >&6; }
58118  fi
58119
58120        if test "x$FOUND_FREETYPE" != xyes; then
58121          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58122        fi
58123      else
58124        # User specified only one of lib or include. This is an error.
58125        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58126          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58127$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58128          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58129        else
58130          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58131$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58132          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58133        fi
58134      fi
58135    else
58136      # User did not specify settings, but we need freetype. Try to locate it.
58137
58138      if test "x$BUNDLE_FREETYPE" = x; then
58139        # If not specified, default is to bundle freetype only on windows
58140        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58141          BUNDLE_FREETYPE=yes
58142        else
58143          BUNDLE_FREETYPE=no
58144        fi
58145      fi
58146
58147      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58148      if test "x$SYSROOT" = x; then
58149        if test "x$FOUND_FREETYPE" != xyes; then
58150          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58151          if test "x$PKG_CONFIG" != x; then
58152
58153pkg_failed=no
58154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58155$as_echo_n "checking for FREETYPE... " >&6; }
58156
58157if test -n "$FREETYPE_CFLAGS"; then
58158    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58159 elif test -n "$PKG_CONFIG"; then
58160    if test -n "$PKG_CONFIG" && \
58161    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58162  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58163  ac_status=$?
58164  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58165  test $ac_status = 0; }; then
58166  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58167else
58168  pkg_failed=yes
58169fi
58170 else
58171    pkg_failed=untried
58172fi
58173if test -n "$FREETYPE_LIBS"; then
58174    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58175 elif test -n "$PKG_CONFIG"; then
58176    if test -n "$PKG_CONFIG" && \
58177    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58178  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58179  ac_status=$?
58180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58181  test $ac_status = 0; }; then
58182  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58183else
58184  pkg_failed=yes
58185fi
58186 else
58187    pkg_failed=untried
58188fi
58189
58190
58191
58192if test $pkg_failed = yes; then
58193
58194if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58195        _pkg_short_errors_supported=yes
58196else
58197        _pkg_short_errors_supported=no
58198fi
58199        if test $_pkg_short_errors_supported = yes; then
58200	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58201        else
58202	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58203        fi
58204	# Put the nasty error message in config.log where it belongs
58205	echo "$FREETYPE_PKG_ERRORS" >&5
58206
58207	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58208$as_echo "no" >&6; }
58209                FOUND_FREETYPE=no
58210elif test $pkg_failed = untried; then
58211	FOUND_FREETYPE=no
58212else
58213	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58214	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58216$as_echo "yes" >&6; }
58217	FOUND_FREETYPE=yes
58218fi
58219            if test "x$FOUND_FREETYPE" = xyes; then
58220              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58221              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58222              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58223              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58224                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58225              fi
58226              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58227              if test "x$BUNDLE_FREETYPE" = xyes; then
58228                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58229$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58230                FOUND_FREETYPE=no
58231              else
58232                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58233$as_echo_n "checking for freetype... " >&6; }
58234                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58235$as_echo "yes (using pkg-config)" >&6; }
58236              fi
58237            fi
58238          fi
58239        fi
58240      fi
58241
58242      if test "x$FOUND_FREETYPE" != xyes; then
58243        # Check in well-known locations
58244        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58245          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58246
58247  windows_path="$FREETYPE_BASE_DIR"
58248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58249    unix_path=`$CYGPATH -u "$windows_path"`
58250    FREETYPE_BASE_DIR="$unix_path"
58251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58253    FREETYPE_BASE_DIR="$unix_path"
58254  fi
58255
58256
58257  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58258  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58259  METHOD="well-known location"
58260
58261  # Let's start with an optimistic view of the world :-)
58262  FOUND_FREETYPE=yes
58263
58264  # First look for the canonical freetype main include file ft2build.h.
58265  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58266    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58267    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58268    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58269      # Fail.
58270      FOUND_FREETYPE=no
58271    fi
58272  fi
58273
58274  if test "x$FOUND_FREETYPE" = xyes; then
58275    # Include file found, let's continue the sanity check.
58276    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58277$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58278
58279    # Reset to default value
58280    FREETYPE_BASE_NAME=freetype
58281    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58282    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58283      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58284          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58285        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58286        # for the .6 version explicitly.
58287        FREETYPE_BASE_NAME=freetype.6
58288        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58289        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58290$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58291      else
58292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58293$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58294        FOUND_FREETYPE=no
58295      fi
58296    else
58297      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58298        # On Windows, we will need both .lib and .dll file.
58299        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58300          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58301$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58302          FOUND_FREETYPE=no
58303        fi
58304      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58305          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58306        # Found lib in isa dir, use that instead.
58307        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58308        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58309$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58310      fi
58311    fi
58312  fi
58313
58314  if test "x$FOUND_FREETYPE" = xyes; then
58315
58316  # Only process if variable expands to non-empty
58317
58318  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58320
58321  # Input might be given as Windows format, start by converting to
58322  # unix format.
58323  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58324  new_path=`$CYGPATH -u "$path"`
58325
58326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58329  # "foo.exe" is OK but "foo" is an error.
58330  #
58331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58332  # It is also a way to make sure we got the proper file name for the real test later on.
58333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58334  if test "x$test_shortpath" = x; then
58335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58338  fi
58339
58340  # Call helper function which possibly converts this using DOS-style short mode.
58341  # If so, the updated path is stored in $new_path.
58342
58343  input_path="$new_path"
58344  # Check if we need to convert this using DOS-style short mode. If the path
58345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58346  # take no chances and rewrite it.
58347  # Note: m4 eats our [], so we need to use [ and ] instead.
58348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58349  if test "x$has_forbidden_chars" != x; then
58350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58354      # Going to short mode and back again did indeed matter. Since short mode is
58355      # case insensitive, let's make it lowercase to improve readability.
58356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58357      # Now convert it back to Unix-style (cygpath)
58358      input_path=`$CYGPATH -u "$shortmode_path"`
58359      new_path="$input_path"
58360    fi
58361  fi
58362
58363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58364  if test "x$test_cygdrive_prefix" = x; then
58365    # As a simple fix, exclude /usr/bin since it's not a real path.
58366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58368      # a path prefixed by /cygdrive for fixpath to work.
58369      new_path="$CYGWIN_ROOT_PATH$input_path"
58370    fi
58371  fi
58372
58373
58374  if test "x$path" != "x$new_path"; then
58375    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58378  fi
58379
58380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58381
58382  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58383  has_colon=`$ECHO $path | $GREP ^.:`
58384  new_path="$path"
58385  if test "x$has_colon" = x; then
58386    # Not in mixed or Windows style, start by that.
58387    new_path=`cmd //c echo $path`
58388  fi
58389
58390
58391  input_path="$new_path"
58392  # Check if we need to convert this using DOS-style short mode. If the path
58393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58394  # take no chances and rewrite it.
58395  # Note: m4 eats our [], so we need to use [ and ] instead.
58396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58397  if test "x$has_forbidden_chars" != x; then
58398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58400  fi
58401
58402
58403  windows_path="$new_path"
58404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58405    unix_path=`$CYGPATH -u "$windows_path"`
58406    new_path="$unix_path"
58407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58409    new_path="$unix_path"
58410  fi
58411
58412  if test "x$path" != "x$new_path"; then
58413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58416  fi
58417
58418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58420
58421    else
58422      # We're on a unix platform. Hooray! :)
58423      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58424      has_space=`$ECHO "$path" | $GREP " "`
58425      if test "x$has_space" != x; then
58426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58429      fi
58430
58431      # Use eval to expand a potential ~
58432      eval path="$path"
58433      if test ! -f "$path" && test ! -d "$path"; then
58434        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58435      fi
58436
58437      if test -d "$path"; then
58438        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58439      else
58440        dir="`$DIRNAME "$path"`"
58441        base="`$BASENAME "$path"`"
58442        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58443      fi
58444    fi
58445  fi
58446
58447
58448  # Only process if variable expands to non-empty
58449
58450  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58452
58453  # Input might be given as Windows format, start by converting to
58454  # unix format.
58455  path="$POTENTIAL_FREETYPE_LIB_PATH"
58456  new_path=`$CYGPATH -u "$path"`
58457
58458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58461  # "foo.exe" is OK but "foo" is an error.
58462  #
58463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58464  # It is also a way to make sure we got the proper file name for the real test later on.
58465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58466  if test "x$test_shortpath" = x; then
58467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58469    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58470  fi
58471
58472  # Call helper function which possibly converts this using DOS-style short mode.
58473  # If so, the updated path is stored in $new_path.
58474
58475  input_path="$new_path"
58476  # Check if we need to convert this using DOS-style short mode. If the path
58477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58478  # take no chances and rewrite it.
58479  # Note: m4 eats our [], so we need to use [ and ] instead.
58480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58481  if test "x$has_forbidden_chars" != x; then
58482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58486      # Going to short mode and back again did indeed matter. Since short mode is
58487      # case insensitive, let's make it lowercase to improve readability.
58488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58489      # Now convert it back to Unix-style (cygpath)
58490      input_path=`$CYGPATH -u "$shortmode_path"`
58491      new_path="$input_path"
58492    fi
58493  fi
58494
58495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58496  if test "x$test_cygdrive_prefix" = x; then
58497    # As a simple fix, exclude /usr/bin since it's not a real path.
58498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58500      # a path prefixed by /cygdrive for fixpath to work.
58501      new_path="$CYGWIN_ROOT_PATH$input_path"
58502    fi
58503  fi
58504
58505
58506  if test "x$path" != "x$new_path"; then
58507    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58510  fi
58511
58512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58513
58514  path="$POTENTIAL_FREETYPE_LIB_PATH"
58515  has_colon=`$ECHO $path | $GREP ^.:`
58516  new_path="$path"
58517  if test "x$has_colon" = x; then
58518    # Not in mixed or Windows style, start by that.
58519    new_path=`cmd //c echo $path`
58520  fi
58521
58522
58523  input_path="$new_path"
58524  # Check if we need to convert this using DOS-style short mode. If the path
58525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58526  # take no chances and rewrite it.
58527  # Note: m4 eats our [], so we need to use [ and ] instead.
58528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58529  if test "x$has_forbidden_chars" != x; then
58530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58532  fi
58533
58534
58535  windows_path="$new_path"
58536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58537    unix_path=`$CYGPATH -u "$windows_path"`
58538    new_path="$unix_path"
58539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58541    new_path="$unix_path"
58542  fi
58543
58544  if test "x$path" != "x$new_path"; then
58545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58548  fi
58549
58550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58552
58553    else
58554      # We're on a unix platform. Hooray! :)
58555      path="$POTENTIAL_FREETYPE_LIB_PATH"
58556      has_space=`$ECHO "$path" | $GREP " "`
58557      if test "x$has_space" != x; then
58558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58561      fi
58562
58563      # Use eval to expand a potential ~
58564      eval path="$path"
58565      if test ! -f "$path" && test ! -d "$path"; then
58566        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58567      fi
58568
58569      if test -d "$path"; then
58570        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58571      else
58572        dir="`$DIRNAME "$path"`"
58573        base="`$BASENAME "$path"`"
58574        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58575      fi
58576    fi
58577  fi
58578
58579
58580    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58582$as_echo_n "checking for freetype includes... " >&6; }
58583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58584$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58585    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58587$as_echo_n "checking for freetype libraries... " >&6; }
58588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58589$as_echo "$FREETYPE_LIB_PATH" >&6; }
58590  fi
58591
58592          if test "x$FOUND_FREETYPE" != xyes; then
58593            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58594
58595  windows_path="$FREETYPE_BASE_DIR"
58596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58597    unix_path=`$CYGPATH -u "$windows_path"`
58598    FREETYPE_BASE_DIR="$unix_path"
58599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58601    FREETYPE_BASE_DIR="$unix_path"
58602  fi
58603
58604
58605  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58606  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58607  METHOD="well-known location"
58608
58609  # Let's start with an optimistic view of the world :-)
58610  FOUND_FREETYPE=yes
58611
58612  # First look for the canonical freetype main include file ft2build.h.
58613  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58614    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58615    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58616    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58617      # Fail.
58618      FOUND_FREETYPE=no
58619    fi
58620  fi
58621
58622  if test "x$FOUND_FREETYPE" = xyes; then
58623    # Include file found, let's continue the sanity check.
58624    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58625$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58626
58627    # Reset to default value
58628    FREETYPE_BASE_NAME=freetype
58629    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58630    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58631      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58632          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58633        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58634        # for the .6 version explicitly.
58635        FREETYPE_BASE_NAME=freetype.6
58636        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58637        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58638$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58639      else
58640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58641$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58642        FOUND_FREETYPE=no
58643      fi
58644    else
58645      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58646        # On Windows, we will need both .lib and .dll file.
58647        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58648          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58649$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58650          FOUND_FREETYPE=no
58651        fi
58652      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58653          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58654        # Found lib in isa dir, use that instead.
58655        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58656        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58657$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58658      fi
58659    fi
58660  fi
58661
58662  if test "x$FOUND_FREETYPE" = xyes; then
58663
58664  # Only process if variable expands to non-empty
58665
58666  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58668
58669  # Input might be given as Windows format, start by converting to
58670  # unix format.
58671  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58672  new_path=`$CYGPATH -u "$path"`
58673
58674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58677  # "foo.exe" is OK but "foo" is an error.
58678  #
58679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58680  # It is also a way to make sure we got the proper file name for the real test later on.
58681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58682  if test "x$test_shortpath" = x; then
58683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58686  fi
58687
58688  # Call helper function which possibly converts this using DOS-style short mode.
58689  # If so, the updated path is stored in $new_path.
58690
58691  input_path="$new_path"
58692  # Check if we need to convert this using DOS-style short mode. If the path
58693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58694  # take no chances and rewrite it.
58695  # Note: m4 eats our [], so we need to use [ and ] instead.
58696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58697  if test "x$has_forbidden_chars" != x; then
58698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58702      # Going to short mode and back again did indeed matter. Since short mode is
58703      # case insensitive, let's make it lowercase to improve readability.
58704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58705      # Now convert it back to Unix-style (cygpath)
58706      input_path=`$CYGPATH -u "$shortmode_path"`
58707      new_path="$input_path"
58708    fi
58709  fi
58710
58711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58712  if test "x$test_cygdrive_prefix" = x; then
58713    # As a simple fix, exclude /usr/bin since it's not a real path.
58714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58716      # a path prefixed by /cygdrive for fixpath to work.
58717      new_path="$CYGWIN_ROOT_PATH$input_path"
58718    fi
58719  fi
58720
58721
58722  if test "x$path" != "x$new_path"; then
58723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58726  fi
58727
58728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58729
58730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58731  has_colon=`$ECHO $path | $GREP ^.:`
58732  new_path="$path"
58733  if test "x$has_colon" = x; then
58734    # Not in mixed or Windows style, start by that.
58735    new_path=`cmd //c echo $path`
58736  fi
58737
58738
58739  input_path="$new_path"
58740  # Check if we need to convert this using DOS-style short mode. If the path
58741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58742  # take no chances and rewrite it.
58743  # Note: m4 eats our [], so we need to use [ and ] instead.
58744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58745  if test "x$has_forbidden_chars" != x; then
58746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58748  fi
58749
58750
58751  windows_path="$new_path"
58752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58753    unix_path=`$CYGPATH -u "$windows_path"`
58754    new_path="$unix_path"
58755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58757    new_path="$unix_path"
58758  fi
58759
58760  if test "x$path" != "x$new_path"; then
58761    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58764  fi
58765
58766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58768
58769    else
58770      # We're on a unix platform. Hooray! :)
58771      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58772      has_space=`$ECHO "$path" | $GREP " "`
58773      if test "x$has_space" != x; then
58774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58777      fi
58778
58779      # Use eval to expand a potential ~
58780      eval path="$path"
58781      if test ! -f "$path" && test ! -d "$path"; then
58782        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58783      fi
58784
58785      if test -d "$path"; then
58786        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58787      else
58788        dir="`$DIRNAME "$path"`"
58789        base="`$BASENAME "$path"`"
58790        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58791      fi
58792    fi
58793  fi
58794
58795
58796  # Only process if variable expands to non-empty
58797
58798  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58800
58801  # Input might be given as Windows format, start by converting to
58802  # unix format.
58803  path="$POTENTIAL_FREETYPE_LIB_PATH"
58804  new_path=`$CYGPATH -u "$path"`
58805
58806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58809  # "foo.exe" is OK but "foo" is an error.
58810  #
58811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58812  # It is also a way to make sure we got the proper file name for the real test later on.
58813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58814  if test "x$test_shortpath" = x; then
58815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58816$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58817    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58818  fi
58819
58820  # Call helper function which possibly converts this using DOS-style short mode.
58821  # If so, the updated path is stored in $new_path.
58822
58823  input_path="$new_path"
58824  # Check if we need to convert this using DOS-style short mode. If the path
58825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58826  # take no chances and rewrite it.
58827  # Note: m4 eats our [], so we need to use [ and ] instead.
58828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58829  if test "x$has_forbidden_chars" != x; then
58830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58834      # Going to short mode and back again did indeed matter. Since short mode is
58835      # case insensitive, let's make it lowercase to improve readability.
58836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58837      # Now convert it back to Unix-style (cygpath)
58838      input_path=`$CYGPATH -u "$shortmode_path"`
58839      new_path="$input_path"
58840    fi
58841  fi
58842
58843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58844  if test "x$test_cygdrive_prefix" = x; then
58845    # As a simple fix, exclude /usr/bin since it's not a real path.
58846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58848      # a path prefixed by /cygdrive for fixpath to work.
58849      new_path="$CYGWIN_ROOT_PATH$input_path"
58850    fi
58851  fi
58852
58853
58854  if test "x$path" != "x$new_path"; then
58855    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58857$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58858  fi
58859
58860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58861
58862  path="$POTENTIAL_FREETYPE_LIB_PATH"
58863  has_colon=`$ECHO $path | $GREP ^.:`
58864  new_path="$path"
58865  if test "x$has_colon" = x; then
58866    # Not in mixed or Windows style, start by that.
58867    new_path=`cmd //c echo $path`
58868  fi
58869
58870
58871  input_path="$new_path"
58872  # Check if we need to convert this using DOS-style short mode. If the path
58873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58874  # take no chances and rewrite it.
58875  # Note: m4 eats our [], so we need to use [ and ] instead.
58876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58877  if test "x$has_forbidden_chars" != x; then
58878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58880  fi
58881
58882
58883  windows_path="$new_path"
58884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58885    unix_path=`$CYGPATH -u "$windows_path"`
58886    new_path="$unix_path"
58887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58889    new_path="$unix_path"
58890  fi
58891
58892  if test "x$path" != "x$new_path"; then
58893    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58895$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58896  fi
58897
58898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58900
58901    else
58902      # We're on a unix platform. Hooray! :)
58903      path="$POTENTIAL_FREETYPE_LIB_PATH"
58904      has_space=`$ECHO "$path" | $GREP " "`
58905      if test "x$has_space" != x; then
58906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58907$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58909      fi
58910
58911      # Use eval to expand a potential ~
58912      eval path="$path"
58913      if test ! -f "$path" && test ! -d "$path"; then
58914        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58915      fi
58916
58917      if test -d "$path"; then
58918        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58919      else
58920        dir="`$DIRNAME "$path"`"
58921        base="`$BASENAME "$path"`"
58922        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58923      fi
58924    fi
58925  fi
58926
58927
58928    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58930$as_echo_n "checking for freetype includes... " >&6; }
58931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58932$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58933    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58935$as_echo_n "checking for freetype libraries... " >&6; }
58936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58937$as_echo "$FREETYPE_LIB_PATH" >&6; }
58938  fi
58939
58940          fi
58941          if test "x$FOUND_FREETYPE" != xyes; then
58942            FREETYPE_BASE_DIR="$HOME/freetype"
58943
58944  windows_path="$FREETYPE_BASE_DIR"
58945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58946    unix_path=`$CYGPATH -u "$windows_path"`
58947    FREETYPE_BASE_DIR="$unix_path"
58948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58950    FREETYPE_BASE_DIR="$unix_path"
58951  fi
58952
58953            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58954
58955  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58956  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58957  METHOD="well-known location"
58958
58959  # Let's start with an optimistic view of the world :-)
58960  FOUND_FREETYPE=yes
58961
58962  # First look for the canonical freetype main include file ft2build.h.
58963  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58964    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58965    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58966    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58967      # Fail.
58968      FOUND_FREETYPE=no
58969    fi
58970  fi
58971
58972  if test "x$FOUND_FREETYPE" = xyes; then
58973    # Include file found, let's continue the sanity check.
58974    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58975$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58976
58977    # Reset to default value
58978    FREETYPE_BASE_NAME=freetype
58979    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58980    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58981      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58982          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58983        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58984        # for the .6 version explicitly.
58985        FREETYPE_BASE_NAME=freetype.6
58986        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58987        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58988$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58989      else
58990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58991$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58992        FOUND_FREETYPE=no
58993      fi
58994    else
58995      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58996        # On Windows, we will need both .lib and .dll file.
58997        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58998          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58999$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59000          FOUND_FREETYPE=no
59001        fi
59002      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59003          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59004        # Found lib in isa dir, use that instead.
59005        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59006        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59007$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59008      fi
59009    fi
59010  fi
59011
59012  if test "x$FOUND_FREETYPE" = xyes; then
59013
59014  # Only process if variable expands to non-empty
59015
59016  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59018
59019  # Input might be given as Windows format, start by converting to
59020  # unix format.
59021  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59022  new_path=`$CYGPATH -u "$path"`
59023
59024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59027  # "foo.exe" is OK but "foo" is an error.
59028  #
59029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59030  # It is also a way to make sure we got the proper file name for the real test later on.
59031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59032  if test "x$test_shortpath" = x; then
59033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59034$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59035    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59036  fi
59037
59038  # Call helper function which possibly converts this using DOS-style short mode.
59039  # If so, the updated path is stored in $new_path.
59040
59041  input_path="$new_path"
59042  # Check if we need to convert this using DOS-style short mode. If the path
59043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59044  # take no chances and rewrite it.
59045  # Note: m4 eats our [], so we need to use [ and ] instead.
59046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59047  if test "x$has_forbidden_chars" != x; then
59048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59052      # Going to short mode and back again did indeed matter. Since short mode is
59053      # case insensitive, let's make it lowercase to improve readability.
59054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59055      # Now convert it back to Unix-style (cygpath)
59056      input_path=`$CYGPATH -u "$shortmode_path"`
59057      new_path="$input_path"
59058    fi
59059  fi
59060
59061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59062  if test "x$test_cygdrive_prefix" = x; then
59063    # As a simple fix, exclude /usr/bin since it's not a real path.
59064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59066      # a path prefixed by /cygdrive for fixpath to work.
59067      new_path="$CYGWIN_ROOT_PATH$input_path"
59068    fi
59069  fi
59070
59071
59072  if test "x$path" != "x$new_path"; then
59073    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59076  fi
59077
59078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59079
59080  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59081  has_colon=`$ECHO $path | $GREP ^.:`
59082  new_path="$path"
59083  if test "x$has_colon" = x; then
59084    # Not in mixed or Windows style, start by that.
59085    new_path=`cmd //c echo $path`
59086  fi
59087
59088
59089  input_path="$new_path"
59090  # Check if we need to convert this using DOS-style short mode. If the path
59091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59092  # take no chances and rewrite it.
59093  # Note: m4 eats our [], so we need to use [ and ] instead.
59094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59095  if test "x$has_forbidden_chars" != x; then
59096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59098  fi
59099
59100
59101  windows_path="$new_path"
59102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59103    unix_path=`$CYGPATH -u "$windows_path"`
59104    new_path="$unix_path"
59105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59107    new_path="$unix_path"
59108  fi
59109
59110  if test "x$path" != "x$new_path"; then
59111    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59114  fi
59115
59116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59118
59119    else
59120      # We're on a unix platform. Hooray! :)
59121      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59122      has_space=`$ECHO "$path" | $GREP " "`
59123      if test "x$has_space" != x; then
59124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59125$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59127      fi
59128
59129      # Use eval to expand a potential ~
59130      eval path="$path"
59131      if test ! -f "$path" && test ! -d "$path"; then
59132        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59133      fi
59134
59135      if test -d "$path"; then
59136        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59137      else
59138        dir="`$DIRNAME "$path"`"
59139        base="`$BASENAME "$path"`"
59140        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59141      fi
59142    fi
59143  fi
59144
59145
59146  # Only process if variable expands to non-empty
59147
59148  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59150
59151  # Input might be given as Windows format, start by converting to
59152  # unix format.
59153  path="$POTENTIAL_FREETYPE_LIB_PATH"
59154  new_path=`$CYGPATH -u "$path"`
59155
59156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59159  # "foo.exe" is OK but "foo" is an error.
59160  #
59161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59162  # It is also a way to make sure we got the proper file name for the real test later on.
59163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59164  if test "x$test_shortpath" = x; then
59165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59166$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59167    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59168  fi
59169
59170  # Call helper function which possibly converts this using DOS-style short mode.
59171  # If so, the updated path is stored in $new_path.
59172
59173  input_path="$new_path"
59174  # Check if we need to convert this using DOS-style short mode. If the path
59175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59176  # take no chances and rewrite it.
59177  # Note: m4 eats our [], so we need to use [ and ] instead.
59178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59179  if test "x$has_forbidden_chars" != x; then
59180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59184      # Going to short mode and back again did indeed matter. Since short mode is
59185      # case insensitive, let's make it lowercase to improve readability.
59186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59187      # Now convert it back to Unix-style (cygpath)
59188      input_path=`$CYGPATH -u "$shortmode_path"`
59189      new_path="$input_path"
59190    fi
59191  fi
59192
59193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59194  if test "x$test_cygdrive_prefix" = x; then
59195    # As a simple fix, exclude /usr/bin since it's not a real path.
59196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59198      # a path prefixed by /cygdrive for fixpath to work.
59199      new_path="$CYGWIN_ROOT_PATH$input_path"
59200    fi
59201  fi
59202
59203
59204  if test "x$path" != "x$new_path"; then
59205    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59208  fi
59209
59210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59211
59212  path="$POTENTIAL_FREETYPE_LIB_PATH"
59213  has_colon=`$ECHO $path | $GREP ^.:`
59214  new_path="$path"
59215  if test "x$has_colon" = x; then
59216    # Not in mixed or Windows style, start by that.
59217    new_path=`cmd //c echo $path`
59218  fi
59219
59220
59221  input_path="$new_path"
59222  # Check if we need to convert this using DOS-style short mode. If the path
59223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59224  # take no chances and rewrite it.
59225  # Note: m4 eats our [], so we need to use [ and ] instead.
59226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59227  if test "x$has_forbidden_chars" != x; then
59228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59230  fi
59231
59232
59233  windows_path="$new_path"
59234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59235    unix_path=`$CYGPATH -u "$windows_path"`
59236    new_path="$unix_path"
59237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59239    new_path="$unix_path"
59240  fi
59241
59242  if test "x$path" != "x$new_path"; then
59243    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59246  fi
59247
59248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59250
59251    else
59252      # We're on a unix platform. Hooray! :)
59253      path="$POTENTIAL_FREETYPE_LIB_PATH"
59254      has_space=`$ECHO "$path" | $GREP " "`
59255      if test "x$has_space" != x; then
59256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59257$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59259      fi
59260
59261      # Use eval to expand a potential ~
59262      eval path="$path"
59263      if test ! -f "$path" && test ! -d "$path"; then
59264        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59265      fi
59266
59267      if test -d "$path"; then
59268        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59269      else
59270        dir="`$DIRNAME "$path"`"
59271        base="`$BASENAME "$path"`"
59272        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59273      fi
59274    fi
59275  fi
59276
59277
59278    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59280$as_echo_n "checking for freetype includes... " >&6; }
59281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59282$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59283    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59285$as_echo_n "checking for freetype libraries... " >&6; }
59286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59287$as_echo "$FREETYPE_LIB_PATH" >&6; }
59288  fi
59289
59290            else
59291
59292  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59293  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59294  METHOD="well-known location"
59295
59296  # Let's start with an optimistic view of the world :-)
59297  FOUND_FREETYPE=yes
59298
59299  # First look for the canonical freetype main include file ft2build.h.
59300  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59301    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59302    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59303    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59304      # Fail.
59305      FOUND_FREETYPE=no
59306    fi
59307  fi
59308
59309  if test "x$FOUND_FREETYPE" = xyes; then
59310    # Include file found, let's continue the sanity check.
59311    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59312$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59313
59314    # Reset to default value
59315    FREETYPE_BASE_NAME=freetype
59316    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59317    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59318      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59319          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59320        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59321        # for the .6 version explicitly.
59322        FREETYPE_BASE_NAME=freetype.6
59323        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59324        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59325$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59326      else
59327        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59328$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59329        FOUND_FREETYPE=no
59330      fi
59331    else
59332      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59333        # On Windows, we will need both .lib and .dll file.
59334        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59335          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59336$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59337          FOUND_FREETYPE=no
59338        fi
59339      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59340          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59341        # Found lib in isa dir, use that instead.
59342        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59343        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59344$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59345      fi
59346    fi
59347  fi
59348
59349  if test "x$FOUND_FREETYPE" = xyes; then
59350
59351  # Only process if variable expands to non-empty
59352
59353  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59355
59356  # Input might be given as Windows format, start by converting to
59357  # unix format.
59358  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59359  new_path=`$CYGPATH -u "$path"`
59360
59361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59364  # "foo.exe" is OK but "foo" is an error.
59365  #
59366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59367  # It is also a way to make sure we got the proper file name for the real test later on.
59368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59369  if test "x$test_shortpath" = x; then
59370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59372    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59373  fi
59374
59375  # Call helper function which possibly converts this using DOS-style short mode.
59376  # If so, the updated path is stored in $new_path.
59377
59378  input_path="$new_path"
59379  # Check if we need to convert this using DOS-style short mode. If the path
59380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59381  # take no chances and rewrite it.
59382  # Note: m4 eats our [], so we need to use [ and ] instead.
59383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59384  if test "x$has_forbidden_chars" != x; then
59385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59389      # Going to short mode and back again did indeed matter. Since short mode is
59390      # case insensitive, let's make it lowercase to improve readability.
59391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59392      # Now convert it back to Unix-style (cygpath)
59393      input_path=`$CYGPATH -u "$shortmode_path"`
59394      new_path="$input_path"
59395    fi
59396  fi
59397
59398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59399  if test "x$test_cygdrive_prefix" = x; then
59400    # As a simple fix, exclude /usr/bin since it's not a real path.
59401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59403      # a path prefixed by /cygdrive for fixpath to work.
59404      new_path="$CYGWIN_ROOT_PATH$input_path"
59405    fi
59406  fi
59407
59408
59409  if test "x$path" != "x$new_path"; then
59410    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59413  fi
59414
59415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59416
59417  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59418  has_colon=`$ECHO $path | $GREP ^.:`
59419  new_path="$path"
59420  if test "x$has_colon" = x; then
59421    # Not in mixed or Windows style, start by that.
59422    new_path=`cmd //c echo $path`
59423  fi
59424
59425
59426  input_path="$new_path"
59427  # Check if we need to convert this using DOS-style short mode. If the path
59428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59429  # take no chances and rewrite it.
59430  # Note: m4 eats our [], so we need to use [ and ] instead.
59431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59432  if test "x$has_forbidden_chars" != x; then
59433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59435  fi
59436
59437
59438  windows_path="$new_path"
59439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59440    unix_path=`$CYGPATH -u "$windows_path"`
59441    new_path="$unix_path"
59442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59444    new_path="$unix_path"
59445  fi
59446
59447  if test "x$path" != "x$new_path"; then
59448    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59450$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59451  fi
59452
59453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59455
59456    else
59457      # We're on a unix platform. Hooray! :)
59458      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59459      has_space=`$ECHO "$path" | $GREP " "`
59460      if test "x$has_space" != x; then
59461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59464      fi
59465
59466      # Use eval to expand a potential ~
59467      eval path="$path"
59468      if test ! -f "$path" && test ! -d "$path"; then
59469        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59470      fi
59471
59472      if test -d "$path"; then
59473        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59474      else
59475        dir="`$DIRNAME "$path"`"
59476        base="`$BASENAME "$path"`"
59477        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59478      fi
59479    fi
59480  fi
59481
59482
59483  # Only process if variable expands to non-empty
59484
59485  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59487
59488  # Input might be given as Windows format, start by converting to
59489  # unix format.
59490  path="$POTENTIAL_FREETYPE_LIB_PATH"
59491  new_path=`$CYGPATH -u "$path"`
59492
59493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59496  # "foo.exe" is OK but "foo" is an error.
59497  #
59498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59499  # It is also a way to make sure we got the proper file name for the real test later on.
59500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59501  if test "x$test_shortpath" = x; then
59502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59504    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59505  fi
59506
59507  # Call helper function which possibly converts this using DOS-style short mode.
59508  # If so, the updated path is stored in $new_path.
59509
59510  input_path="$new_path"
59511  # Check if we need to convert this using DOS-style short mode. If the path
59512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59513  # take no chances and rewrite it.
59514  # Note: m4 eats our [], so we need to use [ and ] instead.
59515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59516  if test "x$has_forbidden_chars" != x; then
59517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59521      # Going to short mode and back again did indeed matter. Since short mode is
59522      # case insensitive, let's make it lowercase to improve readability.
59523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59524      # Now convert it back to Unix-style (cygpath)
59525      input_path=`$CYGPATH -u "$shortmode_path"`
59526      new_path="$input_path"
59527    fi
59528  fi
59529
59530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59531  if test "x$test_cygdrive_prefix" = x; then
59532    # As a simple fix, exclude /usr/bin since it's not a real path.
59533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59535      # a path prefixed by /cygdrive for fixpath to work.
59536      new_path="$CYGWIN_ROOT_PATH$input_path"
59537    fi
59538  fi
59539
59540
59541  if test "x$path" != "x$new_path"; then
59542    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59545  fi
59546
59547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59548
59549  path="$POTENTIAL_FREETYPE_LIB_PATH"
59550  has_colon=`$ECHO $path | $GREP ^.:`
59551  new_path="$path"
59552  if test "x$has_colon" = x; then
59553    # Not in mixed or Windows style, start by that.
59554    new_path=`cmd //c echo $path`
59555  fi
59556
59557
59558  input_path="$new_path"
59559  # Check if we need to convert this using DOS-style short mode. If the path
59560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59561  # take no chances and rewrite it.
59562  # Note: m4 eats our [], so we need to use [ and ] instead.
59563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59564  if test "x$has_forbidden_chars" != x; then
59565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59567  fi
59568
59569
59570  windows_path="$new_path"
59571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59572    unix_path=`$CYGPATH -u "$windows_path"`
59573    new_path="$unix_path"
59574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59576    new_path="$unix_path"
59577  fi
59578
59579  if test "x$path" != "x$new_path"; then
59580    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59583  fi
59584
59585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59587
59588    else
59589      # We're on a unix platform. Hooray! :)
59590      path="$POTENTIAL_FREETYPE_LIB_PATH"
59591      has_space=`$ECHO "$path" | $GREP " "`
59592      if test "x$has_space" != x; then
59593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59594$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59595        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59596      fi
59597
59598      # Use eval to expand a potential ~
59599      eval path="$path"
59600      if test ! -f "$path" && test ! -d "$path"; then
59601        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59602      fi
59603
59604      if test -d "$path"; then
59605        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59606      else
59607        dir="`$DIRNAME "$path"`"
59608        base="`$BASENAME "$path"`"
59609        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59610      fi
59611    fi
59612  fi
59613
59614
59615    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59617$as_echo_n "checking for freetype includes... " >&6; }
59618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59619$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59620    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59622$as_echo_n "checking for freetype libraries... " >&6; }
59623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59624$as_echo "$FREETYPE_LIB_PATH" >&6; }
59625  fi
59626
59627            fi
59628            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59629                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59630              # Source is available, as a last resort try to build freetype in default location
59631
59632  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59633  BUILD_FREETYPE=yes
59634
59635  # Check if the freetype sources are acessible..
59636  if ! test -d $FREETYPE_SRC_PATH; then
59637    { $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
59638$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59639    BUILD_FREETYPE=no
59640  fi
59641  # ..and contain a vc2010 project file
59642  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59643  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59644    { $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
59645$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59646    BUILD_FREETYPE=no
59647  fi
59648  # Now check if configure found a version of 'msbuild.exe'
59649  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59650    { $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
59651$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;}
59652    BUILD_FREETYPE=no
59653  fi
59654
59655  # Ready to go..
59656  if test "x$BUILD_FREETYPE" = xyes; then
59657    # msbuild requires trailing slashes for output directories
59658    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59659    freetype_lib_path_unix="$freetype_lib_path"
59660    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59661
59662  unix_path="$vcxproj_path"
59663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59664    windows_path=`$CYGPATH -m "$unix_path"`
59665    vcxproj_path="$windows_path"
59666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59667    windows_path=`cmd //c echo $unix_path`
59668    vcxproj_path="$windows_path"
59669  fi
59670
59671
59672  unix_path="$freetype_lib_path"
59673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59674    windows_path=`$CYGPATH -m "$unix_path"`
59675    freetype_lib_path="$windows_path"
59676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59677    windows_path=`cmd //c echo $unix_path`
59678    freetype_lib_path="$windows_path"
59679  fi
59680
59681
59682  unix_path="$freetype_obj_path"
59683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59684    windows_path=`$CYGPATH -m "$unix_path"`
59685    freetype_obj_path="$windows_path"
59686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59687    windows_path=`cmd //c echo $unix_path`
59688    freetype_obj_path="$windows_path"
59689  fi
59690
59691    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59692      freetype_platform=x64
59693    else
59694      freetype_platform=win32
59695    fi
59696
59697    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59698    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59699    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59700    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59701    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59702$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59703
59704    # First we try to build the freetype.dll
59705    $ECHO -e "@echo off\n"\
59706        "$MSBUILD $vcxproj_path "\
59707        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59708        "/p:Configuration=\"Release Multithreaded\" "\
59709        "/p:Platform=$freetype_platform "\
59710        "/p:ConfigurationType=DynamicLibrary "\
59711        "/p:TargetName=freetype "\
59712        "/p:OutDir=\"$freetype_lib_path\" "\
59713        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59714    cmd /c freetype.bat
59715
59716    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59717      # If that succeeds we also build freetype.lib
59718      $ECHO -e "@echo off\n"\
59719          "$MSBUILD $vcxproj_path "\
59720          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59721          "/p:Configuration=\"Release Multithreaded\" "\
59722          "/p:Platform=$freetype_platform "\
59723          "/p:ConfigurationType=StaticLibrary "\
59724          "/p:TargetName=freetype "\
59725          "/p:OutDir=\"$freetype_lib_path\" "\
59726          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59727      cmd /c freetype.bat
59728
59729      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59730        # Once we build both, lib and dll, set freetype lib and include path appropriately
59731        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59732        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59733        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59734$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59735      else
59736        BUILD_FREETYPE=no
59737      fi
59738    else
59739      BUILD_FREETYPE=no
59740    fi
59741  fi
59742
59743              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59744
59745  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59746  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59747  METHOD="well-known location"
59748
59749  # Let's start with an optimistic view of the world :-)
59750  FOUND_FREETYPE=yes
59751
59752  # First look for the canonical freetype main include file ft2build.h.
59753  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59754    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59755    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59756    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59757      # Fail.
59758      FOUND_FREETYPE=no
59759    fi
59760  fi
59761
59762  if test "x$FOUND_FREETYPE" = xyes; then
59763    # Include file found, let's continue the sanity check.
59764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59765$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59766
59767    # Reset to default value
59768    FREETYPE_BASE_NAME=freetype
59769    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59770    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59771      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59772          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59773        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59774        # for the .6 version explicitly.
59775        FREETYPE_BASE_NAME=freetype.6
59776        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59777        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59778$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59779      else
59780        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59782        FOUND_FREETYPE=no
59783      fi
59784    else
59785      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59786        # On Windows, we will need both .lib and .dll file.
59787        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59788          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59789$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59790          FOUND_FREETYPE=no
59791        fi
59792      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59794        # Found lib in isa dir, use that instead.
59795        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59796        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59797$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59798      fi
59799    fi
59800  fi
59801
59802  if test "x$FOUND_FREETYPE" = xyes; then
59803
59804  # Only process if variable expands to non-empty
59805
59806  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59808
59809  # Input might be given as Windows format, start by converting to
59810  # unix format.
59811  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59812  new_path=`$CYGPATH -u "$path"`
59813
59814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59817  # "foo.exe" is OK but "foo" is an error.
59818  #
59819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59820  # It is also a way to make sure we got the proper file name for the real test later on.
59821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59822  if test "x$test_shortpath" = x; then
59823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59825    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59826  fi
59827
59828  # Call helper function which possibly converts this using DOS-style short mode.
59829  # If so, the updated path is stored in $new_path.
59830
59831  input_path="$new_path"
59832  # Check if we need to convert this using DOS-style short mode. If the path
59833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59834  # take no chances and rewrite it.
59835  # Note: m4 eats our [], so we need to use [ and ] instead.
59836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59837  if test "x$has_forbidden_chars" != x; then
59838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59842      # Going to short mode and back again did indeed matter. Since short mode is
59843      # case insensitive, let's make it lowercase to improve readability.
59844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59845      # Now convert it back to Unix-style (cygpath)
59846      input_path=`$CYGPATH -u "$shortmode_path"`
59847      new_path="$input_path"
59848    fi
59849  fi
59850
59851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59852  if test "x$test_cygdrive_prefix" = x; then
59853    # As a simple fix, exclude /usr/bin since it's not a real path.
59854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59856      # a path prefixed by /cygdrive for fixpath to work.
59857      new_path="$CYGWIN_ROOT_PATH$input_path"
59858    fi
59859  fi
59860
59861
59862  if test "x$path" != "x$new_path"; then
59863    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59865$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59866  fi
59867
59868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59869
59870  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59871  has_colon=`$ECHO $path | $GREP ^.:`
59872  new_path="$path"
59873  if test "x$has_colon" = x; then
59874    # Not in mixed or Windows style, start by that.
59875    new_path=`cmd //c echo $path`
59876  fi
59877
59878
59879  input_path="$new_path"
59880  # Check if we need to convert this using DOS-style short mode. If the path
59881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59882  # take no chances and rewrite it.
59883  # Note: m4 eats our [], so we need to use [ and ] instead.
59884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59885  if test "x$has_forbidden_chars" != x; then
59886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59888  fi
59889
59890
59891  windows_path="$new_path"
59892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59893    unix_path=`$CYGPATH -u "$windows_path"`
59894    new_path="$unix_path"
59895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59897    new_path="$unix_path"
59898  fi
59899
59900  if test "x$path" != "x$new_path"; then
59901    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59904  fi
59905
59906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59908
59909    else
59910      # We're on a unix platform. Hooray! :)
59911      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59912      has_space=`$ECHO "$path" | $GREP " "`
59913      if test "x$has_space" != x; then
59914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59915$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59917      fi
59918
59919      # Use eval to expand a potential ~
59920      eval path="$path"
59921      if test ! -f "$path" && test ! -d "$path"; then
59922        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59923      fi
59924
59925      if test -d "$path"; then
59926        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59927      else
59928        dir="`$DIRNAME "$path"`"
59929        base="`$BASENAME "$path"`"
59930        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59931      fi
59932    fi
59933  fi
59934
59935
59936  # Only process if variable expands to non-empty
59937
59938  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59940
59941  # Input might be given as Windows format, start by converting to
59942  # unix format.
59943  path="$POTENTIAL_FREETYPE_LIB_PATH"
59944  new_path=`$CYGPATH -u "$path"`
59945
59946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59949  # "foo.exe" is OK but "foo" is an error.
59950  #
59951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59952  # It is also a way to make sure we got the proper file name for the real test later on.
59953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59954  if test "x$test_shortpath" = x; then
59955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59957    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59958  fi
59959
59960  # Call helper function which possibly converts this using DOS-style short mode.
59961  # If so, the updated path is stored in $new_path.
59962
59963  input_path="$new_path"
59964  # Check if we need to convert this using DOS-style short mode. If the path
59965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59966  # take no chances and rewrite it.
59967  # Note: m4 eats our [], so we need to use [ and ] instead.
59968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59969  if test "x$has_forbidden_chars" != x; then
59970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59974      # Going to short mode and back again did indeed matter. Since short mode is
59975      # case insensitive, let's make it lowercase to improve readability.
59976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59977      # Now convert it back to Unix-style (cygpath)
59978      input_path=`$CYGPATH -u "$shortmode_path"`
59979      new_path="$input_path"
59980    fi
59981  fi
59982
59983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59984  if test "x$test_cygdrive_prefix" = x; then
59985    # As a simple fix, exclude /usr/bin since it's not a real path.
59986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59988      # a path prefixed by /cygdrive for fixpath to work.
59989      new_path="$CYGWIN_ROOT_PATH$input_path"
59990    fi
59991  fi
59992
59993
59994  if test "x$path" != "x$new_path"; then
59995    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59998  fi
59999
60000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60001
60002  path="$POTENTIAL_FREETYPE_LIB_PATH"
60003  has_colon=`$ECHO $path | $GREP ^.:`
60004  new_path="$path"
60005  if test "x$has_colon" = x; then
60006    # Not in mixed or Windows style, start by that.
60007    new_path=`cmd //c echo $path`
60008  fi
60009
60010
60011  input_path="$new_path"
60012  # Check if we need to convert this using DOS-style short mode. If the path
60013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60014  # take no chances and rewrite it.
60015  # Note: m4 eats our [], so we need to use [ and ] instead.
60016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60017  if test "x$has_forbidden_chars" != x; then
60018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60020  fi
60021
60022
60023  windows_path="$new_path"
60024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60025    unix_path=`$CYGPATH -u "$windows_path"`
60026    new_path="$unix_path"
60027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60029    new_path="$unix_path"
60030  fi
60031
60032  if test "x$path" != "x$new_path"; then
60033    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60035$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60036  fi
60037
60038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60040
60041    else
60042      # We're on a unix platform. Hooray! :)
60043      path="$POTENTIAL_FREETYPE_LIB_PATH"
60044      has_space=`$ECHO "$path" | $GREP " "`
60045      if test "x$has_space" != x; then
60046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60049      fi
60050
60051      # Use eval to expand a potential ~
60052      eval path="$path"
60053      if test ! -f "$path" && test ! -d "$path"; then
60054        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60055      fi
60056
60057      if test -d "$path"; then
60058        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60059      else
60060        dir="`$DIRNAME "$path"`"
60061        base="`$BASENAME "$path"`"
60062        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60063      fi
60064    fi
60065  fi
60066
60067
60068    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60070$as_echo_n "checking for freetype includes... " >&6; }
60071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60072$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60073    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60075$as_echo_n "checking for freetype libraries... " >&6; }
60076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60077$as_echo "$FREETYPE_LIB_PATH" >&6; }
60078  fi
60079
60080              else
60081
60082  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60083  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60084  METHOD="well-known location"
60085
60086  # Let's start with an optimistic view of the world :-)
60087  FOUND_FREETYPE=yes
60088
60089  # First look for the canonical freetype main include file ft2build.h.
60090  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60091    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60092    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60093    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60094      # Fail.
60095      FOUND_FREETYPE=no
60096    fi
60097  fi
60098
60099  if test "x$FOUND_FREETYPE" = xyes; then
60100    # Include file found, let's continue the sanity check.
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60102$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60103
60104    # Reset to default value
60105    FREETYPE_BASE_NAME=freetype
60106    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60107    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60108      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60109          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60110        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60111        # for the .6 version explicitly.
60112        FREETYPE_BASE_NAME=freetype.6
60113        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60114        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60115$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60116      else
60117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60118$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60119        FOUND_FREETYPE=no
60120      fi
60121    else
60122      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60123        # On Windows, we will need both .lib and .dll file.
60124        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60125          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60126$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60127          FOUND_FREETYPE=no
60128        fi
60129      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60130          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60131        # Found lib in isa dir, use that instead.
60132        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60133        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60134$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60135      fi
60136    fi
60137  fi
60138
60139  if test "x$FOUND_FREETYPE" = xyes; then
60140
60141  # Only process if variable expands to non-empty
60142
60143  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60145
60146  # Input might be given as Windows format, start by converting to
60147  # unix format.
60148  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60149  new_path=`$CYGPATH -u "$path"`
60150
60151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60154  # "foo.exe" is OK but "foo" is an error.
60155  #
60156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60157  # It is also a way to make sure we got the proper file name for the real test later on.
60158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60159  if test "x$test_shortpath" = x; then
60160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60162    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60163  fi
60164
60165  # Call helper function which possibly converts this using DOS-style short mode.
60166  # If so, the updated path is stored in $new_path.
60167
60168  input_path="$new_path"
60169  # Check if we need to convert this using DOS-style short mode. If the path
60170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60171  # take no chances and rewrite it.
60172  # Note: m4 eats our [], so we need to use [ and ] instead.
60173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60174  if test "x$has_forbidden_chars" != x; then
60175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60179      # Going to short mode and back again did indeed matter. Since short mode is
60180      # case insensitive, let's make it lowercase to improve readability.
60181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60182      # Now convert it back to Unix-style (cygpath)
60183      input_path=`$CYGPATH -u "$shortmode_path"`
60184      new_path="$input_path"
60185    fi
60186  fi
60187
60188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60189  if test "x$test_cygdrive_prefix" = x; then
60190    # As a simple fix, exclude /usr/bin since it's not a real path.
60191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60193      # a path prefixed by /cygdrive for fixpath to work.
60194      new_path="$CYGWIN_ROOT_PATH$input_path"
60195    fi
60196  fi
60197
60198
60199  if test "x$path" != "x$new_path"; then
60200    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60202$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60203  fi
60204
60205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60206
60207  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60208  has_colon=`$ECHO $path | $GREP ^.:`
60209  new_path="$path"
60210  if test "x$has_colon" = x; then
60211    # Not in mixed or Windows style, start by that.
60212    new_path=`cmd //c echo $path`
60213  fi
60214
60215
60216  input_path="$new_path"
60217  # Check if we need to convert this using DOS-style short mode. If the path
60218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60219  # take no chances and rewrite it.
60220  # Note: m4 eats our [], so we need to use [ and ] instead.
60221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60222  if test "x$has_forbidden_chars" != x; then
60223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60225  fi
60226
60227
60228  windows_path="$new_path"
60229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60230    unix_path=`$CYGPATH -u "$windows_path"`
60231    new_path="$unix_path"
60232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60234    new_path="$unix_path"
60235  fi
60236
60237  if test "x$path" != "x$new_path"; then
60238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60241  fi
60242
60243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60245
60246    else
60247      # We're on a unix platform. Hooray! :)
60248      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60249      has_space=`$ECHO "$path" | $GREP " "`
60250      if test "x$has_space" != x; then
60251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60254      fi
60255
60256      # Use eval to expand a potential ~
60257      eval path="$path"
60258      if test ! -f "$path" && test ! -d "$path"; then
60259        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60260      fi
60261
60262      if test -d "$path"; then
60263        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60264      else
60265        dir="`$DIRNAME "$path"`"
60266        base="`$BASENAME "$path"`"
60267        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60268      fi
60269    fi
60270  fi
60271
60272
60273  # Only process if variable expands to non-empty
60274
60275  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60277
60278  # Input might be given as Windows format, start by converting to
60279  # unix format.
60280  path="$POTENTIAL_FREETYPE_LIB_PATH"
60281  new_path=`$CYGPATH -u "$path"`
60282
60283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60286  # "foo.exe" is OK but "foo" is an error.
60287  #
60288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60289  # It is also a way to make sure we got the proper file name for the real test later on.
60290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60291  if test "x$test_shortpath" = x; then
60292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60294    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60295  fi
60296
60297  # Call helper function which possibly converts this using DOS-style short mode.
60298  # If so, the updated path is stored in $new_path.
60299
60300  input_path="$new_path"
60301  # Check if we need to convert this using DOS-style short mode. If the path
60302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60303  # take no chances and rewrite it.
60304  # Note: m4 eats our [], so we need to use [ and ] instead.
60305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60306  if test "x$has_forbidden_chars" != x; then
60307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60311      # Going to short mode and back again did indeed matter. Since short mode is
60312      # case insensitive, let's make it lowercase to improve readability.
60313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60314      # Now convert it back to Unix-style (cygpath)
60315      input_path=`$CYGPATH -u "$shortmode_path"`
60316      new_path="$input_path"
60317    fi
60318  fi
60319
60320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60321  if test "x$test_cygdrive_prefix" = x; then
60322    # As a simple fix, exclude /usr/bin since it's not a real path.
60323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60325      # a path prefixed by /cygdrive for fixpath to work.
60326      new_path="$CYGWIN_ROOT_PATH$input_path"
60327    fi
60328  fi
60329
60330
60331  if test "x$path" != "x$new_path"; then
60332    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60335  fi
60336
60337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60338
60339  path="$POTENTIAL_FREETYPE_LIB_PATH"
60340  has_colon=`$ECHO $path | $GREP ^.:`
60341  new_path="$path"
60342  if test "x$has_colon" = x; then
60343    # Not in mixed or Windows style, start by that.
60344    new_path=`cmd //c echo $path`
60345  fi
60346
60347
60348  input_path="$new_path"
60349  # Check if we need to convert this using DOS-style short mode. If the path
60350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60351  # take no chances and rewrite it.
60352  # Note: m4 eats our [], so we need to use [ and ] instead.
60353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60354  if test "x$has_forbidden_chars" != x; then
60355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60357  fi
60358
60359
60360  windows_path="$new_path"
60361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60362    unix_path=`$CYGPATH -u "$windows_path"`
60363    new_path="$unix_path"
60364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60366    new_path="$unix_path"
60367  fi
60368
60369  if test "x$path" != "x$new_path"; then
60370    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60373  fi
60374
60375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60377
60378    else
60379      # We're on a unix platform. Hooray! :)
60380      path="$POTENTIAL_FREETYPE_LIB_PATH"
60381      has_space=`$ECHO "$path" | $GREP " "`
60382      if test "x$has_space" != x; then
60383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60386      fi
60387
60388      # Use eval to expand a potential ~
60389      eval path="$path"
60390      if test ! -f "$path" && test ! -d "$path"; then
60391        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60392      fi
60393
60394      if test -d "$path"; then
60395        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60396      else
60397        dir="`$DIRNAME "$path"`"
60398        base="`$BASENAME "$path"`"
60399        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60400      fi
60401    fi
60402  fi
60403
60404
60405    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60407$as_echo_n "checking for freetype includes... " >&6; }
60408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60409$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60410    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60412$as_echo_n "checking for freetype libraries... " >&6; }
60413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60414$as_echo "$FREETYPE_LIB_PATH" >&6; }
60415  fi
60416
60417              fi
60418            fi
60419          fi
60420        else
60421          FREETYPE_BASE_DIR="$SYSROOT/usr"
60422
60423  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60424  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60425  METHOD="well-known location"
60426
60427  # Let's start with an optimistic view of the world :-)
60428  FOUND_FREETYPE=yes
60429
60430  # First look for the canonical freetype main include file ft2build.h.
60431  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60432    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60433    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60434    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60435      # Fail.
60436      FOUND_FREETYPE=no
60437    fi
60438  fi
60439
60440  if test "x$FOUND_FREETYPE" = xyes; then
60441    # Include file found, let's continue the sanity check.
60442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60443$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60444
60445    # Reset to default value
60446    FREETYPE_BASE_NAME=freetype
60447    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60448    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60449      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60450          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60451        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60452        # for the .6 version explicitly.
60453        FREETYPE_BASE_NAME=freetype.6
60454        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60455        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60456$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60457      else
60458        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60459$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60460        FOUND_FREETYPE=no
60461      fi
60462    else
60463      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60464        # On Windows, we will need both .lib and .dll file.
60465        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60466          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60468          FOUND_FREETYPE=no
60469        fi
60470      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60471          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60472        # Found lib in isa dir, use that instead.
60473        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60474        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60475$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60476      fi
60477    fi
60478  fi
60479
60480  if test "x$FOUND_FREETYPE" = xyes; then
60481
60482  # Only process if variable expands to non-empty
60483
60484  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60486
60487  # Input might be given as Windows format, start by converting to
60488  # unix format.
60489  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60490  new_path=`$CYGPATH -u "$path"`
60491
60492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60495  # "foo.exe" is OK but "foo" is an error.
60496  #
60497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60498  # It is also a way to make sure we got the proper file name for the real test later on.
60499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60500  if test "x$test_shortpath" = x; then
60501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60503    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60504  fi
60505
60506  # Call helper function which possibly converts this using DOS-style short mode.
60507  # If so, the updated path is stored in $new_path.
60508
60509  input_path="$new_path"
60510  # Check if we need to convert this using DOS-style short mode. If the path
60511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60512  # take no chances and rewrite it.
60513  # Note: m4 eats our [], so we need to use [ and ] instead.
60514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60515  if test "x$has_forbidden_chars" != x; then
60516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60520      # Going to short mode and back again did indeed matter. Since short mode is
60521      # case insensitive, let's make it lowercase to improve readability.
60522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60523      # Now convert it back to Unix-style (cygpath)
60524      input_path=`$CYGPATH -u "$shortmode_path"`
60525      new_path="$input_path"
60526    fi
60527  fi
60528
60529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60530  if test "x$test_cygdrive_prefix" = x; then
60531    # As a simple fix, exclude /usr/bin since it's not a real path.
60532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60534      # a path prefixed by /cygdrive for fixpath to work.
60535      new_path="$CYGWIN_ROOT_PATH$input_path"
60536    fi
60537  fi
60538
60539
60540  if test "x$path" != "x$new_path"; then
60541    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60544  fi
60545
60546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60547
60548  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60549  has_colon=`$ECHO $path | $GREP ^.:`
60550  new_path="$path"
60551  if test "x$has_colon" = x; then
60552    # Not in mixed or Windows style, start by that.
60553    new_path=`cmd //c echo $path`
60554  fi
60555
60556
60557  input_path="$new_path"
60558  # Check if we need to convert this using DOS-style short mode. If the path
60559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60560  # take no chances and rewrite it.
60561  # Note: m4 eats our [], so we need to use [ and ] instead.
60562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60563  if test "x$has_forbidden_chars" != x; then
60564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60566  fi
60567
60568
60569  windows_path="$new_path"
60570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60571    unix_path=`$CYGPATH -u "$windows_path"`
60572    new_path="$unix_path"
60573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60575    new_path="$unix_path"
60576  fi
60577
60578  if test "x$path" != "x$new_path"; then
60579    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60582  fi
60583
60584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60586
60587    else
60588      # We're on a unix platform. Hooray! :)
60589      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60590      has_space=`$ECHO "$path" | $GREP " "`
60591      if test "x$has_space" != x; then
60592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60595      fi
60596
60597      # Use eval to expand a potential ~
60598      eval path="$path"
60599      if test ! -f "$path" && test ! -d "$path"; then
60600        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60601      fi
60602
60603      if test -d "$path"; then
60604        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60605      else
60606        dir="`$DIRNAME "$path"`"
60607        base="`$BASENAME "$path"`"
60608        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60609      fi
60610    fi
60611  fi
60612
60613
60614  # Only process if variable expands to non-empty
60615
60616  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60618
60619  # Input might be given as Windows format, start by converting to
60620  # unix format.
60621  path="$POTENTIAL_FREETYPE_LIB_PATH"
60622  new_path=`$CYGPATH -u "$path"`
60623
60624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60627  # "foo.exe" is OK but "foo" is an error.
60628  #
60629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60630  # It is also a way to make sure we got the proper file name for the real test later on.
60631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60632  if test "x$test_shortpath" = x; then
60633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60635    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60636  fi
60637
60638  # Call helper function which possibly converts this using DOS-style short mode.
60639  # If so, the updated path is stored in $new_path.
60640
60641  input_path="$new_path"
60642  # Check if we need to convert this using DOS-style short mode. If the path
60643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60644  # take no chances and rewrite it.
60645  # Note: m4 eats our [], so we need to use [ and ] instead.
60646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60647  if test "x$has_forbidden_chars" != x; then
60648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60652      # Going to short mode and back again did indeed matter. Since short mode is
60653      # case insensitive, let's make it lowercase to improve readability.
60654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60655      # Now convert it back to Unix-style (cygpath)
60656      input_path=`$CYGPATH -u "$shortmode_path"`
60657      new_path="$input_path"
60658    fi
60659  fi
60660
60661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60662  if test "x$test_cygdrive_prefix" = x; then
60663    # As a simple fix, exclude /usr/bin since it's not a real path.
60664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60666      # a path prefixed by /cygdrive for fixpath to work.
60667      new_path="$CYGWIN_ROOT_PATH$input_path"
60668    fi
60669  fi
60670
60671
60672  if test "x$path" != "x$new_path"; then
60673    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60676  fi
60677
60678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60679
60680  path="$POTENTIAL_FREETYPE_LIB_PATH"
60681  has_colon=`$ECHO $path | $GREP ^.:`
60682  new_path="$path"
60683  if test "x$has_colon" = x; then
60684    # Not in mixed or Windows style, start by that.
60685    new_path=`cmd //c echo $path`
60686  fi
60687
60688
60689  input_path="$new_path"
60690  # Check if we need to convert this using DOS-style short mode. If the path
60691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60692  # take no chances and rewrite it.
60693  # Note: m4 eats our [], so we need to use [ and ] instead.
60694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60695  if test "x$has_forbidden_chars" != x; then
60696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60698  fi
60699
60700
60701  windows_path="$new_path"
60702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60703    unix_path=`$CYGPATH -u "$windows_path"`
60704    new_path="$unix_path"
60705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60707    new_path="$unix_path"
60708  fi
60709
60710  if test "x$path" != "x$new_path"; then
60711    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60713$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60714  fi
60715
60716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60718
60719    else
60720      # We're on a unix platform. Hooray! :)
60721      path="$POTENTIAL_FREETYPE_LIB_PATH"
60722      has_space=`$ECHO "$path" | $GREP " "`
60723      if test "x$has_space" != x; then
60724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60727      fi
60728
60729      # Use eval to expand a potential ~
60730      eval path="$path"
60731      if test ! -f "$path" && test ! -d "$path"; then
60732        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60733      fi
60734
60735      if test -d "$path"; then
60736        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60737      else
60738        dir="`$DIRNAME "$path"`"
60739        base="`$BASENAME "$path"`"
60740        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60741      fi
60742    fi
60743  fi
60744
60745
60746    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60748$as_echo_n "checking for freetype includes... " >&6; }
60749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60750$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60751    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60753$as_echo_n "checking for freetype libraries... " >&6; }
60754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60755$as_echo "$FREETYPE_LIB_PATH" >&6; }
60756  fi
60757
60758
60759          if test "x$FOUND_FREETYPE" != xyes; then
60760            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60761
60762  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60763  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60764  METHOD="well-known location"
60765
60766  # Let's start with an optimistic view of the world :-)
60767  FOUND_FREETYPE=yes
60768
60769  # First look for the canonical freetype main include file ft2build.h.
60770  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60771    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60772    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60773    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60774      # Fail.
60775      FOUND_FREETYPE=no
60776    fi
60777  fi
60778
60779  if test "x$FOUND_FREETYPE" = xyes; then
60780    # Include file found, let's continue the sanity check.
60781    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60782$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60783
60784    # Reset to default value
60785    FREETYPE_BASE_NAME=freetype
60786    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60787    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60788      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60789          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60790        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60791        # for the .6 version explicitly.
60792        FREETYPE_BASE_NAME=freetype.6
60793        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60794        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60795$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60796      else
60797        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60798$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60799        FOUND_FREETYPE=no
60800      fi
60801    else
60802      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60803        # On Windows, we will need both .lib and .dll file.
60804        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60805          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60806$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60807          FOUND_FREETYPE=no
60808        fi
60809      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60810          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60811        # Found lib in isa dir, use that instead.
60812        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60813        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60814$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60815      fi
60816    fi
60817  fi
60818
60819  if test "x$FOUND_FREETYPE" = xyes; then
60820
60821  # Only process if variable expands to non-empty
60822
60823  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60825
60826  # Input might be given as Windows format, start by converting to
60827  # unix format.
60828  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60829  new_path=`$CYGPATH -u "$path"`
60830
60831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60834  # "foo.exe" is OK but "foo" is an error.
60835  #
60836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60837  # It is also a way to make sure we got the proper file name for the real test later on.
60838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60839  if test "x$test_shortpath" = x; then
60840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60842    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60843  fi
60844
60845  # Call helper function which possibly converts this using DOS-style short mode.
60846  # If so, the updated path is stored in $new_path.
60847
60848  input_path="$new_path"
60849  # Check if we need to convert this using DOS-style short mode. If the path
60850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60851  # take no chances and rewrite it.
60852  # Note: m4 eats our [], so we need to use [ and ] instead.
60853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60854  if test "x$has_forbidden_chars" != x; then
60855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60859      # Going to short mode and back again did indeed matter. Since short mode is
60860      # case insensitive, let's make it lowercase to improve readability.
60861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60862      # Now convert it back to Unix-style (cygpath)
60863      input_path=`$CYGPATH -u "$shortmode_path"`
60864      new_path="$input_path"
60865    fi
60866  fi
60867
60868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60869  if test "x$test_cygdrive_prefix" = x; then
60870    # As a simple fix, exclude /usr/bin since it's not a real path.
60871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60873      # a path prefixed by /cygdrive for fixpath to work.
60874      new_path="$CYGWIN_ROOT_PATH$input_path"
60875    fi
60876  fi
60877
60878
60879  if test "x$path" != "x$new_path"; then
60880    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60883  fi
60884
60885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60886
60887  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60888  has_colon=`$ECHO $path | $GREP ^.:`
60889  new_path="$path"
60890  if test "x$has_colon" = x; then
60891    # Not in mixed or Windows style, start by that.
60892    new_path=`cmd //c echo $path`
60893  fi
60894
60895
60896  input_path="$new_path"
60897  # Check if we need to convert this using DOS-style short mode. If the path
60898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60899  # take no chances and rewrite it.
60900  # Note: m4 eats our [], so we need to use [ and ] instead.
60901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60902  if test "x$has_forbidden_chars" != x; then
60903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60905  fi
60906
60907
60908  windows_path="$new_path"
60909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60910    unix_path=`$CYGPATH -u "$windows_path"`
60911    new_path="$unix_path"
60912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60914    new_path="$unix_path"
60915  fi
60916
60917  if test "x$path" != "x$new_path"; then
60918    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60921  fi
60922
60923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60925
60926    else
60927      # We're on a unix platform. Hooray! :)
60928      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60929      has_space=`$ECHO "$path" | $GREP " "`
60930      if test "x$has_space" != x; then
60931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60932$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60934      fi
60935
60936      # Use eval to expand a potential ~
60937      eval path="$path"
60938      if test ! -f "$path" && test ! -d "$path"; then
60939        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60940      fi
60941
60942      if test -d "$path"; then
60943        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60944      else
60945        dir="`$DIRNAME "$path"`"
60946        base="`$BASENAME "$path"`"
60947        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60948      fi
60949    fi
60950  fi
60951
60952
60953  # Only process if variable expands to non-empty
60954
60955  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60957
60958  # Input might be given as Windows format, start by converting to
60959  # unix format.
60960  path="$POTENTIAL_FREETYPE_LIB_PATH"
60961  new_path=`$CYGPATH -u "$path"`
60962
60963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60966  # "foo.exe" is OK but "foo" is an error.
60967  #
60968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60969  # It is also a way to make sure we got the proper file name for the real test later on.
60970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60971  if test "x$test_shortpath" = x; then
60972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60974    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60975  fi
60976
60977  # Call helper function which possibly converts this using DOS-style short mode.
60978  # If so, the updated path is stored in $new_path.
60979
60980  input_path="$new_path"
60981  # Check if we need to convert this using DOS-style short mode. If the path
60982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60983  # take no chances and rewrite it.
60984  # Note: m4 eats our [], so we need to use [ and ] instead.
60985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60986  if test "x$has_forbidden_chars" != x; then
60987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60991      # Going to short mode and back again did indeed matter. Since short mode is
60992      # case insensitive, let's make it lowercase to improve readability.
60993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60994      # Now convert it back to Unix-style (cygpath)
60995      input_path=`$CYGPATH -u "$shortmode_path"`
60996      new_path="$input_path"
60997    fi
60998  fi
60999
61000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61001  if test "x$test_cygdrive_prefix" = x; then
61002    # As a simple fix, exclude /usr/bin since it's not a real path.
61003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61005      # a path prefixed by /cygdrive for fixpath to work.
61006      new_path="$CYGWIN_ROOT_PATH$input_path"
61007    fi
61008  fi
61009
61010
61011  if test "x$path" != "x$new_path"; then
61012    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61015  fi
61016
61017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61018
61019  path="$POTENTIAL_FREETYPE_LIB_PATH"
61020  has_colon=`$ECHO $path | $GREP ^.:`
61021  new_path="$path"
61022  if test "x$has_colon" = x; then
61023    # Not in mixed or Windows style, start by that.
61024    new_path=`cmd //c echo $path`
61025  fi
61026
61027
61028  input_path="$new_path"
61029  # Check if we need to convert this using DOS-style short mode. If the path
61030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61031  # take no chances and rewrite it.
61032  # Note: m4 eats our [], so we need to use [ and ] instead.
61033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61034  if test "x$has_forbidden_chars" != x; then
61035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61037  fi
61038
61039
61040  windows_path="$new_path"
61041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61042    unix_path=`$CYGPATH -u "$windows_path"`
61043    new_path="$unix_path"
61044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61046    new_path="$unix_path"
61047  fi
61048
61049  if test "x$path" != "x$new_path"; then
61050    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61053  fi
61054
61055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61057
61058    else
61059      # We're on a unix platform. Hooray! :)
61060      path="$POTENTIAL_FREETYPE_LIB_PATH"
61061      has_space=`$ECHO "$path" | $GREP " "`
61062      if test "x$has_space" != x; then
61063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61066      fi
61067
61068      # Use eval to expand a potential ~
61069      eval path="$path"
61070      if test ! -f "$path" && test ! -d "$path"; then
61071        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61072      fi
61073
61074      if test -d "$path"; then
61075        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61076      else
61077        dir="`$DIRNAME "$path"`"
61078        base="`$BASENAME "$path"`"
61079        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61080      fi
61081    fi
61082  fi
61083
61084
61085    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61087$as_echo_n "checking for freetype includes... " >&6; }
61088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61089$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61090    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61092$as_echo_n "checking for freetype libraries... " >&6; }
61093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61094$as_echo "$FREETYPE_LIB_PATH" >&6; }
61095  fi
61096
61097          fi
61098          if test "x$FOUND_FREETYPE" != xyes; then
61099            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61100
61101  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61102  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61103  METHOD="well-known location"
61104
61105  # Let's start with an optimistic view of the world :-)
61106  FOUND_FREETYPE=yes
61107
61108  # First look for the canonical freetype main include file ft2build.h.
61109  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61110    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61111    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61112    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61113      # Fail.
61114      FOUND_FREETYPE=no
61115    fi
61116  fi
61117
61118  if test "x$FOUND_FREETYPE" = xyes; then
61119    # Include file found, let's continue the sanity check.
61120    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61121$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61122
61123    # Reset to default value
61124    FREETYPE_BASE_NAME=freetype
61125    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61126    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61127      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61128          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61129        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61130        # for the .6 version explicitly.
61131        FREETYPE_BASE_NAME=freetype.6
61132        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61133        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61134$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61135      else
61136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61137$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61138        FOUND_FREETYPE=no
61139      fi
61140    else
61141      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61142        # On Windows, we will need both .lib and .dll file.
61143        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61144          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61145$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61146          FOUND_FREETYPE=no
61147        fi
61148      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61149          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61150        # Found lib in isa dir, use that instead.
61151        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61152        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61153$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61154      fi
61155    fi
61156  fi
61157
61158  if test "x$FOUND_FREETYPE" = xyes; then
61159
61160  # Only process if variable expands to non-empty
61161
61162  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61164
61165  # Input might be given as Windows format, start by converting to
61166  # unix format.
61167  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61168  new_path=`$CYGPATH -u "$path"`
61169
61170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61173  # "foo.exe" is OK but "foo" is an error.
61174  #
61175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61176  # It is also a way to make sure we got the proper file name for the real test later on.
61177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61178  if test "x$test_shortpath" = x; then
61179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61180$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61181    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61182  fi
61183
61184  # Call helper function which possibly converts this using DOS-style short mode.
61185  # If so, the updated path is stored in $new_path.
61186
61187  input_path="$new_path"
61188  # Check if we need to convert this using DOS-style short mode. If the path
61189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61190  # take no chances and rewrite it.
61191  # Note: m4 eats our [], so we need to use [ and ] instead.
61192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61193  if test "x$has_forbidden_chars" != x; then
61194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61198      # Going to short mode and back again did indeed matter. Since short mode is
61199      # case insensitive, let's make it lowercase to improve readability.
61200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61201      # Now convert it back to Unix-style (cygpath)
61202      input_path=`$CYGPATH -u "$shortmode_path"`
61203      new_path="$input_path"
61204    fi
61205  fi
61206
61207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61208  if test "x$test_cygdrive_prefix" = x; then
61209    # As a simple fix, exclude /usr/bin since it's not a real path.
61210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61212      # a path prefixed by /cygdrive for fixpath to work.
61213      new_path="$CYGWIN_ROOT_PATH$input_path"
61214    fi
61215  fi
61216
61217
61218  if test "x$path" != "x$new_path"; then
61219    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61221$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61222  fi
61223
61224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61225
61226  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61227  has_colon=`$ECHO $path | $GREP ^.:`
61228  new_path="$path"
61229  if test "x$has_colon" = x; then
61230    # Not in mixed or Windows style, start by that.
61231    new_path=`cmd //c echo $path`
61232  fi
61233
61234
61235  input_path="$new_path"
61236  # Check if we need to convert this using DOS-style short mode. If the path
61237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61238  # take no chances and rewrite it.
61239  # Note: m4 eats our [], so we need to use [ and ] instead.
61240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61241  if test "x$has_forbidden_chars" != x; then
61242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61244  fi
61245
61246
61247  windows_path="$new_path"
61248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61249    unix_path=`$CYGPATH -u "$windows_path"`
61250    new_path="$unix_path"
61251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61253    new_path="$unix_path"
61254  fi
61255
61256  if test "x$path" != "x$new_path"; then
61257    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61259$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61260  fi
61261
61262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61264
61265    else
61266      # We're on a unix platform. Hooray! :)
61267      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61268      has_space=`$ECHO "$path" | $GREP " "`
61269      if test "x$has_space" != x; then
61270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61273      fi
61274
61275      # Use eval to expand a potential ~
61276      eval path="$path"
61277      if test ! -f "$path" && test ! -d "$path"; then
61278        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61279      fi
61280
61281      if test -d "$path"; then
61282        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61283      else
61284        dir="`$DIRNAME "$path"`"
61285        base="`$BASENAME "$path"`"
61286        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61287      fi
61288    fi
61289  fi
61290
61291
61292  # Only process if variable expands to non-empty
61293
61294  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61296
61297  # Input might be given as Windows format, start by converting to
61298  # unix format.
61299  path="$POTENTIAL_FREETYPE_LIB_PATH"
61300  new_path=`$CYGPATH -u "$path"`
61301
61302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61305  # "foo.exe" is OK but "foo" is an error.
61306  #
61307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61308  # It is also a way to make sure we got the proper file name for the real test later on.
61309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61310  if test "x$test_shortpath" = x; then
61311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61313    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61314  fi
61315
61316  # Call helper function which possibly converts this using DOS-style short mode.
61317  # If so, the updated path is stored in $new_path.
61318
61319  input_path="$new_path"
61320  # Check if we need to convert this using DOS-style short mode. If the path
61321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61322  # take no chances and rewrite it.
61323  # Note: m4 eats our [], so we need to use [ and ] instead.
61324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61325  if test "x$has_forbidden_chars" != x; then
61326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61330      # Going to short mode and back again did indeed matter. Since short mode is
61331      # case insensitive, let's make it lowercase to improve readability.
61332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61333      # Now convert it back to Unix-style (cygpath)
61334      input_path=`$CYGPATH -u "$shortmode_path"`
61335      new_path="$input_path"
61336    fi
61337  fi
61338
61339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61340  if test "x$test_cygdrive_prefix" = x; then
61341    # As a simple fix, exclude /usr/bin since it's not a real path.
61342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61344      # a path prefixed by /cygdrive for fixpath to work.
61345      new_path="$CYGWIN_ROOT_PATH$input_path"
61346    fi
61347  fi
61348
61349
61350  if test "x$path" != "x$new_path"; then
61351    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61354  fi
61355
61356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61357
61358  path="$POTENTIAL_FREETYPE_LIB_PATH"
61359  has_colon=`$ECHO $path | $GREP ^.:`
61360  new_path="$path"
61361  if test "x$has_colon" = x; then
61362    # Not in mixed or Windows style, start by that.
61363    new_path=`cmd //c echo $path`
61364  fi
61365
61366
61367  input_path="$new_path"
61368  # Check if we need to convert this using DOS-style short mode. If the path
61369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61370  # take no chances and rewrite it.
61371  # Note: m4 eats our [], so we need to use [ and ] instead.
61372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61373  if test "x$has_forbidden_chars" != x; then
61374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61376  fi
61377
61378
61379  windows_path="$new_path"
61380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61381    unix_path=`$CYGPATH -u "$windows_path"`
61382    new_path="$unix_path"
61383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61385    new_path="$unix_path"
61386  fi
61387
61388  if test "x$path" != "x$new_path"; then
61389    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61392  fi
61393
61394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61396
61397    else
61398      # We're on a unix platform. Hooray! :)
61399      path="$POTENTIAL_FREETYPE_LIB_PATH"
61400      has_space=`$ECHO "$path" | $GREP " "`
61401      if test "x$has_space" != x; then
61402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61404        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61405      fi
61406
61407      # Use eval to expand a potential ~
61408      eval path="$path"
61409      if test ! -f "$path" && test ! -d "$path"; then
61410        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61411      fi
61412
61413      if test -d "$path"; then
61414        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61415      else
61416        dir="`$DIRNAME "$path"`"
61417        base="`$BASENAME "$path"`"
61418        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61419      fi
61420    fi
61421  fi
61422
61423
61424    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61426$as_echo_n "checking for freetype includes... " >&6; }
61427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61428$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61429    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61431$as_echo_n "checking for freetype libraries... " >&6; }
61432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61433$as_echo "$FREETYPE_LIB_PATH" >&6; }
61434  fi
61435
61436          fi
61437
61438          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61439            if test "x$FOUND_FREETYPE" != xyes; then
61440              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61441              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61442
61443  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61444  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61445  METHOD="well-known location"
61446
61447  # Let's start with an optimistic view of the world :-)
61448  FOUND_FREETYPE=yes
61449
61450  # First look for the canonical freetype main include file ft2build.h.
61451  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61452    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61453    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61454    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61455      # Fail.
61456      FOUND_FREETYPE=no
61457    fi
61458  fi
61459
61460  if test "x$FOUND_FREETYPE" = xyes; then
61461    # Include file found, let's continue the sanity check.
61462    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61463$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61464
61465    # Reset to default value
61466    FREETYPE_BASE_NAME=freetype
61467    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61468    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61469      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61470          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61471        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61472        # for the .6 version explicitly.
61473        FREETYPE_BASE_NAME=freetype.6
61474        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61475        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61476$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61477      else
61478        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61479$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61480        FOUND_FREETYPE=no
61481      fi
61482    else
61483      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61484        # On Windows, we will need both .lib and .dll file.
61485        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61486          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61487$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61488          FOUND_FREETYPE=no
61489        fi
61490      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61491          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61492        # Found lib in isa dir, use that instead.
61493        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61494        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61495$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61496      fi
61497    fi
61498  fi
61499
61500  if test "x$FOUND_FREETYPE" = xyes; then
61501
61502  # Only process if variable expands to non-empty
61503
61504  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61506
61507  # Input might be given as Windows format, start by converting to
61508  # unix format.
61509  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61510  new_path=`$CYGPATH -u "$path"`
61511
61512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61515  # "foo.exe" is OK but "foo" is an error.
61516  #
61517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61518  # It is also a way to make sure we got the proper file name for the real test later on.
61519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61520  if test "x$test_shortpath" = x; then
61521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61523    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61524  fi
61525
61526  # Call helper function which possibly converts this using DOS-style short mode.
61527  # If so, the updated path is stored in $new_path.
61528
61529  input_path="$new_path"
61530  # Check if we need to convert this using DOS-style short mode. If the path
61531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61532  # take no chances and rewrite it.
61533  # Note: m4 eats our [], so we need to use [ and ] instead.
61534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61535  if test "x$has_forbidden_chars" != x; then
61536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61540      # Going to short mode and back again did indeed matter. Since short mode is
61541      # case insensitive, let's make it lowercase to improve readability.
61542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61543      # Now convert it back to Unix-style (cygpath)
61544      input_path=`$CYGPATH -u "$shortmode_path"`
61545      new_path="$input_path"
61546    fi
61547  fi
61548
61549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61550  if test "x$test_cygdrive_prefix" = x; then
61551    # As a simple fix, exclude /usr/bin since it's not a real path.
61552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61554      # a path prefixed by /cygdrive for fixpath to work.
61555      new_path="$CYGWIN_ROOT_PATH$input_path"
61556    fi
61557  fi
61558
61559
61560  if test "x$path" != "x$new_path"; then
61561    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61563$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61564  fi
61565
61566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61567
61568  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61569  has_colon=`$ECHO $path | $GREP ^.:`
61570  new_path="$path"
61571  if test "x$has_colon" = x; then
61572    # Not in mixed or Windows style, start by that.
61573    new_path=`cmd //c echo $path`
61574  fi
61575
61576
61577  input_path="$new_path"
61578  # Check if we need to convert this using DOS-style short mode. If the path
61579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61580  # take no chances and rewrite it.
61581  # Note: m4 eats our [], so we need to use [ and ] instead.
61582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61583  if test "x$has_forbidden_chars" != x; then
61584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61586  fi
61587
61588
61589  windows_path="$new_path"
61590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61591    unix_path=`$CYGPATH -u "$windows_path"`
61592    new_path="$unix_path"
61593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61595    new_path="$unix_path"
61596  fi
61597
61598  if test "x$path" != "x$new_path"; then
61599    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61602  fi
61603
61604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61606
61607    else
61608      # We're on a unix platform. Hooray! :)
61609      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61610      has_space=`$ECHO "$path" | $GREP " "`
61611      if test "x$has_space" != x; then
61612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61615      fi
61616
61617      # Use eval to expand a potential ~
61618      eval path="$path"
61619      if test ! -f "$path" && test ! -d "$path"; then
61620        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61621      fi
61622
61623      if test -d "$path"; then
61624        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61625      else
61626        dir="`$DIRNAME "$path"`"
61627        base="`$BASENAME "$path"`"
61628        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61629      fi
61630    fi
61631  fi
61632
61633
61634  # Only process if variable expands to non-empty
61635
61636  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61638
61639  # Input might be given as Windows format, start by converting to
61640  # unix format.
61641  path="$POTENTIAL_FREETYPE_LIB_PATH"
61642  new_path=`$CYGPATH -u "$path"`
61643
61644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61647  # "foo.exe" is OK but "foo" is an error.
61648  #
61649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61650  # It is also a way to make sure we got the proper file name for the real test later on.
61651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61652  if test "x$test_shortpath" = x; then
61653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61655    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61656  fi
61657
61658  # Call helper function which possibly converts this using DOS-style short mode.
61659  # If so, the updated path is stored in $new_path.
61660
61661  input_path="$new_path"
61662  # Check if we need to convert this using DOS-style short mode. If the path
61663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61664  # take no chances and rewrite it.
61665  # Note: m4 eats our [], so we need to use [ and ] instead.
61666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61667  if test "x$has_forbidden_chars" != x; then
61668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61672      # Going to short mode and back again did indeed matter. Since short mode is
61673      # case insensitive, let's make it lowercase to improve readability.
61674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61675      # Now convert it back to Unix-style (cygpath)
61676      input_path=`$CYGPATH -u "$shortmode_path"`
61677      new_path="$input_path"
61678    fi
61679  fi
61680
61681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61682  if test "x$test_cygdrive_prefix" = x; then
61683    # As a simple fix, exclude /usr/bin since it's not a real path.
61684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61686      # a path prefixed by /cygdrive for fixpath to work.
61687      new_path="$CYGWIN_ROOT_PATH$input_path"
61688    fi
61689  fi
61690
61691
61692  if test "x$path" != "x$new_path"; then
61693    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61696  fi
61697
61698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61699
61700  path="$POTENTIAL_FREETYPE_LIB_PATH"
61701  has_colon=`$ECHO $path | $GREP ^.:`
61702  new_path="$path"
61703  if test "x$has_colon" = x; then
61704    # Not in mixed or Windows style, start by that.
61705    new_path=`cmd //c echo $path`
61706  fi
61707
61708
61709  input_path="$new_path"
61710  # Check if we need to convert this using DOS-style short mode. If the path
61711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61712  # take no chances and rewrite it.
61713  # Note: m4 eats our [], so we need to use [ and ] instead.
61714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61715  if test "x$has_forbidden_chars" != x; then
61716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61718  fi
61719
61720
61721  windows_path="$new_path"
61722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61723    unix_path=`$CYGPATH -u "$windows_path"`
61724    new_path="$unix_path"
61725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61727    new_path="$unix_path"
61728  fi
61729
61730  if test "x$path" != "x$new_path"; then
61731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61734  fi
61735
61736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61738
61739    else
61740      # We're on a unix platform. Hooray! :)
61741      path="$POTENTIAL_FREETYPE_LIB_PATH"
61742      has_space=`$ECHO "$path" | $GREP " "`
61743      if test "x$has_space" != x; then
61744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61746        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61747      fi
61748
61749      # Use eval to expand a potential ~
61750      eval path="$path"
61751      if test ! -f "$path" && test ! -d "$path"; then
61752        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61753      fi
61754
61755      if test -d "$path"; then
61756        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61757      else
61758        dir="`$DIRNAME "$path"`"
61759        base="`$BASENAME "$path"`"
61760        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61761      fi
61762    fi
61763  fi
61764
61765
61766    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61768$as_echo_n "checking for freetype includes... " >&6; }
61769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61770$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61771    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61773$as_echo_n "checking for freetype libraries... " >&6; }
61774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61775$as_echo "$FREETYPE_LIB_PATH" >&6; }
61776  fi
61777
61778            fi
61779          fi
61780
61781          if test "x$FOUND_FREETYPE" != xyes; then
61782            FREETYPE_BASE_DIR="$SYSROOT/usr"
61783            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61784
61785  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61786  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61787  METHOD="well-known location"
61788
61789  # Let's start with an optimistic view of the world :-)
61790  FOUND_FREETYPE=yes
61791
61792  # First look for the canonical freetype main include file ft2build.h.
61793  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61794    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61795    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61796    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61797      # Fail.
61798      FOUND_FREETYPE=no
61799    fi
61800  fi
61801
61802  if test "x$FOUND_FREETYPE" = xyes; then
61803    # Include file found, let's continue the sanity check.
61804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61805$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61806
61807    # Reset to default value
61808    FREETYPE_BASE_NAME=freetype
61809    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61810    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61811      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61812          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61813        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61814        # for the .6 version explicitly.
61815        FREETYPE_BASE_NAME=freetype.6
61816        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61817        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61818$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61819      else
61820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61822        FOUND_FREETYPE=no
61823      fi
61824    else
61825      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61826        # On Windows, we will need both .lib and .dll file.
61827        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61828          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61830          FOUND_FREETYPE=no
61831        fi
61832      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61833          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61834        # Found lib in isa dir, use that instead.
61835        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61836        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61837$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61838      fi
61839    fi
61840  fi
61841
61842  if test "x$FOUND_FREETYPE" = xyes; then
61843
61844  # Only process if variable expands to non-empty
61845
61846  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61848
61849  # Input might be given as Windows format, start by converting to
61850  # unix format.
61851  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61852  new_path=`$CYGPATH -u "$path"`
61853
61854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61857  # "foo.exe" is OK but "foo" is an error.
61858  #
61859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61860  # It is also a way to make sure we got the proper file name for the real test later on.
61861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61862  if test "x$test_shortpath" = x; then
61863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61865    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61866  fi
61867
61868  # Call helper function which possibly converts this using DOS-style short mode.
61869  # If so, the updated path is stored in $new_path.
61870
61871  input_path="$new_path"
61872  # Check if we need to convert this using DOS-style short mode. If the path
61873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61874  # take no chances and rewrite it.
61875  # Note: m4 eats our [], so we need to use [ and ] instead.
61876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61877  if test "x$has_forbidden_chars" != x; then
61878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61882      # Going to short mode and back again did indeed matter. Since short mode is
61883      # case insensitive, let's make it lowercase to improve readability.
61884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61885      # Now convert it back to Unix-style (cygpath)
61886      input_path=`$CYGPATH -u "$shortmode_path"`
61887      new_path="$input_path"
61888    fi
61889  fi
61890
61891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61892  if test "x$test_cygdrive_prefix" = x; then
61893    # As a simple fix, exclude /usr/bin since it's not a real path.
61894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61896      # a path prefixed by /cygdrive for fixpath to work.
61897      new_path="$CYGWIN_ROOT_PATH$input_path"
61898    fi
61899  fi
61900
61901
61902  if test "x$path" != "x$new_path"; then
61903    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61906  fi
61907
61908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61909
61910  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61911  has_colon=`$ECHO $path | $GREP ^.:`
61912  new_path="$path"
61913  if test "x$has_colon" = x; then
61914    # Not in mixed or Windows style, start by that.
61915    new_path=`cmd //c echo $path`
61916  fi
61917
61918
61919  input_path="$new_path"
61920  # Check if we need to convert this using DOS-style short mode. If the path
61921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61922  # take no chances and rewrite it.
61923  # Note: m4 eats our [], so we need to use [ and ] instead.
61924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61925  if test "x$has_forbidden_chars" != x; then
61926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61928  fi
61929
61930
61931  windows_path="$new_path"
61932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61933    unix_path=`$CYGPATH -u "$windows_path"`
61934    new_path="$unix_path"
61935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61937    new_path="$unix_path"
61938  fi
61939
61940  if test "x$path" != "x$new_path"; then
61941    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61944  fi
61945
61946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61948
61949    else
61950      # We're on a unix platform. Hooray! :)
61951      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61952      has_space=`$ECHO "$path" | $GREP " "`
61953      if test "x$has_space" != x; then
61954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61957      fi
61958
61959      # Use eval to expand a potential ~
61960      eval path="$path"
61961      if test ! -f "$path" && test ! -d "$path"; then
61962        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61963      fi
61964
61965      if test -d "$path"; then
61966        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61967      else
61968        dir="`$DIRNAME "$path"`"
61969        base="`$BASENAME "$path"`"
61970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61971      fi
61972    fi
61973  fi
61974
61975
61976  # Only process if variable expands to non-empty
61977
61978  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61980
61981  # Input might be given as Windows format, start by converting to
61982  # unix format.
61983  path="$POTENTIAL_FREETYPE_LIB_PATH"
61984  new_path=`$CYGPATH -u "$path"`
61985
61986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61989  # "foo.exe" is OK but "foo" is an error.
61990  #
61991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61992  # It is also a way to make sure we got the proper file name for the real test later on.
61993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61994  if test "x$test_shortpath" = x; then
61995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61997    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61998  fi
61999
62000  # Call helper function which possibly converts this using DOS-style short mode.
62001  # If so, the updated path is stored in $new_path.
62002
62003  input_path="$new_path"
62004  # Check if we need to convert this using DOS-style short mode. If the path
62005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62006  # take no chances and rewrite it.
62007  # Note: m4 eats our [], so we need to use [ and ] instead.
62008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62009  if test "x$has_forbidden_chars" != x; then
62010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62014      # Going to short mode and back again did indeed matter. Since short mode is
62015      # case insensitive, let's make it lowercase to improve readability.
62016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62017      # Now convert it back to Unix-style (cygpath)
62018      input_path=`$CYGPATH -u "$shortmode_path"`
62019      new_path="$input_path"
62020    fi
62021  fi
62022
62023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62024  if test "x$test_cygdrive_prefix" = x; then
62025    # As a simple fix, exclude /usr/bin since it's not a real path.
62026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62028      # a path prefixed by /cygdrive for fixpath to work.
62029      new_path="$CYGWIN_ROOT_PATH$input_path"
62030    fi
62031  fi
62032
62033
62034  if test "x$path" != "x$new_path"; then
62035    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62038  fi
62039
62040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62041
62042  path="$POTENTIAL_FREETYPE_LIB_PATH"
62043  has_colon=`$ECHO $path | $GREP ^.:`
62044  new_path="$path"
62045  if test "x$has_colon" = x; then
62046    # Not in mixed or Windows style, start by that.
62047    new_path=`cmd //c echo $path`
62048  fi
62049
62050
62051  input_path="$new_path"
62052  # Check if we need to convert this using DOS-style short mode. If the path
62053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62054  # take no chances and rewrite it.
62055  # Note: m4 eats our [], so we need to use [ and ] instead.
62056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62057  if test "x$has_forbidden_chars" != x; then
62058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62060  fi
62061
62062
62063  windows_path="$new_path"
62064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62065    unix_path=`$CYGPATH -u "$windows_path"`
62066    new_path="$unix_path"
62067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62069    new_path="$unix_path"
62070  fi
62071
62072  if test "x$path" != "x$new_path"; then
62073    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62076  fi
62077
62078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62080
62081    else
62082      # We're on a unix platform. Hooray! :)
62083      path="$POTENTIAL_FREETYPE_LIB_PATH"
62084      has_space=`$ECHO "$path" | $GREP " "`
62085      if test "x$has_space" != x; then
62086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62087$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62089      fi
62090
62091      # Use eval to expand a potential ~
62092      eval path="$path"
62093      if test ! -f "$path" && test ! -d "$path"; then
62094        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62095      fi
62096
62097      if test -d "$path"; then
62098        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62099      else
62100        dir="`$DIRNAME "$path"`"
62101        base="`$BASENAME "$path"`"
62102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62103      fi
62104    fi
62105  fi
62106
62107
62108    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62110$as_echo_n "checking for freetype includes... " >&6; }
62111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62112$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62113    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62115$as_echo_n "checking for freetype libraries... " >&6; }
62116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62117$as_echo "$FREETYPE_LIB_PATH" >&6; }
62118  fi
62119
62120            else
62121
62122  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62123  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62124  METHOD="well-known location"
62125
62126  # Let's start with an optimistic view of the world :-)
62127  FOUND_FREETYPE=yes
62128
62129  # First look for the canonical freetype main include file ft2build.h.
62130  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62131    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62132    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62133    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62134      # Fail.
62135      FOUND_FREETYPE=no
62136    fi
62137  fi
62138
62139  if test "x$FOUND_FREETYPE" = xyes; then
62140    # Include file found, let's continue the sanity check.
62141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62142$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62143
62144    # Reset to default value
62145    FREETYPE_BASE_NAME=freetype
62146    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62147    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62148      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62149          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62150        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62151        # for the .6 version explicitly.
62152        FREETYPE_BASE_NAME=freetype.6
62153        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62154        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62155$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62156      else
62157        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62159        FOUND_FREETYPE=no
62160      fi
62161    else
62162      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62163        # On Windows, we will need both .lib and .dll file.
62164        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62165          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62167          FOUND_FREETYPE=no
62168        fi
62169      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62170          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62171        # Found lib in isa dir, use that instead.
62172        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62173        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62174$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62175      fi
62176    fi
62177  fi
62178
62179  if test "x$FOUND_FREETYPE" = xyes; then
62180
62181  # Only process if variable expands to non-empty
62182
62183  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62185
62186  # Input might be given as Windows format, start by converting to
62187  # unix format.
62188  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62189  new_path=`$CYGPATH -u "$path"`
62190
62191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62194  # "foo.exe" is OK but "foo" is an error.
62195  #
62196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62197  # It is also a way to make sure we got the proper file name for the real test later on.
62198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62199  if test "x$test_shortpath" = x; then
62200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62203  fi
62204
62205  # Call helper function which possibly converts this using DOS-style short mode.
62206  # If so, the updated path is stored in $new_path.
62207
62208  input_path="$new_path"
62209  # Check if we need to convert this using DOS-style short mode. If the path
62210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62211  # take no chances and rewrite it.
62212  # Note: m4 eats our [], so we need to use [ and ] instead.
62213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62214  if test "x$has_forbidden_chars" != x; then
62215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62219      # Going to short mode and back again did indeed matter. Since short mode is
62220      # case insensitive, let's make it lowercase to improve readability.
62221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62222      # Now convert it back to Unix-style (cygpath)
62223      input_path=`$CYGPATH -u "$shortmode_path"`
62224      new_path="$input_path"
62225    fi
62226  fi
62227
62228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62229  if test "x$test_cygdrive_prefix" = x; then
62230    # As a simple fix, exclude /usr/bin since it's not a real path.
62231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62233      # a path prefixed by /cygdrive for fixpath to work.
62234      new_path="$CYGWIN_ROOT_PATH$input_path"
62235    fi
62236  fi
62237
62238
62239  if test "x$path" != "x$new_path"; then
62240    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62243  fi
62244
62245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62246
62247  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62248  has_colon=`$ECHO $path | $GREP ^.:`
62249  new_path="$path"
62250  if test "x$has_colon" = x; then
62251    # Not in mixed or Windows style, start by that.
62252    new_path=`cmd //c echo $path`
62253  fi
62254
62255
62256  input_path="$new_path"
62257  # Check if we need to convert this using DOS-style short mode. If the path
62258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62259  # take no chances and rewrite it.
62260  # Note: m4 eats our [], so we need to use [ and ] instead.
62261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62262  if test "x$has_forbidden_chars" != x; then
62263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62265  fi
62266
62267
62268  windows_path="$new_path"
62269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62270    unix_path=`$CYGPATH -u "$windows_path"`
62271    new_path="$unix_path"
62272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62274    new_path="$unix_path"
62275  fi
62276
62277  if test "x$path" != "x$new_path"; then
62278    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62281  fi
62282
62283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62285
62286    else
62287      # We're on a unix platform. Hooray! :)
62288      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62289      has_space=`$ECHO "$path" | $GREP " "`
62290      if test "x$has_space" != x; then
62291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62294      fi
62295
62296      # Use eval to expand a potential ~
62297      eval path="$path"
62298      if test ! -f "$path" && test ! -d "$path"; then
62299        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62300      fi
62301
62302      if test -d "$path"; then
62303        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62304      else
62305        dir="`$DIRNAME "$path"`"
62306        base="`$BASENAME "$path"`"
62307        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62308      fi
62309    fi
62310  fi
62311
62312
62313  # Only process if variable expands to non-empty
62314
62315  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62317
62318  # Input might be given as Windows format, start by converting to
62319  # unix format.
62320  path="$POTENTIAL_FREETYPE_LIB_PATH"
62321  new_path=`$CYGPATH -u "$path"`
62322
62323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62326  # "foo.exe" is OK but "foo" is an error.
62327  #
62328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62329  # It is also a way to make sure we got the proper file name for the real test later on.
62330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62331  if test "x$test_shortpath" = x; then
62332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62334    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62335  fi
62336
62337  # Call helper function which possibly converts this using DOS-style short mode.
62338  # If so, the updated path is stored in $new_path.
62339
62340  input_path="$new_path"
62341  # Check if we need to convert this using DOS-style short mode. If the path
62342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62343  # take no chances and rewrite it.
62344  # Note: m4 eats our [], so we need to use [ and ] instead.
62345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62346  if test "x$has_forbidden_chars" != x; then
62347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62351      # Going to short mode and back again did indeed matter. Since short mode is
62352      # case insensitive, let's make it lowercase to improve readability.
62353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62354      # Now convert it back to Unix-style (cygpath)
62355      input_path=`$CYGPATH -u "$shortmode_path"`
62356      new_path="$input_path"
62357    fi
62358  fi
62359
62360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62361  if test "x$test_cygdrive_prefix" = x; then
62362    # As a simple fix, exclude /usr/bin since it's not a real path.
62363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62365      # a path prefixed by /cygdrive for fixpath to work.
62366      new_path="$CYGWIN_ROOT_PATH$input_path"
62367    fi
62368  fi
62369
62370
62371  if test "x$path" != "x$new_path"; then
62372    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62375  fi
62376
62377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62378
62379  path="$POTENTIAL_FREETYPE_LIB_PATH"
62380  has_colon=`$ECHO $path | $GREP ^.:`
62381  new_path="$path"
62382  if test "x$has_colon" = x; then
62383    # Not in mixed or Windows style, start by that.
62384    new_path=`cmd //c echo $path`
62385  fi
62386
62387
62388  input_path="$new_path"
62389  # Check if we need to convert this using DOS-style short mode. If the path
62390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62391  # take no chances and rewrite it.
62392  # Note: m4 eats our [], so we need to use [ and ] instead.
62393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62394  if test "x$has_forbidden_chars" != x; then
62395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62397  fi
62398
62399
62400  windows_path="$new_path"
62401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62402    unix_path=`$CYGPATH -u "$windows_path"`
62403    new_path="$unix_path"
62404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62406    new_path="$unix_path"
62407  fi
62408
62409  if test "x$path" != "x$new_path"; then
62410    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62413  fi
62414
62415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62417
62418    else
62419      # We're on a unix platform. Hooray! :)
62420      path="$POTENTIAL_FREETYPE_LIB_PATH"
62421      has_space=`$ECHO "$path" | $GREP " "`
62422      if test "x$has_space" != x; then
62423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62426      fi
62427
62428      # Use eval to expand a potential ~
62429      eval path="$path"
62430      if test ! -f "$path" && test ! -d "$path"; then
62431        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62432      fi
62433
62434      if test -d "$path"; then
62435        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62436      else
62437        dir="`$DIRNAME "$path"`"
62438        base="`$BASENAME "$path"`"
62439        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62440      fi
62441    fi
62442  fi
62443
62444
62445    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62447$as_echo_n "checking for freetype includes... " >&6; }
62448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62449$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62450    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62452$as_echo_n "checking for freetype libraries... " >&6; }
62453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62454$as_echo "$FREETYPE_LIB_PATH" >&6; }
62455  fi
62456
62457              if test "x$FOUND_FREETYPE" != xyes; then
62458
62459  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62460  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62461  METHOD="well-known location"
62462
62463  # Let's start with an optimistic view of the world :-)
62464  FOUND_FREETYPE=yes
62465
62466  # First look for the canonical freetype main include file ft2build.h.
62467  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62468    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62469    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62470    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62471      # Fail.
62472      FOUND_FREETYPE=no
62473    fi
62474  fi
62475
62476  if test "x$FOUND_FREETYPE" = xyes; then
62477    # Include file found, let's continue the sanity check.
62478    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62479$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62480
62481    # Reset to default value
62482    FREETYPE_BASE_NAME=freetype
62483    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62484    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62485      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62486          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62487        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62488        # for the .6 version explicitly.
62489        FREETYPE_BASE_NAME=freetype.6
62490        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62491        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62492$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62493      else
62494        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62495$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62496        FOUND_FREETYPE=no
62497      fi
62498    else
62499      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62500        # On Windows, we will need both .lib and .dll file.
62501        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62502          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62503$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62504          FOUND_FREETYPE=no
62505        fi
62506      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62507          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62508        # Found lib in isa dir, use that instead.
62509        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62510        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62511$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62512      fi
62513    fi
62514  fi
62515
62516  if test "x$FOUND_FREETYPE" = xyes; then
62517
62518  # Only process if variable expands to non-empty
62519
62520  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62522
62523  # Input might be given as Windows format, start by converting to
62524  # unix format.
62525  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62526  new_path=`$CYGPATH -u "$path"`
62527
62528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62531  # "foo.exe" is OK but "foo" is an error.
62532  #
62533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62534  # It is also a way to make sure we got the proper file name for the real test later on.
62535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62536  if test "x$test_shortpath" = x; then
62537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62539    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62540  fi
62541
62542  # Call helper function which possibly converts this using DOS-style short mode.
62543  # If so, the updated path is stored in $new_path.
62544
62545  input_path="$new_path"
62546  # Check if we need to convert this using DOS-style short mode. If the path
62547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62548  # take no chances and rewrite it.
62549  # Note: m4 eats our [], so we need to use [ and ] instead.
62550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62551  if test "x$has_forbidden_chars" != x; then
62552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62556      # Going to short mode and back again did indeed matter. Since short mode is
62557      # case insensitive, let's make it lowercase to improve readability.
62558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62559      # Now convert it back to Unix-style (cygpath)
62560      input_path=`$CYGPATH -u "$shortmode_path"`
62561      new_path="$input_path"
62562    fi
62563  fi
62564
62565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62566  if test "x$test_cygdrive_prefix" = x; then
62567    # As a simple fix, exclude /usr/bin since it's not a real path.
62568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62570      # a path prefixed by /cygdrive for fixpath to work.
62571      new_path="$CYGWIN_ROOT_PATH$input_path"
62572    fi
62573  fi
62574
62575
62576  if test "x$path" != "x$new_path"; then
62577    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62580  fi
62581
62582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62583
62584  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62585  has_colon=`$ECHO $path | $GREP ^.:`
62586  new_path="$path"
62587  if test "x$has_colon" = x; then
62588    # Not in mixed or Windows style, start by that.
62589    new_path=`cmd //c echo $path`
62590  fi
62591
62592
62593  input_path="$new_path"
62594  # Check if we need to convert this using DOS-style short mode. If the path
62595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62596  # take no chances and rewrite it.
62597  # Note: m4 eats our [], so we need to use [ and ] instead.
62598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62599  if test "x$has_forbidden_chars" != x; then
62600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62602  fi
62603
62604
62605  windows_path="$new_path"
62606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62607    unix_path=`$CYGPATH -u "$windows_path"`
62608    new_path="$unix_path"
62609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62611    new_path="$unix_path"
62612  fi
62613
62614  if test "x$path" != "x$new_path"; then
62615    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62617$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62618  fi
62619
62620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62622
62623    else
62624      # We're on a unix platform. Hooray! :)
62625      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62626      has_space=`$ECHO "$path" | $GREP " "`
62627      if test "x$has_space" != x; then
62628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62629$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62631      fi
62632
62633      # Use eval to expand a potential ~
62634      eval path="$path"
62635      if test ! -f "$path" && test ! -d "$path"; then
62636        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62637      fi
62638
62639      if test -d "$path"; then
62640        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62641      else
62642        dir="`$DIRNAME "$path"`"
62643        base="`$BASENAME "$path"`"
62644        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62645      fi
62646    fi
62647  fi
62648
62649
62650  # Only process if variable expands to non-empty
62651
62652  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62654
62655  # Input might be given as Windows format, start by converting to
62656  # unix format.
62657  path="$POTENTIAL_FREETYPE_LIB_PATH"
62658  new_path=`$CYGPATH -u "$path"`
62659
62660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62663  # "foo.exe" is OK but "foo" is an error.
62664  #
62665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62666  # It is also a way to make sure we got the proper file name for the real test later on.
62667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62668  if test "x$test_shortpath" = x; then
62669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62671    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62672  fi
62673
62674  # Call helper function which possibly converts this using DOS-style short mode.
62675  # If so, the updated path is stored in $new_path.
62676
62677  input_path="$new_path"
62678  # Check if we need to convert this using DOS-style short mode. If the path
62679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62680  # take no chances and rewrite it.
62681  # Note: m4 eats our [], so we need to use [ and ] instead.
62682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62683  if test "x$has_forbidden_chars" != x; then
62684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62688      # Going to short mode and back again did indeed matter. Since short mode is
62689      # case insensitive, let's make it lowercase to improve readability.
62690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62691      # Now convert it back to Unix-style (cygpath)
62692      input_path=`$CYGPATH -u "$shortmode_path"`
62693      new_path="$input_path"
62694    fi
62695  fi
62696
62697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62698  if test "x$test_cygdrive_prefix" = x; then
62699    # As a simple fix, exclude /usr/bin since it's not a real path.
62700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62702      # a path prefixed by /cygdrive for fixpath to work.
62703      new_path="$CYGWIN_ROOT_PATH$input_path"
62704    fi
62705  fi
62706
62707
62708  if test "x$path" != "x$new_path"; then
62709    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62712  fi
62713
62714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62715
62716  path="$POTENTIAL_FREETYPE_LIB_PATH"
62717  has_colon=`$ECHO $path | $GREP ^.:`
62718  new_path="$path"
62719  if test "x$has_colon" = x; then
62720    # Not in mixed or Windows style, start by that.
62721    new_path=`cmd //c echo $path`
62722  fi
62723
62724
62725  input_path="$new_path"
62726  # Check if we need to convert this using DOS-style short mode. If the path
62727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62728  # take no chances and rewrite it.
62729  # Note: m4 eats our [], so we need to use [ and ] instead.
62730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62731  if test "x$has_forbidden_chars" != x; then
62732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62734  fi
62735
62736
62737  windows_path="$new_path"
62738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62739    unix_path=`$CYGPATH -u "$windows_path"`
62740    new_path="$unix_path"
62741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62743    new_path="$unix_path"
62744  fi
62745
62746  if test "x$path" != "x$new_path"; then
62747    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62750  fi
62751
62752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62754
62755    else
62756      # We're on a unix platform. Hooray! :)
62757      path="$POTENTIAL_FREETYPE_LIB_PATH"
62758      has_space=`$ECHO "$path" | $GREP " "`
62759      if test "x$has_space" != x; then
62760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62763      fi
62764
62765      # Use eval to expand a potential ~
62766      eval path="$path"
62767      if test ! -f "$path" && test ! -d "$path"; then
62768        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62769      fi
62770
62771      if test -d "$path"; then
62772        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62773      else
62774        dir="`$DIRNAME "$path"`"
62775        base="`$BASENAME "$path"`"
62776        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62777      fi
62778    fi
62779  fi
62780
62781
62782    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62784$as_echo_n "checking for freetype includes... " >&6; }
62785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62786$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62787    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62789$as_echo_n "checking for freetype libraries... " >&6; }
62790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62791$as_echo "$FREETYPE_LIB_PATH" >&6; }
62792  fi
62793
62794              fi
62795            fi
62796          fi
62797        fi
62798      fi # end check in well-known locations
62799
62800      if test "x$FOUND_FREETYPE" != xyes; then
62801
62802  # Print a helpful message on how to acquire the necessary build dependency.
62803  # freetype is the help tag: freetype, cups, alsa etc
62804  MISSING_DEPENDENCY=freetype
62805
62806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62807    cygwin_help $MISSING_DEPENDENCY
62808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62809    msys_help $MISSING_DEPENDENCY
62810  else
62811    PKGHANDLER_COMMAND=
62812
62813    case $PKGHANDLER in
62814      apt-get)
62815        apt_help     $MISSING_DEPENDENCY ;;
62816      yum)
62817        yum_help     $MISSING_DEPENDENCY ;;
62818      brew)
62819        brew_help    $MISSING_DEPENDENCY ;;
62820      port)
62821        port_help    $MISSING_DEPENDENCY ;;
62822      pkgutil)
62823        pkgutil_help $MISSING_DEPENDENCY ;;
62824      pkgadd)
62825        pkgadd_help  $MISSING_DEPENDENCY ;;
62826    esac
62827
62828    if test "x$PKGHANDLER_COMMAND" != x; then
62829      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62830    fi
62831  fi
62832
62833        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62834      fi
62835    fi # end user specified settings
62836
62837    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62838    if test "x$FREETYPE_CFLAGS" = x; then
62839
62840  # Only process if variable expands to non-empty
62841
62842  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62844
62845  # Input might be given as Windows format, start by converting to
62846  # unix format.
62847  path="$FREETYPE_INCLUDE_PATH"
62848  new_path=`$CYGPATH -u "$path"`
62849
62850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62853  # "foo.exe" is OK but "foo" is an error.
62854  #
62855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62856  # It is also a way to make sure we got the proper file name for the real test later on.
62857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62858  if test "x$test_shortpath" = x; then
62859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62860$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62861    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62862  fi
62863
62864  # Call helper function which possibly converts this using DOS-style short mode.
62865  # If so, the updated path is stored in $new_path.
62866
62867  input_path="$new_path"
62868  # Check if we need to convert this using DOS-style short mode. If the path
62869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62870  # take no chances and rewrite it.
62871  # Note: m4 eats our [], so we need to use [ and ] instead.
62872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62873  if test "x$has_forbidden_chars" != x; then
62874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62878      # Going to short mode and back again did indeed matter. Since short mode is
62879      # case insensitive, let's make it lowercase to improve readability.
62880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62881      # Now convert it back to Unix-style (cygpath)
62882      input_path=`$CYGPATH -u "$shortmode_path"`
62883      new_path="$input_path"
62884    fi
62885  fi
62886
62887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62888  if test "x$test_cygdrive_prefix" = x; then
62889    # As a simple fix, exclude /usr/bin since it's not a real path.
62890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62892      # a path prefixed by /cygdrive for fixpath to work.
62893      new_path="$CYGWIN_ROOT_PATH$input_path"
62894    fi
62895  fi
62896
62897
62898  if test "x$path" != "x$new_path"; then
62899    FREETYPE_INCLUDE_PATH="$new_path"
62900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62901$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62902  fi
62903
62904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62905
62906  path="$FREETYPE_INCLUDE_PATH"
62907  has_colon=`$ECHO $path | $GREP ^.:`
62908  new_path="$path"
62909  if test "x$has_colon" = x; then
62910    # Not in mixed or Windows style, start by that.
62911    new_path=`cmd //c echo $path`
62912  fi
62913
62914
62915  input_path="$new_path"
62916  # Check if we need to convert this using DOS-style short mode. If the path
62917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62918  # take no chances and rewrite it.
62919  # Note: m4 eats our [], so we need to use [ and ] instead.
62920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62921  if test "x$has_forbidden_chars" != x; then
62922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62924  fi
62925
62926
62927  windows_path="$new_path"
62928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62929    unix_path=`$CYGPATH -u "$windows_path"`
62930    new_path="$unix_path"
62931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62933    new_path="$unix_path"
62934  fi
62935
62936  if test "x$path" != "x$new_path"; then
62937    FREETYPE_INCLUDE_PATH="$new_path"
62938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62939$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62940  fi
62941
62942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62944
62945    else
62946      # We're on a unix platform. Hooray! :)
62947      path="$FREETYPE_INCLUDE_PATH"
62948      has_space=`$ECHO "$path" | $GREP " "`
62949      if test "x$has_space" != x; then
62950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62951$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62953      fi
62954
62955      # Use eval to expand a potential ~
62956      eval path="$path"
62957      if test ! -f "$path" && test ! -d "$path"; then
62958        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62959      fi
62960
62961      if test -d "$path"; then
62962        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62963      else
62964        dir="`$DIRNAME "$path"`"
62965        base="`$BASENAME "$path"`"
62966        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62967      fi
62968    fi
62969  fi
62970
62971      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62972        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62973      else
62974        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62975      fi
62976    fi
62977
62978    if test "x$FREETYPE_LIBS" = x; then
62979
62980  # Only process if variable expands to non-empty
62981
62982  if test "x$FREETYPE_LIB_PATH" != x; then
62983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62984
62985  # Input might be given as Windows format, start by converting to
62986  # unix format.
62987  path="$FREETYPE_LIB_PATH"
62988  new_path=`$CYGPATH -u "$path"`
62989
62990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62993  # "foo.exe" is OK but "foo" is an error.
62994  #
62995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62996  # It is also a way to make sure we got the proper file name for the real test later on.
62997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62998  if test "x$test_shortpath" = x; then
62999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63000$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63001    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63002  fi
63003
63004  # Call helper function which possibly converts this using DOS-style short mode.
63005  # If so, the updated path is stored in $new_path.
63006
63007  input_path="$new_path"
63008  # Check if we need to convert this using DOS-style short mode. If the path
63009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63010  # take no chances and rewrite it.
63011  # Note: m4 eats our [], so we need to use [ and ] instead.
63012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63013  if test "x$has_forbidden_chars" != x; then
63014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63018      # Going to short mode and back again did indeed matter. Since short mode is
63019      # case insensitive, let's make it lowercase to improve readability.
63020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63021      # Now convert it back to Unix-style (cygpath)
63022      input_path=`$CYGPATH -u "$shortmode_path"`
63023      new_path="$input_path"
63024    fi
63025  fi
63026
63027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63028  if test "x$test_cygdrive_prefix" = x; then
63029    # As a simple fix, exclude /usr/bin since it's not a real path.
63030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63032      # a path prefixed by /cygdrive for fixpath to work.
63033      new_path="$CYGWIN_ROOT_PATH$input_path"
63034    fi
63035  fi
63036
63037
63038  if test "x$path" != "x$new_path"; then
63039    FREETYPE_LIB_PATH="$new_path"
63040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63041$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63042  fi
63043
63044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63045
63046  path="$FREETYPE_LIB_PATH"
63047  has_colon=`$ECHO $path | $GREP ^.:`
63048  new_path="$path"
63049  if test "x$has_colon" = x; then
63050    # Not in mixed or Windows style, start by that.
63051    new_path=`cmd //c echo $path`
63052  fi
63053
63054
63055  input_path="$new_path"
63056  # Check if we need to convert this using DOS-style short mode. If the path
63057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63058  # take no chances and rewrite it.
63059  # Note: m4 eats our [], so we need to use [ and ] instead.
63060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63061  if test "x$has_forbidden_chars" != x; then
63062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63064  fi
63065
63066
63067  windows_path="$new_path"
63068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63069    unix_path=`$CYGPATH -u "$windows_path"`
63070    new_path="$unix_path"
63071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63073    new_path="$unix_path"
63074  fi
63075
63076  if test "x$path" != "x$new_path"; then
63077    FREETYPE_LIB_PATH="$new_path"
63078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63079$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63080  fi
63081
63082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63084
63085    else
63086      # We're on a unix platform. Hooray! :)
63087      path="$FREETYPE_LIB_PATH"
63088      has_space=`$ECHO "$path" | $GREP " "`
63089      if test "x$has_space" != x; then
63090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63091$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63093      fi
63094
63095      # Use eval to expand a potential ~
63096      eval path="$path"
63097      if test ! -f "$path" && test ! -d "$path"; then
63098        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63099      fi
63100
63101      if test -d "$path"; then
63102        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63103      else
63104        dir="`$DIRNAME "$path"`"
63105        base="`$BASENAME "$path"`"
63106        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63107      fi
63108    fi
63109  fi
63110
63111      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63112        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63113      else
63114        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63115      fi
63116    fi
63117
63118    # Try to compile it
63119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63120$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63121    ac_ext=cpp
63122ac_cpp='$CXXCPP $CPPFLAGS'
63123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63126
63127    PREV_CXXCFLAGS="$CXXFLAGS"
63128    PREV_LIBS="$LIBS"
63129    PREV_CXX="$CXX"
63130    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63131    LIBS="$LIBS $FREETYPE_LIBS"
63132    CXX="$FIXPATH $CXX"
63133    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63134/* end confdefs.h.  */
63135
63136          #include<ft2build.h>
63137          #include FT_FREETYPE_H
63138          int main () {
63139            FT_Init_FreeType(NULL);
63140            return 0;
63141          }
63142
63143_ACEOF
63144if ac_fn_cxx_try_link "$LINENO"; then :
63145
63146          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63147$as_echo "yes" >&6; }
63148
63149else
63150
63151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63152$as_echo "no" >&6; }
63153          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63154$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63155          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63156$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63157
63158
63159  # Print a helpful message on how to acquire the necessary build dependency.
63160  # freetype is the help tag: freetype, cups, alsa etc
63161  MISSING_DEPENDENCY=freetype
63162
63163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63164    cygwin_help $MISSING_DEPENDENCY
63165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63166    msys_help $MISSING_DEPENDENCY
63167  else
63168    PKGHANDLER_COMMAND=
63169
63170    case $PKGHANDLER in
63171      apt-get)
63172        apt_help     $MISSING_DEPENDENCY ;;
63173      yum)
63174        yum_help     $MISSING_DEPENDENCY ;;
63175      brew)
63176        brew_help    $MISSING_DEPENDENCY ;;
63177      port)
63178        port_help    $MISSING_DEPENDENCY ;;
63179      pkgutil)
63180        pkgutil_help $MISSING_DEPENDENCY ;;
63181      pkgadd)
63182        pkgadd_help  $MISSING_DEPENDENCY ;;
63183    esac
63184
63185    if test "x$PKGHANDLER_COMMAND" != x; then
63186      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63187    fi
63188  fi
63189
63190
63191          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63192
63193
63194fi
63195rm -f core conftest.err conftest.$ac_objext \
63196    conftest$ac_exeext conftest.$ac_ext
63197    CXXCFLAGS="$PREV_CXXFLAGS"
63198    LIBS="$PREV_LIBS"
63199    CXX="$PREV_CXX"
63200    ac_ext=cpp
63201ac_cpp='$CXXCPP $CPPFLAGS'
63202ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63203ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63204ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63205
63206
63207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63208$as_echo_n "checking if we should bundle freetype... " >&6; }
63209    if test "x$BUNDLE_FREETYPE" = xyes; then
63210      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63211    fi
63212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63213$as_echo "$BUNDLE_FREETYPE" >&6; }
63214
63215  fi # end freetype needed
63216
63217
63218
63219
63220
63221
63222
63223# Check whether --with-alsa was given.
63224if test "${with_alsa+set}" = set; then :
63225  withval=$with_alsa;
63226fi
63227
63228
63229# Check whether --with-alsa-include was given.
63230if test "${with_alsa_include+set}" = set; then :
63231  withval=$with_alsa_include;
63232fi
63233
63234
63235# Check whether --with-alsa-lib was given.
63236if test "${with_alsa_lib+set}" = set; then :
63237  withval=$with_alsa_lib;
63238fi
63239
63240
63241  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63242    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63243        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63244        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63245      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63246$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63247    fi
63248    ALSA_CFLAGS=
63249    ALSA_LIBS=
63250  else
63251    ALSA_FOUND=no
63252
63253    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63254      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63255    fi
63256
63257    if test "x${with_alsa}" != x; then
63258      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63259      ALSA_CFLAGS="-I${with_alsa}/include"
63260      ALSA_FOUND=yes
63261    fi
63262    if test "x${with_alsa_include}" != x; then
63263      ALSA_CFLAGS="-I${with_alsa_include}"
63264      ALSA_FOUND=yes
63265    fi
63266    if test "x${with_alsa_lib}" != x; then
63267      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63268      ALSA_FOUND=yes
63269    fi
63270    # Do not try pkg-config if we have a sysroot set.
63271    if test "x$SYSROOT" = x; then
63272      if test "x$ALSA_FOUND" = xno; then
63273
63274pkg_failed=no
63275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63276$as_echo_n "checking for ALSA... " >&6; }
63277
63278if test -n "$ALSA_CFLAGS"; then
63279    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63280 elif test -n "$PKG_CONFIG"; then
63281    if test -n "$PKG_CONFIG" && \
63282    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63283  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63284  ac_status=$?
63285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63286  test $ac_status = 0; }; then
63287  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63288else
63289  pkg_failed=yes
63290fi
63291 else
63292    pkg_failed=untried
63293fi
63294if test -n "$ALSA_LIBS"; then
63295    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63296 elif test -n "$PKG_CONFIG"; then
63297    if test -n "$PKG_CONFIG" && \
63298    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63299  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63300  ac_status=$?
63301  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63302  test $ac_status = 0; }; then
63303  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63304else
63305  pkg_failed=yes
63306fi
63307 else
63308    pkg_failed=untried
63309fi
63310
63311
63312
63313if test $pkg_failed = yes; then
63314
63315if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63316        _pkg_short_errors_supported=yes
63317else
63318        _pkg_short_errors_supported=no
63319fi
63320        if test $_pkg_short_errors_supported = yes; then
63321	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63322        else
63323	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63324        fi
63325	# Put the nasty error message in config.log where it belongs
63326	echo "$ALSA_PKG_ERRORS" >&5
63327
63328	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63329$as_echo "no" >&6; }
63330                ALSA_FOUND=no
63331elif test $pkg_failed = untried; then
63332	ALSA_FOUND=no
63333else
63334	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63335	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63337$as_echo "yes" >&6; }
63338	ALSA_FOUND=yes
63339fi
63340      fi
63341    fi
63342    if test "x$ALSA_FOUND" = xno; then
63343      for ac_header in alsa/asoundlib.h
63344do :
63345  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63346if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63347  cat >>confdefs.h <<_ACEOF
63348#define HAVE_ALSA_ASOUNDLIB_H 1
63349_ACEOF
63350
63351            ALSA_FOUND=yes
63352            ALSA_CFLAGS=-Iignoreme
63353            ALSA_LIBS=-lasound
63354            DEFAULT_ALSA=yes
63355
63356else
63357  ALSA_FOUND=no
63358
63359fi
63360
63361done
63362
63363    fi
63364    if test "x$ALSA_FOUND" = xno; then
63365
63366  # Print a helpful message on how to acquire the necessary build dependency.
63367  # alsa is the help tag: freetype, cups, alsa etc
63368  MISSING_DEPENDENCY=alsa
63369
63370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63371    cygwin_help $MISSING_DEPENDENCY
63372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63373    msys_help $MISSING_DEPENDENCY
63374  else
63375    PKGHANDLER_COMMAND=
63376
63377    case $PKGHANDLER in
63378      apt-get)
63379        apt_help     $MISSING_DEPENDENCY ;;
63380      yum)
63381        yum_help     $MISSING_DEPENDENCY ;;
63382      brew)
63383        brew_help    $MISSING_DEPENDENCY ;;
63384      port)
63385        port_help    $MISSING_DEPENDENCY ;;
63386      pkgutil)
63387        pkgutil_help $MISSING_DEPENDENCY ;;
63388      pkgadd)
63389        pkgadd_help  $MISSING_DEPENDENCY ;;
63390    esac
63391
63392    if test "x$PKGHANDLER_COMMAND" != x; then
63393      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63394    fi
63395  fi
63396
63397      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63398    fi
63399  fi
63400
63401
63402
63403
63404
63405
63406# Check whether --with-libffi was given.
63407if test "${with_libffi+set}" = set; then :
63408  withval=$with_libffi;
63409fi
63410
63411
63412# Check whether --with-libffi-include was given.
63413if test "${with_libffi_include+set}" = set; then :
63414  withval=$with_libffi_include;
63415fi
63416
63417
63418# Check whether --with-libffi-lib was given.
63419if test "${with_libffi_lib+set}" = set; then :
63420  withval=$with_libffi_lib;
63421fi
63422
63423  # Check whether --enable-libffi-bundling was given.
63424if test "${enable_libffi_bundling+set}" = set; then :
63425  enableval=$enable_libffi_bundling;
63426fi
63427
63428
63429  if test "x$NEEDS_LIB_FFI" = xfalse; then
63430    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63431        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63432        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63433      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63434$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63435    fi
63436    LIBFFI_CFLAGS=
63437    LIBFFI_LIBS=
63438  else
63439    LIBFFI_FOUND=no
63440
63441    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63442      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63443    fi
63444
63445    if test "x${with_libffi}" != x; then
63446      LIBFFI_LIB_PATH="${with_libffi}/lib"
63447      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63448      LIBFFI_CFLAGS="-I${with_libffi}/include"
63449      LIBFFI_FOUND=yes
63450    fi
63451    if test "x${with_libffi_include}" != x; then
63452      LIBFFI_CFLAGS="-I${with_libffi_include}"
63453      LIBFFI_FOUND=yes
63454    fi
63455    if test "x${with_libffi_lib}" != x; then
63456      LIBFFI_LIB_PATH="${with_libffi_lib}"
63457      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63458      LIBFFI_FOUND=yes
63459    fi
63460    # Do not try pkg-config if we have a sysroot set.
63461    if test "x$SYSROOT" = x; then
63462      if test "x$LIBFFI_FOUND" = xno; then
63463        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63464
63465pkg_failed=no
63466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63467$as_echo_n "checking for LIBFFI... " >&6; }
63468
63469if test -n "$LIBFFI_CFLAGS"; then
63470    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63471 elif test -n "$PKG_CONFIG"; then
63472    if test -n "$PKG_CONFIG" && \
63473    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63474  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63475  ac_status=$?
63476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63477  test $ac_status = 0; }; then
63478  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63479else
63480  pkg_failed=yes
63481fi
63482 else
63483    pkg_failed=untried
63484fi
63485if test -n "$LIBFFI_LIBS"; then
63486    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63487 elif test -n "$PKG_CONFIG"; then
63488    if test -n "$PKG_CONFIG" && \
63489    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63490  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63491  ac_status=$?
63492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63493  test $ac_status = 0; }; then
63494  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63495else
63496  pkg_failed=yes
63497fi
63498 else
63499    pkg_failed=untried
63500fi
63501
63502
63503
63504if test $pkg_failed = yes; then
63505
63506if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63507        _pkg_short_errors_supported=yes
63508else
63509        _pkg_short_errors_supported=no
63510fi
63511        if test $_pkg_short_errors_supported = yes; then
63512	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63513        else
63514	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63515        fi
63516	# Put the nasty error message in config.log where it belongs
63517	echo "$LIBFFI_PKG_ERRORS" >&5
63518
63519	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63520$as_echo "no" >&6; }
63521                LIBFFI_FOUND=no
63522elif test $pkg_failed = untried; then
63523	LIBFFI_FOUND=no
63524else
63525	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63526	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63528$as_echo "yes" >&6; }
63529	LIBFFI_FOUND=yes
63530fi
63531      fi
63532    fi
63533    if test "x$LIBFFI_FOUND" = xno; then
63534      for ac_header in ffi.h
63535do :
63536  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63537if test "x$ac_cv_header_ffi_h" = xyes; then :
63538  cat >>confdefs.h <<_ACEOF
63539#define HAVE_FFI_H 1
63540_ACEOF
63541
63542            LIBFFI_FOUND=yes
63543            LIBFFI_CFLAGS=
63544            LIBFFI_LIBS=-lffi
63545
63546else
63547  LIBFFI_FOUND=no
63548
63549fi
63550
63551done
63552
63553    fi
63554    if test "x$LIBFFI_FOUND" = xno; then
63555
63556  # Print a helpful message on how to acquire the necessary build dependency.
63557  # ffi is the help tag: freetype, cups, alsa etc
63558  MISSING_DEPENDENCY=ffi
63559
63560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63561    cygwin_help $MISSING_DEPENDENCY
63562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63563    msys_help $MISSING_DEPENDENCY
63564  else
63565    PKGHANDLER_COMMAND=
63566
63567    case $PKGHANDLER in
63568      apt-get)
63569        apt_help     $MISSING_DEPENDENCY ;;
63570      yum)
63571        yum_help     $MISSING_DEPENDENCY ;;
63572      brew)
63573        brew_help    $MISSING_DEPENDENCY ;;
63574      port)
63575        port_help    $MISSING_DEPENDENCY ;;
63576      pkgutil)
63577        pkgutil_help $MISSING_DEPENDENCY ;;
63578      pkgadd)
63579        pkgadd_help  $MISSING_DEPENDENCY ;;
63580    esac
63581
63582    if test "x$PKGHANDLER_COMMAND" != x; then
63583      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63584    fi
63585  fi
63586
63587      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63588    fi
63589
63590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63591$as_echo_n "checking if libffi works... " >&6; }
63592    ac_ext=c
63593ac_cpp='$CPP $CPPFLAGS'
63594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63596ac_compiler_gnu=$ac_cv_c_compiler_gnu
63597
63598    OLD_CFLAGS="$CFLAGS"
63599    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63600    OLD_LIBS="$LIBS"
63601    LIBS="$LIBS $LIBFFI_LIBS"
63602    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63603/* end confdefs.h.  */
63604#include <ffi.h>
63605int
63606main ()
63607{
63608
63609          ffi_call(NULL, NULL, NULL, NULL);
63610          return 0;
63611
63612  ;
63613  return 0;
63614}
63615_ACEOF
63616if ac_fn_c_try_link "$LINENO"; then :
63617  LIBFFI_WORKS=yes
63618else
63619  LIBFFI_WORKS=no
63620
63621fi
63622rm -f core conftest.err conftest.$ac_objext \
63623    conftest$ac_exeext conftest.$ac_ext
63624    CFLAGS="$OLD_CFLAGS"
63625    LIBS="$OLD_LIBS"
63626    ac_ext=cpp
63627ac_cpp='$CXXCPP $CPPFLAGS'
63628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63631
63632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63633$as_echo "$LIBFFI_WORKS" >&6; }
63634
63635    if test "x$LIBFFI_WORKS" = xno; then
63636
63637  # Print a helpful message on how to acquire the necessary build dependency.
63638  # ffi is the help tag: freetype, cups, alsa etc
63639  MISSING_DEPENDENCY=ffi
63640
63641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63642    cygwin_help $MISSING_DEPENDENCY
63643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63644    msys_help $MISSING_DEPENDENCY
63645  else
63646    PKGHANDLER_COMMAND=
63647
63648    case $PKGHANDLER in
63649      apt-get)
63650        apt_help     $MISSING_DEPENDENCY ;;
63651      yum)
63652        yum_help     $MISSING_DEPENDENCY ;;
63653      brew)
63654        brew_help    $MISSING_DEPENDENCY ;;
63655      port)
63656        port_help    $MISSING_DEPENDENCY ;;
63657      pkgutil)
63658        pkgutil_help $MISSING_DEPENDENCY ;;
63659      pkgadd)
63660        pkgadd_help  $MISSING_DEPENDENCY ;;
63661    esac
63662
63663    if test "x$PKGHANDLER_COMMAND" != x; then
63664      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63665    fi
63666  fi
63667
63668      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63669    fi
63670
63671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63672$as_echo_n "checking if libffi should be bundled... " >&6; }
63673    if test "x$enable_libffi_bundling" = "x"; then
63674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63675$as_echo "no" >&6; }
63676      ENABLE_LIBFFI_BUNDLING=false
63677    elif  test "x$enable_libffi_bundling" = "xno"; then
63678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63679$as_echo "no, forced" >&6; }
63680      ENABLE_LIBFFI_BUNDLING=false
63681    elif  test "x$enable_libffi_bundling" = "xyes"; then
63682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63683$as_echo "yes, forced" >&6; }
63684      ENABLE_LIBFFI_BUNDLING=true
63685    else
63686      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63687    fi
63688
63689    # Find the libffi.so.X to bundle
63690    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63692$as_echo_n "checking for libffi lib file location... " >&6; }
63693      if test "x${LIBFFI_LIB_PATH}" != x; then
63694        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63695          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63696        else
63697          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63698        fi
63699      else
63700        # If we don't have an explicit path, look in a few obvious places
63701        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63702          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63703            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63704          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63705            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63706          else
63707            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63708          fi
63709        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63710          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63711            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63712          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63713            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63714          else
63715            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63716          fi
63717        else
63718          # Fallback on the default /usr/lib dir
63719          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63720            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63721          else
63722            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63723          fi
63724        fi
63725      fi
63726      # Make sure the wildcard is evaluated
63727      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63729$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63730    fi
63731  fi
63732
63733
63734
63735
63736
63737
63738
63739  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63740    # Extract the first word of "llvm-config", so it can be a program name with args.
63741set dummy llvm-config; ac_word=$2
63742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63743$as_echo_n "checking for $ac_word... " >&6; }
63744if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63745  $as_echo_n "(cached) " >&6
63746else
63747  if test -n "$LLVM_CONFIG"; then
63748  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63749else
63750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63751for as_dir in $PATH
63752do
63753  IFS=$as_save_IFS
63754  test -z "$as_dir" && as_dir=.
63755    for ac_exec_ext in '' $ac_executable_extensions; do
63756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63757    ac_cv_prog_LLVM_CONFIG="llvm-config"
63758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63759    break 2
63760  fi
63761done
63762  done
63763IFS=$as_save_IFS
63764
63765fi
63766fi
63767LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63768if test -n "$LLVM_CONFIG"; then
63769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63770$as_echo "$LLVM_CONFIG" >&6; }
63771else
63772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63773$as_echo "no" >&6; }
63774fi
63775
63776
63777
63778    if test "x$LLVM_CONFIG" != xllvm-config; then
63779      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63780    fi
63781
63782    llvm_components="jit mcjit engine nativecodegen native"
63783    unset LLVM_CFLAGS
63784    for flag in $("$LLVM_CONFIG" --cxxflags); do
63785      if echo "${flag}" | grep -q '^-[ID]'; then
63786        if test "${flag}" != "-D_DEBUG" ; then
63787          if test "${LLVM_CFLAGS}" != "" ; then
63788            LLVM_CFLAGS="${LLVM_CFLAGS} "
63789          fi
63790          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63791        fi
63792      fi
63793    done
63794    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63795    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63796
63797    unset LLVM_LDFLAGS
63798    for flag in $("${LLVM_CONFIG}" --ldflags); do
63799      if echo "${flag}" | grep -q '^-L'; then
63800        if test "${LLVM_LDFLAGS}" != ""; then
63801          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63802        fi
63803        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63804      fi
63805    done
63806
63807    unset LLVM_LIBS
63808    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63809      if echo "${flag}" | grep -q '^-l'; then
63810        if test "${LLVM_LIBS}" != ""; then
63811          LLVM_LIBS="${LLVM_LIBS} "
63812        fi
63813        LLVM_LIBS="${LLVM_LIBS}${flag}"
63814      fi
63815    done
63816
63817    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63818    # always properly detect -ltinfo
63819    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63820
63821
63822
63823
63824  fi
63825
63826
63827
63828# Check whether --with-libjpeg was given.
63829if test "${with_libjpeg+set}" = set; then :
63830  withval=$with_libjpeg;
63831fi
63832
63833
63834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63835$as_echo_n "checking for which libjpeg to use... " >&6; }
63836  # default is bundled
63837  DEFAULT_LIBJPEG=bundled
63838  # if user didn't specify, use DEFAULT_LIBJPEG
63839  if test "x${with_libjpeg}" = "x"; then
63840    with_libjpeg=${DEFAULT_LIBJPEG}
63841  fi
63842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63843$as_echo "${with_libjpeg}" >&6; }
63844
63845  if test "x${with_libjpeg}" = "xbundled"; then
63846    USE_EXTERNAL_LIBJPEG=false
63847  elif test "x${with_libjpeg}" = "xsystem"; then
63848    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63849if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63850
63851else
63852   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63853fi
63854
63855
63856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63857$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63858if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63859  $as_echo_n "(cached) " >&6
63860else
63861  ac_check_lib_save_LIBS=$LIBS
63862LIBS="-ljpeg  $LIBS"
63863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63864/* end confdefs.h.  */
63865
63866/* Override any GCC internal prototype to avoid an error.
63867   Use char because int might match the return type of a GCC
63868   builtin and then its argument prototype would still apply.  */
63869#ifdef __cplusplus
63870extern "C"
63871#endif
63872char jpeg_CreateDecompress ();
63873int
63874main ()
63875{
63876return jpeg_CreateDecompress ();
63877  ;
63878  return 0;
63879}
63880_ACEOF
63881if ac_fn_cxx_try_link "$LINENO"; then :
63882  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63883else
63884  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63885fi
63886rm -f core conftest.err conftest.$ac_objext \
63887    conftest$ac_exeext conftest.$ac_ext
63888LIBS=$ac_check_lib_save_LIBS
63889fi
63890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63891$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63892if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63893  cat >>confdefs.h <<_ACEOF
63894#define HAVE_LIBJPEG 1
63895_ACEOF
63896
63897  LIBS="-ljpeg $LIBS"
63898
63899else
63900   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63901fi
63902
63903
63904    USE_EXTERNAL_LIBJPEG=true
63905  else
63906    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63907  fi
63908
63909
63910
63911
63912
63913# Check whether --with-giflib was given.
63914if test "${with_giflib+set}" = set; then :
63915  withval=$with_giflib;
63916fi
63917
63918
63919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63920$as_echo_n "checking for which giflib to use... " >&6; }
63921  # default is bundled
63922  DEFAULT_GIFLIB=bundled
63923  # if user didn't specify, use DEFAULT_GIFLIB
63924  if test "x${with_giflib}" = "x"; then
63925    with_giflib=${DEFAULT_GIFLIB}
63926  fi
63927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63928$as_echo "${with_giflib}" >&6; }
63929
63930  if test "x${with_giflib}" = "xbundled"; then
63931    USE_EXTERNAL_LIBGIF=false
63932  elif test "x${with_giflib}" = "xsystem"; then
63933    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63934if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63935
63936else
63937   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63938fi
63939
63940
63941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63942$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63943if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63944  $as_echo_n "(cached) " >&6
63945else
63946  ac_check_lib_save_LIBS=$LIBS
63947LIBS="-lgif  $LIBS"
63948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63949/* end confdefs.h.  */
63950
63951/* Override any GCC internal prototype to avoid an error.
63952   Use char because int might match the return type of a GCC
63953   builtin and then its argument prototype would still apply.  */
63954#ifdef __cplusplus
63955extern "C"
63956#endif
63957char DGifGetCode ();
63958int
63959main ()
63960{
63961return DGifGetCode ();
63962  ;
63963  return 0;
63964}
63965_ACEOF
63966if ac_fn_cxx_try_link "$LINENO"; then :
63967  ac_cv_lib_gif_DGifGetCode=yes
63968else
63969  ac_cv_lib_gif_DGifGetCode=no
63970fi
63971rm -f core conftest.err conftest.$ac_objext \
63972    conftest$ac_exeext conftest.$ac_ext
63973LIBS=$ac_check_lib_save_LIBS
63974fi
63975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63976$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63977if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63978  cat >>confdefs.h <<_ACEOF
63979#define HAVE_LIBGIF 1
63980_ACEOF
63981
63982  LIBS="-lgif $LIBS"
63983
63984else
63985   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63986fi
63987
63988
63989    USE_EXTERNAL_LIBGIF=true
63990  else
63991    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63992  fi
63993
63994
63995
63996
63997
63998# Check whether --with-libpng was given.
63999if test "${with_libpng+set}" = set; then :
64000  withval=$with_libpng;
64001fi
64002
64003
64004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64005$as_echo_n "checking for which libpng to use... " >&6; }
64006
64007  # default is bundled
64008  DEFAULT_LIBPNG=bundled
64009  # if user didn't specify, use DEFAULT_LIBPNG
64010  if test "x${with_libpng}" = "x"; then
64011    with_libpng=${DEFAULT_LIBPNG}
64012  fi
64013
64014  if test "x${with_libpng}" = "xbundled"; then
64015    USE_EXTERNAL_LIBPNG=false
64016    PNG_CFLAGS=""
64017    PNG_LIBS=""
64018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64019$as_echo "bundled" >&6; }
64020  elif test "x${with_libpng}" = "xsystem"; then
64021
64022pkg_failed=no
64023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64024$as_echo_n "checking for PNG... " >&6; }
64025
64026if test -n "$PNG_CFLAGS"; then
64027    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64028 elif test -n "$PKG_CONFIG"; then
64029    if test -n "$PKG_CONFIG" && \
64030    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64031  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64032  ac_status=$?
64033  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64034  test $ac_status = 0; }; then
64035  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64036else
64037  pkg_failed=yes
64038fi
64039 else
64040    pkg_failed=untried
64041fi
64042if test -n "$PNG_LIBS"; then
64043    pkg_cv_PNG_LIBS="$PNG_LIBS"
64044 elif test -n "$PKG_CONFIG"; then
64045    if test -n "$PKG_CONFIG" && \
64046    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64047  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64048  ac_status=$?
64049  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64050  test $ac_status = 0; }; then
64051  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64052else
64053  pkg_failed=yes
64054fi
64055 else
64056    pkg_failed=untried
64057fi
64058
64059
64060
64061if test $pkg_failed = yes; then
64062
64063if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64064        _pkg_short_errors_supported=yes
64065else
64066        _pkg_short_errors_supported=no
64067fi
64068        if test $_pkg_short_errors_supported = yes; then
64069	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64070        else
64071	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64072        fi
64073	# Put the nasty error message in config.log where it belongs
64074	echo "$PNG_PKG_ERRORS" >&5
64075
64076	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64077$as_echo "no" >&6; }
64078                LIBPNG_FOUND=no
64079elif test $pkg_failed = untried; then
64080	LIBPNG_FOUND=no
64081else
64082	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64083	PNG_LIBS=$pkg_cv_PNG_LIBS
64084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64085$as_echo "yes" >&6; }
64086	LIBPNG_FOUND=yes
64087fi
64088    if test "x${LIBPNG_FOUND}" = "xyes"; then
64089      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64090      USE_EXTERNAL_LIBPNG=true
64091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64092$as_echo "system" >&6; }
64093    else
64094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64095$as_echo "system not found" >&6; }
64096      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64097    fi
64098  else
64099    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64100  fi
64101
64102
64103
64104
64105
64106
64107
64108# Check whether --with-zlib was given.
64109if test "${with_zlib+set}" = set; then :
64110  withval=$with_zlib;
64111fi
64112
64113
64114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64115$as_echo_n "checking for compress in -lz... " >&6; }
64116if ${ac_cv_lib_z_compress+:} false; then :
64117  $as_echo_n "(cached) " >&6
64118else
64119  ac_check_lib_save_LIBS=$LIBS
64120LIBS="-lz  $LIBS"
64121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64122/* end confdefs.h.  */
64123
64124/* Override any GCC internal prototype to avoid an error.
64125   Use char because int might match the return type of a GCC
64126   builtin and then its argument prototype would still apply.  */
64127#ifdef __cplusplus
64128extern "C"
64129#endif
64130char compress ();
64131int
64132main ()
64133{
64134return compress ();
64135  ;
64136  return 0;
64137}
64138_ACEOF
64139if ac_fn_cxx_try_link "$LINENO"; then :
64140  ac_cv_lib_z_compress=yes
64141else
64142  ac_cv_lib_z_compress=no
64143fi
64144rm -f core conftest.err conftest.$ac_objext \
64145    conftest$ac_exeext conftest.$ac_ext
64146LIBS=$ac_check_lib_save_LIBS
64147fi
64148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64149$as_echo "$ac_cv_lib_z_compress" >&6; }
64150if test "x$ac_cv_lib_z_compress" = xyes; then :
64151   ZLIB_FOUND=yes
64152else
64153   ZLIB_FOUND=no
64154fi
64155
64156
64157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64158$as_echo_n "checking for which zlib to use... " >&6; }
64159
64160  DEFAULT_ZLIB=system
64161  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64162    # On windows default is bundled...on others default is system
64163    DEFAULT_ZLIB=bundled
64164  fi
64165
64166  if test "x${ZLIB_FOUND}" != "xyes"; then
64167    # If we don't find any system...set default to bundled
64168    DEFAULT_ZLIB=bundled
64169  fi
64170
64171  # If user didn't specify, use DEFAULT_ZLIB
64172  if test "x${with_zlib}" = "x"; then
64173    with_zlib=${DEFAULT_ZLIB}
64174  fi
64175
64176  if test "x${with_zlib}" = "xbundled"; then
64177    USE_EXTERNAL_LIBZ=false
64178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64179$as_echo "bundled" >&6; }
64180  elif test "x${with_zlib}" = "xsystem"; then
64181    if test "x${ZLIB_FOUND}" = "xyes"; then
64182      USE_EXTERNAL_LIBZ=true
64183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64184$as_echo "system" >&6; }
64185    else
64186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64187$as_echo "system not found" >&6; }
64188      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64189    fi
64190  else
64191    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64192  fi
64193
64194
64195
64196
64197
64198# Check whether --with-lcms was given.
64199if test "${with_lcms+set}" = set; then :
64200  withval=$with_lcms;
64201fi
64202
64203
64204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64205$as_echo_n "checking for which lcms to use... " >&6; }
64206
64207  DEFAULT_LCMS=bundled
64208  # If user didn't specify, use DEFAULT_LCMS
64209  if test "x${with_lcms}" = "x"; then
64210    with_lcms=${DEFAULT_LCMS}
64211  fi
64212
64213  if test "x${with_lcms}" = "xbundled"; then
64214    USE_EXTERNAL_LCMS=false
64215    LCMS_CFLAGS=""
64216    LCMS_LIBS=""
64217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64218$as_echo "bundled" >&6; }
64219  elif test "x${with_lcms}" = "xsystem"; then
64220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64221$as_echo "system" >&6; }
64222
64223pkg_failed=no
64224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64225$as_echo_n "checking for LCMS... " >&6; }
64226
64227if test -n "$LCMS_CFLAGS"; then
64228    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64229 elif test -n "$PKG_CONFIG"; then
64230    if test -n "$PKG_CONFIG" && \
64231    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64232  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64233  ac_status=$?
64234  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64235  test $ac_status = 0; }; then
64236  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64237else
64238  pkg_failed=yes
64239fi
64240 else
64241    pkg_failed=untried
64242fi
64243if test -n "$LCMS_LIBS"; then
64244    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64245 elif test -n "$PKG_CONFIG"; then
64246    if test -n "$PKG_CONFIG" && \
64247    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64248  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64249  ac_status=$?
64250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64251  test $ac_status = 0; }; then
64252  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64253else
64254  pkg_failed=yes
64255fi
64256 else
64257    pkg_failed=untried
64258fi
64259
64260
64261
64262if test $pkg_failed = yes; then
64263
64264if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64265        _pkg_short_errors_supported=yes
64266else
64267        _pkg_short_errors_supported=no
64268fi
64269        if test $_pkg_short_errors_supported = yes; then
64270	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64271        else
64272	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64273        fi
64274	# Put the nasty error message in config.log where it belongs
64275	echo "$LCMS_PKG_ERRORS" >&5
64276
64277	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64278$as_echo "no" >&6; }
64279                LCMS_FOUND=no
64280elif test $pkg_failed = untried; then
64281	LCMS_FOUND=no
64282else
64283	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64284	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64286$as_echo "yes" >&6; }
64287	LCMS_FOUND=yes
64288fi
64289    if test "x${LCMS_FOUND}" = "xyes"; then
64290      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64291      USE_EXTERNAL_LCMS=true
64292    else
64293      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64294    fi
64295  else
64296    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64297  fi
64298
64299
64300
64301
64302
64303
64304
64305
64306
64307
64308
64309
64310
64311  # Setup libm (the maths library)
64312  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64314$as_echo_n "checking for cos in -lm... " >&6; }
64315if ${ac_cv_lib_m_cos+:} false; then :
64316  $as_echo_n "(cached) " >&6
64317else
64318  ac_check_lib_save_LIBS=$LIBS
64319LIBS="-lm  $LIBS"
64320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64321/* end confdefs.h.  */
64322
64323/* Override any GCC internal prototype to avoid an error.
64324   Use char because int might match the return type of a GCC
64325   builtin and then its argument prototype would still apply.  */
64326#ifdef __cplusplus
64327extern "C"
64328#endif
64329char cos ();
64330int
64331main ()
64332{
64333return cos ();
64334  ;
64335  return 0;
64336}
64337_ACEOF
64338if ac_fn_cxx_try_link "$LINENO"; then :
64339  ac_cv_lib_m_cos=yes
64340else
64341  ac_cv_lib_m_cos=no
64342fi
64343rm -f core conftest.err conftest.$ac_objext \
64344    conftest$ac_exeext conftest.$ac_ext
64345LIBS=$ac_check_lib_save_LIBS
64346fi
64347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64348$as_echo "$ac_cv_lib_m_cos" >&6; }
64349if test "x$ac_cv_lib_m_cos" = xyes; then :
64350  cat >>confdefs.h <<_ACEOF
64351#define HAVE_LIBM 1
64352_ACEOF
64353
64354  LIBS="-lm $LIBS"
64355
64356else
64357
64358        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64359$as_echo "$as_me: Maths library was not found" >&6;}
64360
64361fi
64362
64363    LIBM="-lm"
64364  else
64365    LIBM=""
64366  fi
64367
64368
64369  # Setup libdl (for dynamic library loading)
64370  save_LIBS="$LIBS"
64371  LIBS=""
64372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64373$as_echo_n "checking for dlopen in -ldl... " >&6; }
64374if ${ac_cv_lib_dl_dlopen+:} false; then :
64375  $as_echo_n "(cached) " >&6
64376else
64377  ac_check_lib_save_LIBS=$LIBS
64378LIBS="-ldl  $LIBS"
64379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64380/* end confdefs.h.  */
64381
64382/* Override any GCC internal prototype to avoid an error.
64383   Use char because int might match the return type of a GCC
64384   builtin and then its argument prototype would still apply.  */
64385#ifdef __cplusplus
64386extern "C"
64387#endif
64388char dlopen ();
64389int
64390main ()
64391{
64392return dlopen ();
64393  ;
64394  return 0;
64395}
64396_ACEOF
64397if ac_fn_cxx_try_link "$LINENO"; then :
64398  ac_cv_lib_dl_dlopen=yes
64399else
64400  ac_cv_lib_dl_dlopen=no
64401fi
64402rm -f core conftest.err conftest.$ac_objext \
64403    conftest$ac_exeext conftest.$ac_ext
64404LIBS=$ac_check_lib_save_LIBS
64405fi
64406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64407$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64408if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64409  cat >>confdefs.h <<_ACEOF
64410#define HAVE_LIBDL 1
64411_ACEOF
64412
64413  LIBS="-ldl $LIBS"
64414
64415fi
64416
64417  LIBDL="$LIBS"
64418
64419  LIBS="$save_LIBS"
64420
64421  # Deprecated libraries, keep the flags for backwards compatibility
64422  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64423
64424
64425# Check whether --with-dxsdk was given.
64426if test "${with_dxsdk+set}" = set; then :
64427  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64428$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64429fi
64430
64431
64432
64433
64434# Check whether --with-dxsdk-lib was given.
64435if test "${with_dxsdk_lib+set}" = set; then :
64436  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64437$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64438fi
64439
64440
64441
64442
64443# Check whether --with-dxsdk-include was given.
64444if test "${with_dxsdk_include+set}" = set; then :
64445  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64446$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64447fi
64448
64449
64450  fi
64451
64452  # Control if libzip can use mmap. Available for purposes of overriding.
64453  LIBZIP_CAN_USE_MMAP=true
64454
64455
64456
64457  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64458    # Find the root of the Solaris Studio installation from the compiler path
64459    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64460    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64462$as_echo_n "checking for libstlport.so.1... " >&6; }
64463    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64464      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64465      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64466    fi
64467    if test -f "$STLPORT_LIB"; then
64468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64469$as_echo "yes, $STLPORT_LIB" >&6; }
64470
64471  # Only process if variable expands to non-empty
64472
64473  if test "x$STLPORT_LIB" != x; then
64474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64475
64476  # Input might be given as Windows format, start by converting to
64477  # unix format.
64478  path="$STLPORT_LIB"
64479  new_path=`$CYGPATH -u "$path"`
64480
64481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64484  # "foo.exe" is OK but "foo" is an error.
64485  #
64486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64487  # It is also a way to make sure we got the proper file name for the real test later on.
64488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64489  if test "x$test_shortpath" = x; then
64490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64491$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64492    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64493  fi
64494
64495  # Call helper function which possibly converts this using DOS-style short mode.
64496  # If so, the updated path is stored in $new_path.
64497
64498  input_path="$new_path"
64499  # Check if we need to convert this using DOS-style short mode. If the path
64500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64501  # take no chances and rewrite it.
64502  # Note: m4 eats our [], so we need to use [ and ] instead.
64503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64504  if test "x$has_forbidden_chars" != x; then
64505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64509      # Going to short mode and back again did indeed matter. Since short mode is
64510      # case insensitive, let's make it lowercase to improve readability.
64511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64512      # Now convert it back to Unix-style (cygpath)
64513      input_path=`$CYGPATH -u "$shortmode_path"`
64514      new_path="$input_path"
64515    fi
64516  fi
64517
64518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64519  if test "x$test_cygdrive_prefix" = x; then
64520    # As a simple fix, exclude /usr/bin since it's not a real path.
64521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64523      # a path prefixed by /cygdrive for fixpath to work.
64524      new_path="$CYGWIN_ROOT_PATH$input_path"
64525    fi
64526  fi
64527
64528
64529  if test "x$path" != "x$new_path"; then
64530    STLPORT_LIB="$new_path"
64531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64532$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64533  fi
64534
64535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64536
64537  path="$STLPORT_LIB"
64538  has_colon=`$ECHO $path | $GREP ^.:`
64539  new_path="$path"
64540  if test "x$has_colon" = x; then
64541    # Not in mixed or Windows style, start by that.
64542    new_path=`cmd //c echo $path`
64543  fi
64544
64545
64546  input_path="$new_path"
64547  # Check if we need to convert this using DOS-style short mode. If the path
64548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64549  # take no chances and rewrite it.
64550  # Note: m4 eats our [], so we need to use [ and ] instead.
64551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64552  if test "x$has_forbidden_chars" != x; then
64553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64555  fi
64556
64557
64558  windows_path="$new_path"
64559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64560    unix_path=`$CYGPATH -u "$windows_path"`
64561    new_path="$unix_path"
64562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64564    new_path="$unix_path"
64565  fi
64566
64567  if test "x$path" != "x$new_path"; then
64568    STLPORT_LIB="$new_path"
64569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64570$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64571  fi
64572
64573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64575
64576    else
64577      # We're on a unix platform. Hooray! :)
64578      path="$STLPORT_LIB"
64579      has_space=`$ECHO "$path" | $GREP " "`
64580      if test "x$has_space" != x; then
64581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64582$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64584      fi
64585
64586      # Use eval to expand a potential ~
64587      eval path="$path"
64588      if test ! -f "$path" && test ! -d "$path"; then
64589        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64590      fi
64591
64592      if test -d "$path"; then
64593        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64594      else
64595        dir="`$DIRNAME "$path"`"
64596        base="`$BASENAME "$path"`"
64597        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64598      fi
64599    fi
64600  fi
64601
64602    else
64603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64604$as_echo "no, not found at $STLPORT_LIB" >&6; }
64605      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64606    fi
64607
64608  fi
64609
64610
64611
64612
64613
64614
64615
64616
64617
64618
64619
64620
64621
64622
64623# Hotspot setup depends on lib checks (AOT needs libelf).
64624
64625
64626  # The user can in some cases supply additional jvm features. For the custom
64627  # variant, this defines the entire variant.
64628
64629# Check whether --with-jvm-features was given.
64630if test "${with_jvm_features+set}" = set; then :
64631  withval=$with_jvm_features;
64632fi
64633
64634  if test "x$with_jvm_features" != x; then
64635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64636$as_echo_n "checking additional JVM features... " >&6; }
64637    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64639$as_echo "$JVM_FEATURES" >&6; }
64640  fi
64641
64642  # Override hotspot cpu definitions for ARM platforms
64643  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64644    HOTSPOT_TARGET_CPU=arm_32
64645    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64646    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64647    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64648  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64649    HOTSPOT_TARGET_CPU=arm_64
64650    HOTSPOT_TARGET_CPU_ARCH=arm
64651    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64652    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64653  fi
64654
64655  # Verify that dependencies are met for explicitly set features.
64656  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64657    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64658  fi
64659
64660  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64661    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64662  fi
64663
64664  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64665    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64666  fi
64667
64668  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64669    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64670  fi
64671
64672  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64673    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64674  fi
64675
64676  # Turn on additional features based on other parts of configure
64677  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64678    JVM_FEATURES="$JVM_FEATURES dtrace"
64679  else
64680    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64681      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64682    fi
64683  fi
64684
64685  if test "x$STATIC_BUILD" = "xtrue"; then
64686    JVM_FEATURES="$JVM_FEATURES static-build"
64687  else
64688    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64689      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64690    fi
64691  fi
64692
64693  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64694    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64695      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64696    fi
64697  fi
64698
64699  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64700    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64701      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64702    fi
64703  fi
64704
64705  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64706  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64707     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64708     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64709    JVM_FEATURES_jvmci="jvmci"
64710  else
64711    JVM_FEATURES_jvmci=""
64712  fi
64713
64714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
64715$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
64716  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64718$as_echo "yes, forced" >&6; }
64719    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64720      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64721    fi
64722    INCLUDE_GRAAL="true"
64723  else
64724    # By default enable graal build where AOT is available
64725    if test "x$ENABLE_AOT" = "xtrue"; then
64726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64727$as_echo "yes" >&6; }
64728      JVM_FEATURES_graal="graal"
64729      INCLUDE_GRAAL="true"
64730    else
64731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64732$as_echo "no" >&6; }
64733      JVM_FEATURES_graal=""
64734      INCLUDE_GRAAL="false"
64735    fi
64736  fi
64737
64738
64739
64740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64741$as_echo_n "checking if aot should be enabled... " >&6; }
64742  if test "x$ENABLE_AOT" = "xtrue"; then
64743    if test "x$enable_aot" = "xyes"; then
64744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64745$as_echo "yes, forced" >&6; }
64746    else
64747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64748$as_echo "yes" >&6; }
64749    fi
64750    JVM_FEATURES_aot="aot"
64751  else
64752    if test "x$enable_aot" = "xno"; then
64753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64754$as_echo "no, forced" >&6; }
64755    else
64756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64757$as_echo "no" >&6; }
64758    fi
64759    JVM_FEATURES_aot=""
64760  fi
64761
64762  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64763    # Default to use link time optimizations on minimal on arm
64764    JVM_FEATURES_link_time_opt="link-time-opt"
64765  else
64766    JVM_FEATURES_link_time_opt=""
64767  fi
64768
64769  # All variants but minimal (and custom) get these features
64770  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64771
64772  # Enable features depending on variant.
64773  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64774  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64775  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64776  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64777  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64778  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64779  JVM_FEATURES_custom="$JVM_FEATURES"
64780
64781
64782
64783
64784
64785
64786
64787
64788
64789  # Used for verification of Makefiles by check-jvm-feature
64790
64791
64792  # We don't support --with-jvm-interpreter anymore, use zero instead.
64793
64794
64795# Check whether --with-jvm-interpreter was given.
64796if test "${with_jvm_interpreter+set}" = set; then :
64797  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64798$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64799fi
64800
64801
64802
64803
64804###############################################################################
64805#
64806# We need to do some final tweaking, when everything else is done.
64807#
64808###############################################################################
64809
64810
64811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64812$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64813
64814  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64815    ENABLE_INTREE_EC=true
64816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64817$as_echo "yes" >&6; }
64818  else
64819    ENABLE_INTREE_EC=false
64820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64821$as_echo "no" >&6; }
64822  fi
64823
64824
64825
64826
64827  # Check whether --enable-jtreg-failure-handler was given.
64828if test "${enable_jtreg_failure_handler+set}" = set; then :
64829  enableval=$enable_jtreg_failure_handler;
64830fi
64831
64832
64833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64834$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64835
64836  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64837    if test "x$JT_HOME" = "x"; then
64838      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64839    else
64840      BUILD_FAILURE_HANDLER=true
64841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64842$as_echo "yes, forced" >&6; }
64843    fi
64844  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64845    BUILD_FAILURE_HANDLER=false
64846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64847$as_echo "no, forced" >&6; }
64848  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64849      || test "x$enable_jtreg_failure_handler" = "x"; then
64850    if test "x$JT_HOME" = "x"; then
64851      BUILD_FAILURE_HANDLER=false
64852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64853$as_echo "no, missing jtreg" >&6; }
64854    else
64855      BUILD_FAILURE_HANDLER=true
64856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64857$as_echo "yes, jtreg present" >&6; }
64858    fi
64859  else
64860    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64861  fi
64862
64863
64864
64865
64866  # Check whether --enable-generate-classlist was given.
64867if test "${enable_generate_classlist+set}" = set; then :
64868  enableval=$enable_generate_classlist;
64869fi
64870
64871
64872  # Check if it's likely that it's possible to generate the classlist. Depending
64873  # on exact jvm configuration it could be possible anyway.
64874  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64875    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64876  else
64877    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64878  fi
64879
64880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64881$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64882  if test "x$enable_generate_classlist" = "xyes"; then
64883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64884$as_echo "yes, forced" >&6; }
64885    ENABLE_GENERATE_CLASSLIST="true"
64886    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64887      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64888$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64889    fi
64890  elif test "x$enable_generate_classlist" = "xno"; then
64891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64892$as_echo "no, forced" >&6; }
64893    ENABLE_GENERATE_CLASSLIST="false"
64894  elif test "x$enable_generate_classlist" = "x"; then
64895    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64897$as_echo "yes" >&6; }
64898      ENABLE_GENERATE_CLASSLIST="true"
64899    else
64900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64901$as_echo "no" >&6; }
64902      ENABLE_GENERATE_CLASSLIST="false"
64903    fi
64904  else
64905    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64906  fi
64907
64908
64909
64910
64911###############################################################################
64912#
64913# Configure parts of the build that only affect the build performance,
64914# not the result.
64915#
64916###############################################################################
64917
64918
64919  # How many cores do we have on this build system?
64920
64921# Check whether --with-num-cores was given.
64922if test "${with_num_cores+set}" = set; then :
64923  withval=$with_num_cores;
64924fi
64925
64926  if test "x$with_num_cores" = x; then
64927    # The number of cores were not specified, try to probe them.
64928
64929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64930$as_echo_n "checking for number of cores... " >&6; }
64931  NUM_CORES=1
64932  FOUND_CORES=no
64933
64934  if test -f /proc/cpuinfo; then
64935    # Looks like a Linux (or cygwin) system
64936    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64937    FOUND_CORES=yes
64938  elif test -x /usr/sbin/psrinfo; then
64939    # Looks like a Solaris system
64940    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64941    FOUND_CORES=yes
64942  elif test -x /usr/sbin/sysctl; then
64943    # Looks like a MacOSX system
64944    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64945    FOUND_CORES=yes
64946  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64947    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64948    FOUND_CORES=yes
64949  elif test -n "$NUMBER_OF_PROCESSORS"; then
64950    # On windows, look in the env
64951    NUM_CORES=$NUMBER_OF_PROCESSORS
64952    FOUND_CORES=yes
64953  fi
64954
64955  if test "x$FOUND_CORES" = xyes; then
64956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64957$as_echo "$NUM_CORES" >&6; }
64958  else
64959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64960$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64961    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64962$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64963  fi
64964
64965  else
64966    NUM_CORES=$with_num_cores
64967  fi
64968
64969
64970
64971  # How much memory do we have on this build system?
64972
64973# Check whether --with-memory-size was given.
64974if test "${with_memory_size+set}" = set; then :
64975  withval=$with_memory_size;
64976fi
64977
64978  if test "x$with_memory_size" = x; then
64979    # The memory size was not specified, try to probe it.
64980
64981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64982$as_echo_n "checking for memory size... " >&6; }
64983  # Default to 1024 MB
64984  MEMORY_SIZE=1024
64985  FOUND_MEM=no
64986
64987  if test -f /proc/meminfo; then
64988    # Looks like a Linux (or cygwin) system
64989    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64990    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64991    FOUND_MEM=yes
64992  elif test -x /usr/sbin/prtconf; then
64993    # Looks like a Solaris or AIX system
64994    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64995    FOUND_MEM=yes
64996  elif test -x /usr/sbin/sysctl; then
64997    # Looks like a MacOSX system
64998    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64999    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65000    FOUND_MEM=yes
65001  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65002    # Windows, but without cygwin
65003    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65004    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65005    FOUND_MEM=yes
65006  fi
65007
65008  if test "x$FOUND_MEM" = xyes; then
65009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65010$as_echo "$MEMORY_SIZE MB" >&6; }
65011  else
65012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65013$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65014    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65015$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65016  fi
65017
65018  else
65019    MEMORY_SIZE=$with_memory_size
65020  fi
65021
65022
65023
65024  # Provide a decent default number of parallel jobs for make depending on
65025  # number of cores, amount of memory and machine architecture.
65026
65027# Check whether --with-jobs was given.
65028if test "${with_jobs+set}" = set; then :
65029  withval=$with_jobs;
65030fi
65031
65032  if test "x$with_jobs" = x; then
65033    # Number of jobs was not specified, calculate.
65034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65035$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65036    # Approximate memory in GB.
65037    memory_gb=`expr $MEMORY_SIZE / 1024`
65038    # Pick the lowest of memory in gb and number of cores.
65039    if test "$memory_gb" -lt "$NUM_CORES"; then
65040      JOBS="$memory_gb"
65041    else
65042      JOBS="$NUM_CORES"
65043    fi
65044    if test "$JOBS" -eq "0"; then
65045      JOBS=1
65046    fi
65047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65048$as_echo "$JOBS" >&6; }
65049  else
65050    JOBS=$with_jobs
65051  fi
65052
65053
65054
65055  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65056
65057# Check whether --with-test-jobs was given.
65058if test "${with_test_jobs+set}" = set; then :
65059  withval=$with_test_jobs;
65060fi
65061
65062  if test "x$with_test_jobs" = x; then
65063      TEST_JOBS=0
65064  else
65065      TEST_JOBS=$with_test_jobs
65066  fi
65067
65068
65069
65070# Setup arguments for the boot jdk (after cores and memory have been setup)
65071
65072  ##############################################################################
65073  #
65074  # Specify jvm options for anything that is run with the Boot JDK.
65075  # Not all JVM:s accept the same arguments on the command line.
65076  #
65077
65078# Check whether --with-boot-jdk-jvmargs was given.
65079if test "${with_boot_jdk_jvmargs+set}" = set; then :
65080  withval=$with_boot_jdk_jvmargs;
65081fi
65082
65083
65084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65085$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65086
65087  # Disable special log output when a debug build is used as Boot JDK...
65088
65089  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65090  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65091  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65092  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65093  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65094  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65095    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65096    JVM_ARG_OK=true
65097  else
65098    $ECHO "Arg failed:" >&5
65099    $ECHO "$OUTPUT" >&5
65100    JVM_ARG_OK=false
65101  fi
65102
65103
65104  # Force en-US environment
65105
65106  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65107  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65108  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65109  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65110  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65111  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65112    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65113    JVM_ARG_OK=true
65114  else
65115    $ECHO "Arg failed:" >&5
65116    $ECHO "$OUTPUT" >&5
65117    JVM_ARG_OK=false
65118  fi
65119
65120
65121  # Apply user provided options.
65122
65123  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65124  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65125  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65126  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65127  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65128  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65129    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65130    JVM_ARG_OK=true
65131  else
65132    $ECHO "Arg failed:" >&5
65133    $ECHO "$OUTPUT" >&5
65134    JVM_ARG_OK=false
65135  fi
65136
65137
65138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65139$as_echo "$boot_jdk_jvmargs" >&6; }
65140
65141  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65142  JAVA_FLAGS=$boot_jdk_jvmargs
65143
65144
65145
65146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65147$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65148
65149  # Starting amount of heap memory.
65150
65151  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65152  $ECHO "Command: $JAVA -Xms64M -version" >&5
65153  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65154  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65155  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65156  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65157    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65158    JVM_ARG_OK=true
65159  else
65160    $ECHO "Arg failed:" >&5
65161    $ECHO "$OUTPUT" >&5
65162    JVM_ARG_OK=false
65163  fi
65164
65165  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65166
65167  # Maximum amount of heap memory and stack size.
65168  JVM_HEAP_LIMIT_32="1024"
65169  # Running a 64 bit JVM allows for and requires a bigger heap
65170  JVM_HEAP_LIMIT_64="1600"
65171  STACK_SIZE_32=768
65172  STACK_SIZE_64=1536
65173  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65174  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65175    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65176  fi
65177  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65178    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65179  fi
65180  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65181    JVM_HEAP_LIMIT_32=512
65182    JVM_HEAP_LIMIT_64=512
65183  fi
65184
65185  if test "x$BOOT_JDK_BITS" = "x32"; then
65186    STACK_SIZE=$STACK_SIZE_32
65187    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65188  else
65189    STACK_SIZE=$STACK_SIZE_64
65190    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65191  fi
65192
65193  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65194  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65195  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65196  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65197  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65198  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65199    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65200    JVM_ARG_OK=true
65201  else
65202    $ECHO "Arg failed:" >&5
65203    $ECHO "$OUTPUT" >&5
65204    JVM_ARG_OK=false
65205  fi
65206
65207
65208  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65209  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65210  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65211  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65212  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65213  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65214    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65215    JVM_ARG_OK=true
65216  else
65217    $ECHO "Arg failed:" >&5
65218    $ECHO "$OUTPUT" >&5
65219    JVM_ARG_OK=false
65220  fi
65221
65222
65223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65224$as_echo "$boot_jdk_jvmargs_big" >&6; }
65225
65226  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65227
65228
65229  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65230    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65231    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65232  else
65233    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65234    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65235  fi
65236  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65237  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65239$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65241$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65242
65243
65244  # By default, the main javac compilations use big
65245  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65246
65247
65248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65249$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65250
65251  # Use serial gc for small short lived tools if possible
65252
65253  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65254  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65255  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65256  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65257  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65258  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65259    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65260    JVM_ARG_OK=true
65261  else
65262    $ECHO "Arg failed:" >&5
65263    $ECHO "$OUTPUT" >&5
65264    JVM_ARG_OK=false
65265  fi
65266
65267
65268  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65269  $ECHO "Command: $JAVA -Xms32M -version" >&5
65270  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65271  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65272  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65273  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65274    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65275    JVM_ARG_OK=true
65276  else
65277    $ECHO "Arg failed:" >&5
65278    $ECHO "$OUTPUT" >&5
65279    JVM_ARG_OK=false
65280  fi
65281
65282
65283  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65284  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65285  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65286  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65287  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65288  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65289    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65290    JVM_ARG_OK=true
65291  else
65292    $ECHO "Arg failed:" >&5
65293    $ECHO "$OUTPUT" >&5
65294    JVM_ARG_OK=false
65295  fi
65296
65297
65298  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65299  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65300  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65301  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65302  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65303  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65304    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65305    JVM_ARG_OK=true
65306  else
65307    $ECHO "Arg failed:" >&5
65308    $ECHO "$OUTPUT" >&5
65309    JVM_ARG_OK=false
65310  fi
65311
65312
65313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65314$as_echo "$boot_jdk_jvmargs_small" >&6; }
65315
65316  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65317
65318
65319  JAVA_TOOL_FLAGS_SMALL=""
65320  for f in $JAVA_FLAGS_SMALL; do
65321    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65322  done
65323
65324
65325
65326# Setup smart javac (after cores and memory have been setup)
65327
65328
65329# Check whether --with-sjavac-server-java was given.
65330if test "${with_sjavac_server_java+set}" = set; then :
65331  withval=$with_sjavac_server_java;
65332fi
65333
65334
65335  if test "x$with_sjavac_server_java" != x; then
65336    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65337    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65338    if test "x$FOUND_VERSION" = x; then
65339      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65340    fi
65341  else
65342    SJAVAC_SERVER_JAVA="$JAVA"
65343  fi
65344
65345
65346  if test "$MEMORY_SIZE" -gt "3000"; then
65347
65348  $ECHO "Check if jvm arg is ok: -d64" >&5
65349  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65350  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65351  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65352  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65353  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65354    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65355    JVM_ARG_OK=true
65356  else
65357    $ECHO "Arg failed:" >&5
65358    $ECHO "$OUTPUT" >&5
65359    JVM_ARG_OK=false
65360  fi
65361
65362    if test "$JVM_ARG_OK" = true; then
65363      JVM_64BIT=true
65364      JVM_ARG_OK=false
65365    fi
65366  fi
65367
65368  MX_VALUE=`expr $MEMORY_SIZE / 2`
65369  if test "$JVM_64BIT" = true; then
65370    # Set ms lower than mx since more than one instance of the server might
65371    # get launched at the same time before they figure out which instance won.
65372    MS_VALUE=512
65373    if test "$MX_VALUE" -gt "2048"; then
65374      MX_VALUE=2048
65375    fi
65376  else
65377    MS_VALUE=256
65378    if test "$MX_VALUE" -gt "1500"; then
65379      MX_VALUE=1500
65380    fi
65381  fi
65382  if test "$MX_VALUE" -lt "512"; then
65383    MX_VALUE=512
65384  fi
65385
65386  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65387  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65388  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65389  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65390  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65391  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65392    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65393    JVM_ARG_OK=true
65394  else
65395    $ECHO "Arg failed:" >&5
65396    $ECHO "$OUTPUT" >&5
65397    JVM_ARG_OK=false
65398  fi
65399
65400
65401
65402  # Check whether --enable-sjavac was given.
65403if test "${enable_sjavac+set}" = set; then :
65404  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65405else
65406  ENABLE_SJAVAC="no"
65407fi
65408
65409  if test "x$JVM_ARG_OK" = "xfalse"; then
65410    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65411$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65412    ENABLE_SJAVAC="no"
65413  fi
65414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65415$as_echo_n "checking whether to use sjavac... " >&6; }
65416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65417$as_echo "$ENABLE_SJAVAC" >&6; }
65418
65419
65420  # Check whether --enable-javac-server was given.
65421if test "${enable_javac_server+set}" = set; then :
65422  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65423else
65424  ENABLE_JAVAC_SERVER="yes"
65425fi
65426
65427  if test "x$JVM_ARG_OK" = "xfalse"; then
65428    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65429$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65430    ENABLE_JAVAC_SERVER="no"
65431  fi
65432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65433$as_echo_n "checking whether to use javac server... " >&6; }
65434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65435$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65436
65437
65438  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65439    # When using a server javac, the small client instances do not need much
65440    # resources.
65441    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65442  fi
65443
65444
65445# Setup use of icecc if requested
65446
65447  # Check whether --enable-icecc was given.
65448if test "${enable_icecc+set}" = set; then :
65449  enableval=$enable_icecc;
65450fi
65451
65452
65453  if test "x${enable_icecc}" = "xyes"; then
65454
65455
65456
65457  # Publish this variable in the help.
65458
65459
65460  if [ -z "${ICECC_CMD+x}" ]; then
65461    # The variable is not set by user, try to locate tool using the code snippet
65462    for ac_prog in icecc
65463do
65464  # Extract the first word of "$ac_prog", so it can be a program name with args.
65465set dummy $ac_prog; ac_word=$2
65466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65467$as_echo_n "checking for $ac_word... " >&6; }
65468if ${ac_cv_path_ICECC_CMD+:} false; then :
65469  $as_echo_n "(cached) " >&6
65470else
65471  case $ICECC_CMD in
65472  [\\/]* | ?:[\\/]*)
65473  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65474  ;;
65475  *)
65476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65477for as_dir in $PATH
65478do
65479  IFS=$as_save_IFS
65480  test -z "$as_dir" && as_dir=.
65481    for ac_exec_ext in '' $ac_executable_extensions; do
65482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65483    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65485    break 2
65486  fi
65487done
65488  done
65489IFS=$as_save_IFS
65490
65491  ;;
65492esac
65493fi
65494ICECC_CMD=$ac_cv_path_ICECC_CMD
65495if test -n "$ICECC_CMD"; then
65496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65497$as_echo "$ICECC_CMD" >&6; }
65498else
65499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65500$as_echo "no" >&6; }
65501fi
65502
65503
65504  test -n "$ICECC_CMD" && break
65505done
65506
65507  else
65508    # The variable is set, but is it from the command line or the environment?
65509
65510    # Try to remove the string !ICECC_CMD! from our list.
65511    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65512    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65513      # If it failed, the variable was not from the command line. Ignore it,
65514      # but warn the user (except for BASH, which is always set by the calling BASH).
65515      if test "xICECC_CMD" != xBASH; then
65516        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65517$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65518      fi
65519      # Try to locate tool using the code snippet
65520      for ac_prog in icecc
65521do
65522  # Extract the first word of "$ac_prog", so it can be a program name with args.
65523set dummy $ac_prog; ac_word=$2
65524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65525$as_echo_n "checking for $ac_word... " >&6; }
65526if ${ac_cv_path_ICECC_CMD+:} false; then :
65527  $as_echo_n "(cached) " >&6
65528else
65529  case $ICECC_CMD in
65530  [\\/]* | ?:[\\/]*)
65531  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65532  ;;
65533  *)
65534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65535for as_dir in $PATH
65536do
65537  IFS=$as_save_IFS
65538  test -z "$as_dir" && as_dir=.
65539    for ac_exec_ext in '' $ac_executable_extensions; do
65540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65541    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65543    break 2
65544  fi
65545done
65546  done
65547IFS=$as_save_IFS
65548
65549  ;;
65550esac
65551fi
65552ICECC_CMD=$ac_cv_path_ICECC_CMD
65553if test -n "$ICECC_CMD"; then
65554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65555$as_echo "$ICECC_CMD" >&6; }
65556else
65557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65558$as_echo "no" >&6; }
65559fi
65560
65561
65562  test -n "$ICECC_CMD" && break
65563done
65564
65565    else
65566      # If it succeeded, then it was overridden by the user. We will use it
65567      # for the tool.
65568
65569      # First remove it from the list of overridden variables, so we can test
65570      # for unknown variables in the end.
65571      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65572
65573      # Check if we try to supply an empty value
65574      if test "x$ICECC_CMD" = x; then
65575        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65576$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65578$as_echo_n "checking for ICECC_CMD... " >&6; }
65579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65580$as_echo "disabled" >&6; }
65581      else
65582        # Check if the provided tool contains a complete path.
65583        tool_specified="$ICECC_CMD"
65584        tool_basename="${tool_specified##*/}"
65585        if test "x$tool_basename" = "x$tool_specified"; then
65586          # A command without a complete path is provided, search $PATH.
65587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65588$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65589          # Extract the first word of "$tool_basename", so it can be a program name with args.
65590set dummy $tool_basename; ac_word=$2
65591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65592$as_echo_n "checking for $ac_word... " >&6; }
65593if ${ac_cv_path_ICECC_CMD+:} false; then :
65594  $as_echo_n "(cached) " >&6
65595else
65596  case $ICECC_CMD in
65597  [\\/]* | ?:[\\/]*)
65598  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65599  ;;
65600  *)
65601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65602for as_dir in $PATH
65603do
65604  IFS=$as_save_IFS
65605  test -z "$as_dir" && as_dir=.
65606    for ac_exec_ext in '' $ac_executable_extensions; do
65607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65608    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65610    break 2
65611  fi
65612done
65613  done
65614IFS=$as_save_IFS
65615
65616  ;;
65617esac
65618fi
65619ICECC_CMD=$ac_cv_path_ICECC_CMD
65620if test -n "$ICECC_CMD"; then
65621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65622$as_echo "$ICECC_CMD" >&6; }
65623else
65624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65625$as_echo "no" >&6; }
65626fi
65627
65628
65629          if test "x$ICECC_CMD" = x; then
65630            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65631          fi
65632        else
65633          # Otherwise we believe it is a complete path. Use it as it is.
65634          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65635$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65636          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65637$as_echo_n "checking for ICECC_CMD... " >&6; }
65638          if test ! -x "$tool_specified"; then
65639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65640$as_echo "not found" >&6; }
65641            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65642          fi
65643          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65644$as_echo "$tool_specified" >&6; }
65645        fi
65646      fi
65647    fi
65648
65649  fi
65650
65651
65652
65653  if test "x$ICECC_CMD" = x; then
65654    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65655  fi
65656
65657
65658    old_path="$PATH"
65659
65660    # Look for icecc-create-env in some known places
65661    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65662
65663
65664
65665  # Publish this variable in the help.
65666
65667
65668  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65669    # The variable is not set by user, try to locate tool using the code snippet
65670    for ac_prog in icecc-create-env
65671do
65672  # Extract the first word of "$ac_prog", so it can be a program name with args.
65673set dummy $ac_prog; ac_word=$2
65674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65675$as_echo_n "checking for $ac_word... " >&6; }
65676if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65677  $as_echo_n "(cached) " >&6
65678else
65679  case $ICECC_CREATE_ENV in
65680  [\\/]* | ?:[\\/]*)
65681  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65682  ;;
65683  *)
65684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65685for as_dir in $PATH
65686do
65687  IFS=$as_save_IFS
65688  test -z "$as_dir" && as_dir=.
65689    for ac_exec_ext in '' $ac_executable_extensions; do
65690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65691    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65693    break 2
65694  fi
65695done
65696  done
65697IFS=$as_save_IFS
65698
65699  ;;
65700esac
65701fi
65702ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65703if test -n "$ICECC_CREATE_ENV"; then
65704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65705$as_echo "$ICECC_CREATE_ENV" >&6; }
65706else
65707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65708$as_echo "no" >&6; }
65709fi
65710
65711
65712  test -n "$ICECC_CREATE_ENV" && break
65713done
65714
65715  else
65716    # The variable is set, but is it from the command line or the environment?
65717
65718    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65721      # If it failed, the variable was not from the command line. Ignore it,
65722      # but warn the user (except for BASH, which is always set by the calling BASH).
65723      if test "xICECC_CREATE_ENV" != xBASH; then
65724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65725$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65726      fi
65727      # Try to locate tool using the code snippet
65728      for ac_prog in icecc-create-env
65729do
65730  # Extract the first word of "$ac_prog", so it can be a program name with args.
65731set dummy $ac_prog; ac_word=$2
65732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65733$as_echo_n "checking for $ac_word... " >&6; }
65734if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65735  $as_echo_n "(cached) " >&6
65736else
65737  case $ICECC_CREATE_ENV in
65738  [\\/]* | ?:[\\/]*)
65739  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65740  ;;
65741  *)
65742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65743for as_dir in $PATH
65744do
65745  IFS=$as_save_IFS
65746  test -z "$as_dir" && as_dir=.
65747    for ac_exec_ext in '' $ac_executable_extensions; do
65748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65749    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65751    break 2
65752  fi
65753done
65754  done
65755IFS=$as_save_IFS
65756
65757  ;;
65758esac
65759fi
65760ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65761if test -n "$ICECC_CREATE_ENV"; then
65762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65763$as_echo "$ICECC_CREATE_ENV" >&6; }
65764else
65765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65766$as_echo "no" >&6; }
65767fi
65768
65769
65770  test -n "$ICECC_CREATE_ENV" && break
65771done
65772
65773    else
65774      # If it succeeded, then it was overridden by the user. We will use it
65775      # for the tool.
65776
65777      # First remove it from the list of overridden variables, so we can test
65778      # for unknown variables in the end.
65779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65780
65781      # Check if we try to supply an empty value
65782      if test "x$ICECC_CREATE_ENV" = x; then
65783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65784$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65786$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65788$as_echo "disabled" >&6; }
65789      else
65790        # Check if the provided tool contains a complete path.
65791        tool_specified="$ICECC_CREATE_ENV"
65792        tool_basename="${tool_specified##*/}"
65793        if test "x$tool_basename" = "x$tool_specified"; then
65794          # A command without a complete path is provided, search $PATH.
65795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65796$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65797          # Extract the first word of "$tool_basename", so it can be a program name with args.
65798set dummy $tool_basename; ac_word=$2
65799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65800$as_echo_n "checking for $ac_word... " >&6; }
65801if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65802  $as_echo_n "(cached) " >&6
65803else
65804  case $ICECC_CREATE_ENV in
65805  [\\/]* | ?:[\\/]*)
65806  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65807  ;;
65808  *)
65809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65810for as_dir in $PATH
65811do
65812  IFS=$as_save_IFS
65813  test -z "$as_dir" && as_dir=.
65814    for ac_exec_ext in '' $ac_executable_extensions; do
65815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65816    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65818    break 2
65819  fi
65820done
65821  done
65822IFS=$as_save_IFS
65823
65824  ;;
65825esac
65826fi
65827ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65828if test -n "$ICECC_CREATE_ENV"; then
65829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65830$as_echo "$ICECC_CREATE_ENV" >&6; }
65831else
65832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65833$as_echo "no" >&6; }
65834fi
65835
65836
65837          if test "x$ICECC_CREATE_ENV" = x; then
65838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65839          fi
65840        else
65841          # Otherwise we believe it is a complete path. Use it as it is.
65842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65843$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65845$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65846          if test ! -x "$tool_specified"; then
65847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65848$as_echo "not found" >&6; }
65849            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65850          fi
65851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65852$as_echo "$tool_specified" >&6; }
65853        fi
65854      fi
65855    fi
65856
65857  fi
65858
65859
65860
65861  if test "x$ICECC_CREATE_ENV" = x; then
65862    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65863  fi
65864
65865
65866    # Use icecc-create-env to create a minimal compilation environment that can
65867    # be sent to the other hosts in the icecream cluster.
65868    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65869    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65870    # Older versions of icecc does not have the --gcc parameter
65871    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65872      icecc_gcc_arg="--gcc"
65873    fi
65874    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65875
65876  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65877      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65878          ${icecc_create_env_log} 2>&1 )
65879  if test "$?" != "0"; then
65880    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65881$as_echo "$as_me: icecc-create-env output:" >&6;}
65882    cat \
65883          ${icecc_create_env_log}
65884    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65885  fi
65886
65887    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65888      # For clang, the icecc compilerwrapper is needed. It usually resides next
65889      # to icecc-create-env.
65890
65891
65892
65893  # Publish this variable in the help.
65894
65895
65896  if [ -z "${ICECC_WRAPPER+x}" ]; then
65897    # The variable is not set by user, try to locate tool using the code snippet
65898    for ac_prog in compilerwrapper
65899do
65900  # Extract the first word of "$ac_prog", so it can be a program name with args.
65901set dummy $ac_prog; ac_word=$2
65902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65903$as_echo_n "checking for $ac_word... " >&6; }
65904if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65905  $as_echo_n "(cached) " >&6
65906else
65907  case $ICECC_WRAPPER in
65908  [\\/]* | ?:[\\/]*)
65909  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65910  ;;
65911  *)
65912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65913for as_dir in $PATH
65914do
65915  IFS=$as_save_IFS
65916  test -z "$as_dir" && as_dir=.
65917    for ac_exec_ext in '' $ac_executable_extensions; do
65918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65919    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65921    break 2
65922  fi
65923done
65924  done
65925IFS=$as_save_IFS
65926
65927  ;;
65928esac
65929fi
65930ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65931if test -n "$ICECC_WRAPPER"; then
65932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65933$as_echo "$ICECC_WRAPPER" >&6; }
65934else
65935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65936$as_echo "no" >&6; }
65937fi
65938
65939
65940  test -n "$ICECC_WRAPPER" && break
65941done
65942
65943  else
65944    # The variable is set, but is it from the command line or the environment?
65945
65946    # Try to remove the string !ICECC_WRAPPER! from our list.
65947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65949      # If it failed, the variable was not from the command line. Ignore it,
65950      # but warn the user (except for BASH, which is always set by the calling BASH).
65951      if test "xICECC_WRAPPER" != xBASH; then
65952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65953$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65954      fi
65955      # Try to locate tool using the code snippet
65956      for ac_prog in compilerwrapper
65957do
65958  # Extract the first word of "$ac_prog", so it can be a program name with args.
65959set dummy $ac_prog; ac_word=$2
65960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65961$as_echo_n "checking for $ac_word... " >&6; }
65962if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65963  $as_echo_n "(cached) " >&6
65964else
65965  case $ICECC_WRAPPER in
65966  [\\/]* | ?:[\\/]*)
65967  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65968  ;;
65969  *)
65970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65971for as_dir in $PATH
65972do
65973  IFS=$as_save_IFS
65974  test -z "$as_dir" && as_dir=.
65975    for ac_exec_ext in '' $ac_executable_extensions; do
65976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65977    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65979    break 2
65980  fi
65981done
65982  done
65983IFS=$as_save_IFS
65984
65985  ;;
65986esac
65987fi
65988ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65989if test -n "$ICECC_WRAPPER"; then
65990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65991$as_echo "$ICECC_WRAPPER" >&6; }
65992else
65993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65994$as_echo "no" >&6; }
65995fi
65996
65997
65998  test -n "$ICECC_WRAPPER" && break
65999done
66000
66001    else
66002      # If it succeeded, then it was overridden by the user. We will use it
66003      # for the tool.
66004
66005      # First remove it from the list of overridden variables, so we can test
66006      # for unknown variables in the end.
66007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66008
66009      # Check if we try to supply an empty value
66010      if test "x$ICECC_WRAPPER" = x; then
66011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66012$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66014$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66016$as_echo "disabled" >&6; }
66017      else
66018        # Check if the provided tool contains a complete path.
66019        tool_specified="$ICECC_WRAPPER"
66020        tool_basename="${tool_specified##*/}"
66021        if test "x$tool_basename" = "x$tool_specified"; then
66022          # A command without a complete path is provided, search $PATH.
66023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66024$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66025          # Extract the first word of "$tool_basename", so it can be a program name with args.
66026set dummy $tool_basename; ac_word=$2
66027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66028$as_echo_n "checking for $ac_word... " >&6; }
66029if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66030  $as_echo_n "(cached) " >&6
66031else
66032  case $ICECC_WRAPPER in
66033  [\\/]* | ?:[\\/]*)
66034  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66035  ;;
66036  *)
66037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66038for as_dir in $PATH
66039do
66040  IFS=$as_save_IFS
66041  test -z "$as_dir" && as_dir=.
66042    for ac_exec_ext in '' $ac_executable_extensions; do
66043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66044    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66046    break 2
66047  fi
66048done
66049  done
66050IFS=$as_save_IFS
66051
66052  ;;
66053esac
66054fi
66055ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66056if test -n "$ICECC_WRAPPER"; then
66057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66058$as_echo "$ICECC_WRAPPER" >&6; }
66059else
66060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66061$as_echo "no" >&6; }
66062fi
66063
66064
66065          if test "x$ICECC_WRAPPER" = x; then
66066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66067          fi
66068        else
66069          # Otherwise we believe it is a complete path. Use it as it is.
66070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66071$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66073$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66074          if test ! -x "$tool_specified"; then
66075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66076$as_echo "not found" >&6; }
66077            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66078          fi
66079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66080$as_echo "$tool_specified" >&6; }
66081        fi
66082      fi
66083    fi
66084
66085  fi
66086
66087
66088
66089  if test "x$ICECC_WRAPPER" = x; then
66090    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66091  fi
66092
66093
66094
66095  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66096      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66097  if test "$?" != "0"; then
66098    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66099$as_echo "$as_me: icecc-create-env output:" >&6;}
66100    cat ${icecc_create_env_log}
66101    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66102  fi
66103
66104    else
66105      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66106    fi
66107    PATH="$old_path"
66108    # The bundle with the compiler gets a name based on checksums. Parse log file
66109    # to find it.
66110    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66111    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66112    if test ! -f ${ICECC_ENV_BUNDLE}; then
66113      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66114    fi
66115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66116$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66118$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66119    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66120
66121    if test "x${COMPILE_TYPE}" = "xcross"; then
66122      # If cross compiling, create a separate env package for the build compiler
66123      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66124      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66125      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66126
66127  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66128      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66129            ${icecc_create_env_log_build} 2>&1 )
66130  if test "$?" != "0"; then
66131    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66132$as_echo "$as_me: icecc-create-env output:" >&6;}
66133    cat \
66134            ${icecc_create_env_log_build}
66135    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66136  fi
66137
66138      elif test "x${BUILD_CC##*/}" = "xclang"; then
66139
66140  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66141      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66142  if test "$?" != "0"; then
66143    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66144$as_echo "$as_me: icecc-create-env output:" >&6;}
66145    cat ${icecc_create_env_log_build}
66146    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66147  fi
66148
66149      else
66150        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66151      fi
66152      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66153      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66154      if test ! -f ${ICECC_ENV_BUNDLE}; then
66155        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66156      fi
66157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66158$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66160$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66161      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66162          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66163    else
66164      BUILD_ICECC="${ICECC}"
66165    fi
66166
66167
66168  fi
66169
66170
66171# Can the C/C++ compiler use precompiled headers?
66172
66173
66174  ###############################################################################
66175  #
66176  # Can the C/C++ compiler use precompiled headers?
66177  #
66178  # Check whether --enable-precompiled-headers was given.
66179if test "${enable_precompiled_headers+set}" = set; then :
66180  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66181else
66182  ENABLE_PRECOMPH=yes
66183fi
66184
66185
66186  USE_PRECOMPILED_HEADER=true
66187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66188$as_echo_n "checking If precompiled header is enabled... " >&6; }
66189  if test "x$ENABLE_PRECOMPH" = xno; then
66190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66191$as_echo "no, forced" >&6; }
66192    USE_PRECOMPILED_HEADER=false
66193  elif test "x$ICECC" != "x"; then
66194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66195$as_echo "no, does not work effectively with icecc" >&6; }
66196    USE_PRECOMPILED_HEADER=false
66197  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66199$as_echo "no, does not work with Solaris Studio" >&6; }
66200    USE_PRECOMPILED_HEADER=false
66201  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66203$as_echo "no, does not work with xlc" >&6; }
66204    USE_PRECOMPILED_HEADER=false
66205  else
66206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66207$as_echo "yes" >&6; }
66208  fi
66209
66210  if test "x$ENABLE_PRECOMPH" = xyes; then
66211    # Check that the compiler actually supports precomp headers.
66212    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66214$as_echo_n "checking that precompiled headers work... " >&6; }
66215      echo "int alfa();" > conftest.h
66216      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66217      if test ! -f conftest.hpp.gch; then
66218        USE_PRECOMPILED_HEADER=false
66219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66220$as_echo "no" >&6; }
66221      else
66222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66223$as_echo "yes" >&6; }
66224      fi
66225      $RM conftest.h conftest.hpp.gch
66226    fi
66227  fi
66228
66229
66230
66231
66232# Setup use of ccache, if available
66233
66234  # Check whether --enable-ccache was given.
66235if test "${enable_ccache+set}" = set; then :
66236  enableval=$enable_ccache;
66237fi
66238
66239
66240  CCACHE_STATUS=
66241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66242$as_echo_n "checking is ccache enabled... " >&6; }
66243  if test "x$enable_ccache" = xyes; then
66244    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66246$as_echo "yes" >&6; }
66247      OLD_PATH="$PATH"
66248      if test "x$TOOLCHAIN_PATH" != x; then
66249        PATH=$TOOLCHAIN_PATH:$PATH
66250      fi
66251
66252
66253
66254  # Publish this variable in the help.
66255
66256
66257  if [ -z "${CCACHE+x}" ]; then
66258    # The variable is not set by user, try to locate tool using the code snippet
66259    for ac_prog in ccache
66260do
66261  # Extract the first word of "$ac_prog", so it can be a program name with args.
66262set dummy $ac_prog; ac_word=$2
66263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66264$as_echo_n "checking for $ac_word... " >&6; }
66265if ${ac_cv_path_CCACHE+:} false; then :
66266  $as_echo_n "(cached) " >&6
66267else
66268  case $CCACHE in
66269  [\\/]* | ?:[\\/]*)
66270  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66271  ;;
66272  *)
66273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66274for as_dir in $PATH
66275do
66276  IFS=$as_save_IFS
66277  test -z "$as_dir" && as_dir=.
66278    for ac_exec_ext in '' $ac_executable_extensions; do
66279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66280    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66282    break 2
66283  fi
66284done
66285  done
66286IFS=$as_save_IFS
66287
66288  ;;
66289esac
66290fi
66291CCACHE=$ac_cv_path_CCACHE
66292if test -n "$CCACHE"; then
66293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66294$as_echo "$CCACHE" >&6; }
66295else
66296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66297$as_echo "no" >&6; }
66298fi
66299
66300
66301  test -n "$CCACHE" && break
66302done
66303
66304  else
66305    # The variable is set, but is it from the command line or the environment?
66306
66307    # Try to remove the string !CCACHE! from our list.
66308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66310      # If it failed, the variable was not from the command line. Ignore it,
66311      # but warn the user (except for BASH, which is always set by the calling BASH).
66312      if test "xCCACHE" != xBASH; then
66313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66314$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66315      fi
66316      # Try to locate tool using the code snippet
66317      for ac_prog in ccache
66318do
66319  # Extract the first word of "$ac_prog", so it can be a program name with args.
66320set dummy $ac_prog; ac_word=$2
66321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66322$as_echo_n "checking for $ac_word... " >&6; }
66323if ${ac_cv_path_CCACHE+:} false; then :
66324  $as_echo_n "(cached) " >&6
66325else
66326  case $CCACHE in
66327  [\\/]* | ?:[\\/]*)
66328  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66329  ;;
66330  *)
66331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66332for as_dir in $PATH
66333do
66334  IFS=$as_save_IFS
66335  test -z "$as_dir" && as_dir=.
66336    for ac_exec_ext in '' $ac_executable_extensions; do
66337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66338    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66340    break 2
66341  fi
66342done
66343  done
66344IFS=$as_save_IFS
66345
66346  ;;
66347esac
66348fi
66349CCACHE=$ac_cv_path_CCACHE
66350if test -n "$CCACHE"; then
66351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66352$as_echo "$CCACHE" >&6; }
66353else
66354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66355$as_echo "no" >&6; }
66356fi
66357
66358
66359  test -n "$CCACHE" && break
66360done
66361
66362    else
66363      # If it succeeded, then it was overridden by the user. We will use it
66364      # for the tool.
66365
66366      # First remove it from the list of overridden variables, so we can test
66367      # for unknown variables in the end.
66368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66369
66370      # Check if we try to supply an empty value
66371      if test "x$CCACHE" = x; then
66372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66373$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66375$as_echo_n "checking for CCACHE... " >&6; }
66376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66377$as_echo "disabled" >&6; }
66378      else
66379        # Check if the provided tool contains a complete path.
66380        tool_specified="$CCACHE"
66381        tool_basename="${tool_specified##*/}"
66382        if test "x$tool_basename" = "x$tool_specified"; then
66383          # A command without a complete path is provided, search $PATH.
66384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66385$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66386          # Extract the first word of "$tool_basename", so it can be a program name with args.
66387set dummy $tool_basename; ac_word=$2
66388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66389$as_echo_n "checking for $ac_word... " >&6; }
66390if ${ac_cv_path_CCACHE+:} false; then :
66391  $as_echo_n "(cached) " >&6
66392else
66393  case $CCACHE in
66394  [\\/]* | ?:[\\/]*)
66395  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66396  ;;
66397  *)
66398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66399for as_dir in $PATH
66400do
66401  IFS=$as_save_IFS
66402  test -z "$as_dir" && as_dir=.
66403    for ac_exec_ext in '' $ac_executable_extensions; do
66404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66405    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66407    break 2
66408  fi
66409done
66410  done
66411IFS=$as_save_IFS
66412
66413  ;;
66414esac
66415fi
66416CCACHE=$ac_cv_path_CCACHE
66417if test -n "$CCACHE"; then
66418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66419$as_echo "$CCACHE" >&6; }
66420else
66421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66422$as_echo "no" >&6; }
66423fi
66424
66425
66426          if test "x$CCACHE" = x; then
66427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66428          fi
66429        else
66430          # Otherwise we believe it is a complete path. Use it as it is.
66431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66432$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66434$as_echo_n "checking for CCACHE... " >&6; }
66435          if test ! -x "$tool_specified"; then
66436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66437$as_echo "not found" >&6; }
66438            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66439          fi
66440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66441$as_echo "$tool_specified" >&6; }
66442        fi
66443      fi
66444    fi
66445
66446  fi
66447
66448
66449
66450  if test "x$CCACHE" = x; then
66451    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66452  fi
66453
66454
66455      PATH="$OLD_PATH"
66456      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66457      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66458    else
66459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66460$as_echo "no" >&6; }
66461      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66462$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66463    fi
66464  elif test "x$enable_ccache" = xno; then
66465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66466$as_echo "no, explicitly disabled" >&6; }
66467    CCACHE_STATUS="Disabled"
66468  elif test "x$enable_ccache" = x; then
66469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66470$as_echo "no" >&6; }
66471  else
66472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66473$as_echo "unknown" >&6; }
66474    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66475  fi
66476
66477
66478
66479# Check whether --with-ccache-dir was given.
66480if test "${with_ccache_dir+set}" = set; then :
66481  withval=$with_ccache_dir;
66482fi
66483
66484
66485  if test "x$with_ccache_dir" != x; then
66486    # When using a non home ccache directory, assume the use is to share ccache files
66487    # with other users. Thus change the umask.
66488    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66489    if test "x$CCACHE" = x; then
66490      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66491$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66492    fi
66493  fi
66494
66495  if test "x$CCACHE" != x; then
66496
66497  if test "x$CCACHE" != x; then
66498    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66499      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66500          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66501      if test "x$HAS_BAD_CCACHE" != "x"; then
66502        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66503      fi
66504    fi
66505    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66506      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66507          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66508      if test "x$HAS_BAD_CCACHE" != "x"; then
66509        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66510      fi
66511      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66512$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66513      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66514      PUSHED_FLAGS="$CXXFLAGS"
66515      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66516      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66517/* end confdefs.h.  */
66518
66519int
66520main ()
66521{
66522
66523  ;
66524  return 0;
66525}
66526_ACEOF
66527if ac_fn_cxx_try_compile "$LINENO"; then :
66528  CC_KNOWS_CCACHE_TRICK=yes
66529else
66530  CC_KNOWS_CCACHE_TRICK=no
66531fi
66532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66533      CXXFLAGS="$PUSHED_FLAGS"
66534      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66536$as_echo "yes" >&6; }
66537        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66538
66539        CCACHE_SLOPPINESS=pch_defines,time_macros
66540      else
66541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66542$as_echo "no" >&6; }
66543        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66544      fi
66545    fi
66546
66547    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66548        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66549
66550    if test "x$SET_CCACHE_DIR" != x; then
66551      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66552      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66553    fi
66554  fi
66555
66556  fi
66557
66558
66559###############################################################################
66560#
66561# And now the finish...
66562#
66563###############################################################################
66564
66565# Check for some common pitfalls
66566
66567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66568    file_to_test="$SRC_ROOT/LICENSE"
66569    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66570      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
66571    fi
66572  fi
66573
66574
66575  # Did user specify any unknown variables?
66576
66577  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66578    # Replace the separating ! with spaces before presenting for end user.
66579    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66581$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66582  fi
66583
66584
66585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66586$as_echo_n "checking if build directory is on local disk... " >&6; }
66587
66588  # df -l lists only local disks; if the given directory is not found then
66589  # a non-zero exit code is given
66590  if test "x$DF" = x; then
66591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66592      # msys does not have df; use Windows "net use" instead.
66593      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66594      if test "x$IS_NETWORK_DISK" = x; then
66595        OUTPUT_DIR_IS_LOCAL="yes"
66596      else
66597        OUTPUT_DIR_IS_LOCAL="no"
66598      fi
66599    else
66600      # No df here, say it's local
66601      OUTPUT_DIR_IS_LOCAL="yes"
66602    fi
66603  else
66604    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66605      OUTPUT_DIR_IS_LOCAL="yes"
66606    else
66607      OUTPUT_DIR_IS_LOCAL="no"
66608    fi
66609  fi
66610
66611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66612$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66613
66614
66615
66616  # Check if the user has any old-style ALT_ variables set.
66617  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66618
66619  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66620  # Since we can't properly handle the dependencies for this, warn the user about the situation
66621  if test -e $OUTPUT_ROOT/spec.gmk; then
66622    IS_RECONFIGURE=yes
66623  else
66624    IS_RECONFIGURE=no
66625  fi
66626
66627
66628# At the end, call the custom hook. (Dummy macro if no custom sources available)
66629
66630
66631# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66632
66633  # Keep feature lists sorted and free of duplicates
66634  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66635  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66636  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66637  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66638  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66639  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66640  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66641
66642  # Validate features
66643  for variant in $JVM_VARIANTS; do
66644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66645$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66646    features_var_name=JVM_FEATURES_$variant
66647    JVM_FEATURES_TO_TEST=${!features_var_name}
66648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66649$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66650    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66651    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66652    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66653    if test "x$INVALID_FEATURES" != x; then
66654      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66655    fi
66656  done
66657
66658
66659# We're messing a bit with internal autoconf variables to put the config.status
66660# in the output directory instead of the current directory.
66661CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66662
66663# Create the actual output files. Now the main work of configure is done.
66664cat >confcache <<\_ACEOF
66665# This file is a shell script that caches the results of configure
66666# tests run on this system so they can be shared between configure
66667# scripts and configure runs, see configure's option --config-cache.
66668# It is not useful on other systems.  If it contains results you don't
66669# want to keep, you may remove or edit it.
66670#
66671# config.status only pays attention to the cache file if you give it
66672# the --recheck option to rerun configure.
66673#
66674# `ac_cv_env_foo' variables (set or unset) will be overridden when
66675# loading this file, other *unset* `ac_cv_foo' will be assigned the
66676# following values.
66677
66678_ACEOF
66679
66680# The following way of writing the cache mishandles newlines in values,
66681# but we know of no workaround that is simple, portable, and efficient.
66682# So, we kill variables containing newlines.
66683# Ultrix sh set writes to stderr and can't be redirected directly,
66684# and sets the high bit in the cache file unless we assign to the vars.
66685(
66686  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66687    eval ac_val=\$$ac_var
66688    case $ac_val in #(
66689    *${as_nl}*)
66690      case $ac_var in #(
66691      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66692$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66693      esac
66694      case $ac_var in #(
66695      _ | IFS | as_nl) ;; #(
66696      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66697      *) { eval $ac_var=; unset $ac_var;} ;;
66698      esac ;;
66699    esac
66700  done
66701
66702  (set) 2>&1 |
66703    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66704    *${as_nl}ac_space=\ *)
66705      # `set' does not quote correctly, so add quotes: double-quote
66706      # substitution turns \\\\ into \\, and sed turns \\ into \.
66707      sed -n \
66708	"s/'/'\\\\''/g;
66709	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66710      ;; #(
66711    *)
66712      # `set' quotes correctly as required by POSIX, so do not add quotes.
66713      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66714      ;;
66715    esac |
66716    sort
66717) |
66718  sed '
66719     /^ac_cv_env_/b end
66720     t clear
66721     :clear
66722     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66723     t end
66724     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66725     :end' >>confcache
66726if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66727  if test -w "$cache_file"; then
66728    if test "x$cache_file" != "x/dev/null"; then
66729      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66730$as_echo "$as_me: updating cache $cache_file" >&6;}
66731      if test ! -f "$cache_file" || test -h "$cache_file"; then
66732	cat confcache >"$cache_file"
66733      else
66734        case $cache_file in #(
66735        */* | ?:*)
66736	  mv -f confcache "$cache_file"$$ &&
66737	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66738        *)
66739	  mv -f confcache "$cache_file" ;;
66740	esac
66741      fi
66742    fi
66743  else
66744    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66745$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66746  fi
66747fi
66748rm -f confcache
66749
66750test "x$prefix" = xNONE && prefix=$ac_default_prefix
66751# Let make expand exec_prefix.
66752test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66753
66754# Transform confdefs.h into DEFS.
66755# Protect against shell expansion while executing Makefile rules.
66756# Protect against Makefile macro expansion.
66757#
66758# If the first sed substitution is executed (which looks for macros that
66759# take arguments), then branch to the quote section.  Otherwise,
66760# look for a macro that doesn't take arguments.
66761ac_script='
66762:mline
66763/\\$/{
66764 N
66765 s,\\\n,,
66766 b mline
66767}
66768t clear
66769:clear
66770s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66771t quote
66772s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66773t quote
66774b any
66775:quote
66776s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66777s/\[/\\&/g
66778s/\]/\\&/g
66779s/\$/$$/g
66780H
66781:any
66782${
66783	g
66784	s/^\n//
66785	s/\n/ /g
66786	p
66787}
66788'
66789DEFS=`sed -n "$ac_script" confdefs.h`
66790
66791
66792ac_libobjs=
66793ac_ltlibobjs=
66794U=
66795for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66796  # 1. Remove the extension, and $U if already installed.
66797  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66798  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66799  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66800  #    will be set to the directory where LIBOBJS objects are built.
66801  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66802  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66803done
66804LIBOBJS=$ac_libobjs
66805
66806LTLIBOBJS=$ac_ltlibobjs
66807
66808
66809
66810: "${CONFIG_STATUS=./config.status}"
66811ac_write_fail=0
66812ac_clean_files_save=$ac_clean_files
66813ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66814{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66815$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66816as_write_fail=0
66817cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66818#! $SHELL
66819# Generated by $as_me.
66820# Run this file to recreate the current configuration.
66821# Compiler output produced by configure, useful for debugging
66822# configure, is in config.log if it exists.
66823
66824debug=false
66825ac_cs_recheck=false
66826ac_cs_silent=false
66827
66828SHELL=\${CONFIG_SHELL-$SHELL}
66829export SHELL
66830_ASEOF
66831cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66832## -------------------- ##
66833## M4sh Initialization. ##
66834## -------------------- ##
66835
66836# Be more Bourne compatible
66837DUALCASE=1; export DUALCASE # for MKS sh
66838if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66839  emulate sh
66840  NULLCMD=:
66841  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66842  # is contrary to our usage.  Disable this feature.
66843  alias -g '${1+"$@"}'='"$@"'
66844  setopt NO_GLOB_SUBST
66845else
66846  case `(set -o) 2>/dev/null` in #(
66847  *posix*) :
66848    set -o posix ;; #(
66849  *) :
66850     ;;
66851esac
66852fi
66853
66854
66855as_nl='
66856'
66857export as_nl
66858# Printing a long string crashes Solaris 7 /usr/bin/printf.
66859as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66860as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66861as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66862# Prefer a ksh shell builtin over an external printf program on Solaris,
66863# but without wasting forks for bash or zsh.
66864if test -z "$BASH_VERSION$ZSH_VERSION" \
66865    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66866  as_echo='print -r --'
66867  as_echo_n='print -rn --'
66868elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66869  as_echo='printf %s\n'
66870  as_echo_n='printf %s'
66871else
66872  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66873    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66874    as_echo_n='/usr/ucb/echo -n'
66875  else
66876    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66877    as_echo_n_body='eval
66878      arg=$1;
66879      case $arg in #(
66880      *"$as_nl"*)
66881	expr "X$arg" : "X\\(.*\\)$as_nl";
66882	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66883      esac;
66884      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66885    '
66886    export as_echo_n_body
66887    as_echo_n='sh -c $as_echo_n_body as_echo'
66888  fi
66889  export as_echo_body
66890  as_echo='sh -c $as_echo_body as_echo'
66891fi
66892
66893# The user is always right.
66894if test "${PATH_SEPARATOR+set}" != set; then
66895  PATH_SEPARATOR=:
66896  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66897    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66898      PATH_SEPARATOR=';'
66899  }
66900fi
66901
66902
66903# IFS
66904# We need space, tab and new line, in precisely that order.  Quoting is
66905# there to prevent editors from complaining about space-tab.
66906# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66907# splitting by setting IFS to empty value.)
66908IFS=" ""	$as_nl"
66909
66910# Find who we are.  Look in the path if we contain no directory separator.
66911as_myself=
66912case $0 in #((
66913  *[\\/]* ) as_myself=$0 ;;
66914  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66915for as_dir in $PATH
66916do
66917  IFS=$as_save_IFS
66918  test -z "$as_dir" && as_dir=.
66919    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66920  done
66921IFS=$as_save_IFS
66922
66923     ;;
66924esac
66925# We did not find ourselves, most probably we were run as `sh COMMAND'
66926# in which case we are not to be found in the path.
66927if test "x$as_myself" = x; then
66928  as_myself=$0
66929fi
66930if test ! -f "$as_myself"; then
66931  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66932  exit 1
66933fi
66934
66935# Unset variables that we do not need and which cause bugs (e.g. in
66936# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66937# suppresses any "Segmentation fault" message there.  '((' could
66938# trigger a bug in pdksh 5.2.14.
66939for as_var in BASH_ENV ENV MAIL MAILPATH
66940do eval test x\${$as_var+set} = xset \
66941  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66942done
66943PS1='$ '
66944PS2='> '
66945PS4='+ '
66946
66947# NLS nuisances.
66948LC_ALL=C
66949export LC_ALL
66950LANGUAGE=C
66951export LANGUAGE
66952
66953# CDPATH.
66954(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66955
66956
66957# as_fn_error STATUS ERROR [LINENO LOG_FD]
66958# ----------------------------------------
66959# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66960# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66961# script with STATUS, using 1 if that was 0.
66962as_fn_error ()
66963{
66964  as_status=$1; test $as_status -eq 0 && as_status=1
66965  if test "$4"; then
66966    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66967    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66968  fi
66969  $as_echo "$as_me: error: $2" >&2
66970  as_fn_exit $as_status
66971} # as_fn_error
66972
66973
66974# as_fn_set_status STATUS
66975# -----------------------
66976# Set $? to STATUS, without forking.
66977as_fn_set_status ()
66978{
66979  return $1
66980} # as_fn_set_status
66981
66982# as_fn_exit STATUS
66983# -----------------
66984# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66985as_fn_exit ()
66986{
66987  set +e
66988  as_fn_set_status $1
66989  exit $1
66990} # as_fn_exit
66991
66992# as_fn_unset VAR
66993# ---------------
66994# Portably unset VAR.
66995as_fn_unset ()
66996{
66997  { eval $1=; unset $1;}
66998}
66999as_unset=as_fn_unset
67000# as_fn_append VAR VALUE
67001# ----------------------
67002# Append the text in VALUE to the end of the definition contained in VAR. Take
67003# advantage of any shell optimizations that allow amortized linear growth over
67004# repeated appends, instead of the typical quadratic growth present in naive
67005# implementations.
67006if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67007  eval 'as_fn_append ()
67008  {
67009    eval $1+=\$2
67010  }'
67011else
67012  as_fn_append ()
67013  {
67014    eval $1=\$$1\$2
67015  }
67016fi # as_fn_append
67017
67018# as_fn_arith ARG...
67019# ------------------
67020# Perform arithmetic evaluation on the ARGs, and store the result in the
67021# global $as_val. Take advantage of shells that can avoid forks. The arguments
67022# must be portable across $(()) and expr.
67023if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67024  eval 'as_fn_arith ()
67025  {
67026    as_val=$(( $* ))
67027  }'
67028else
67029  as_fn_arith ()
67030  {
67031    as_val=`expr "$@" || test $? -eq 1`
67032  }
67033fi # as_fn_arith
67034
67035
67036if expr a : '\(a\)' >/dev/null 2>&1 &&
67037   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67038  as_expr=expr
67039else
67040  as_expr=false
67041fi
67042
67043if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67044  as_basename=basename
67045else
67046  as_basename=false
67047fi
67048
67049if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67050  as_dirname=dirname
67051else
67052  as_dirname=false
67053fi
67054
67055as_me=`$as_basename -- "$0" ||
67056$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67057	 X"$0" : 'X\(//\)$' \| \
67058	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67059$as_echo X/"$0" |
67060    sed '/^.*\/\([^/][^/]*\)\/*$/{
67061	    s//\1/
67062	    q
67063	  }
67064	  /^X\/\(\/\/\)$/{
67065	    s//\1/
67066	    q
67067	  }
67068	  /^X\/\(\/\).*/{
67069	    s//\1/
67070	    q
67071	  }
67072	  s/.*/./; q'`
67073
67074# Avoid depending upon Character Ranges.
67075as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67076as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67077as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67078as_cr_digits='0123456789'
67079as_cr_alnum=$as_cr_Letters$as_cr_digits
67080
67081ECHO_C= ECHO_N= ECHO_T=
67082case `echo -n x` in #(((((
67083-n*)
67084  case `echo 'xy\c'` in
67085  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67086  xy)  ECHO_C='\c';;
67087  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67088       ECHO_T='	';;
67089  esac;;
67090*)
67091  ECHO_N='-n';;
67092esac
67093
67094rm -f conf$$ conf$$.exe conf$$.file
67095if test -d conf$$.dir; then
67096  rm -f conf$$.dir/conf$$.file
67097else
67098  rm -f conf$$.dir
67099  mkdir conf$$.dir 2>/dev/null
67100fi
67101if (echo >conf$$.file) 2>/dev/null; then
67102  if ln -s conf$$.file conf$$ 2>/dev/null; then
67103    as_ln_s='ln -s'
67104    # ... but there are two gotchas:
67105    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67106    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67107    # In both cases, we have to default to `cp -pR'.
67108    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67109      as_ln_s='cp -pR'
67110  elif ln conf$$.file conf$$ 2>/dev/null; then
67111    as_ln_s=ln
67112  else
67113    as_ln_s='cp -pR'
67114  fi
67115else
67116  as_ln_s='cp -pR'
67117fi
67118rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67119rmdir conf$$.dir 2>/dev/null
67120
67121
67122# as_fn_mkdir_p
67123# -------------
67124# Create "$as_dir" as a directory, including parents if necessary.
67125as_fn_mkdir_p ()
67126{
67127
67128  case $as_dir in #(
67129  -*) as_dir=./$as_dir;;
67130  esac
67131  test -d "$as_dir" || eval $as_mkdir_p || {
67132    as_dirs=
67133    while :; do
67134      case $as_dir in #(
67135      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67136      *) as_qdir=$as_dir;;
67137      esac
67138      as_dirs="'$as_qdir' $as_dirs"
67139      as_dir=`$as_dirname -- "$as_dir" ||
67140$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67141	 X"$as_dir" : 'X\(//\)[^/]' \| \
67142	 X"$as_dir" : 'X\(//\)$' \| \
67143	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67144$as_echo X"$as_dir" |
67145    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67146	    s//\1/
67147	    q
67148	  }
67149	  /^X\(\/\/\)[^/].*/{
67150	    s//\1/
67151	    q
67152	  }
67153	  /^X\(\/\/\)$/{
67154	    s//\1/
67155	    q
67156	  }
67157	  /^X\(\/\).*/{
67158	    s//\1/
67159	    q
67160	  }
67161	  s/.*/./; q'`
67162      test -d "$as_dir" && break
67163    done
67164    test -z "$as_dirs" || eval "mkdir $as_dirs"
67165  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67166
67167
67168} # as_fn_mkdir_p
67169if mkdir -p . 2>/dev/null; then
67170  as_mkdir_p='mkdir -p "$as_dir"'
67171else
67172  test -d ./-p && rmdir ./-p
67173  as_mkdir_p=false
67174fi
67175
67176
67177# as_fn_executable_p FILE
67178# -----------------------
67179# Test if FILE is an executable regular file.
67180as_fn_executable_p ()
67181{
67182  test -f "$1" && test -x "$1"
67183} # as_fn_executable_p
67184as_test_x='test -x'
67185as_executable_p=as_fn_executable_p
67186
67187# Sed expression to map a string onto a valid CPP name.
67188as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67189
67190# Sed expression to map a string onto a valid variable name.
67191as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67192
67193
67194exec 6>&1
67195## ----------------------------------- ##
67196## Main body of $CONFIG_STATUS script. ##
67197## ----------------------------------- ##
67198_ASEOF
67199test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67200
67201cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67202# Save the log message, to keep $0 and so on meaningful, and to
67203# report actual input values of CONFIG_FILES etc. instead of their
67204# values after options handling.
67205ac_log="
67206This file was extended by OpenJDK $as_me jdk9, which was
67207generated by GNU Autoconf 2.69.  Invocation command line was
67208
67209  CONFIG_FILES    = $CONFIG_FILES
67210  CONFIG_HEADERS  = $CONFIG_HEADERS
67211  CONFIG_LINKS    = $CONFIG_LINKS
67212  CONFIG_COMMANDS = $CONFIG_COMMANDS
67213  $ $0 $@
67214
67215on `(hostname || uname -n) 2>/dev/null | sed 1q`
67216"
67217
67218_ACEOF
67219
67220case $ac_config_files in *"
67221"*) set x $ac_config_files; shift; ac_config_files=$*;;
67222esac
67223
67224
67225
67226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67227# Files that config.status was made for.
67228config_files="$ac_config_files"
67229
67230_ACEOF
67231
67232cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67233ac_cs_usage="\
67234\`$as_me' instantiates files and other configuration actions
67235from templates according to the current configuration.  Unless the files
67236and actions are specified as TAGs, all are instantiated by default.
67237
67238Usage: $0 [OPTION]... [TAG]...
67239
67240  -h, --help       print this help, then exit
67241  -V, --version    print version number and configuration settings, then exit
67242      --config     print configuration, then exit
67243  -q, --quiet, --silent
67244                   do not print progress messages
67245  -d, --debug      don't remove temporary files
67246      --recheck    update $as_me by reconfiguring in the same conditions
67247      --file=FILE[:TEMPLATE]
67248                   instantiate the configuration file FILE
67249
67250Configuration files:
67251$config_files
67252
67253Report bugs to <build-dev@openjdk.java.net>.
67254OpenJDK home page: <http://openjdk.java.net>."
67255
67256_ACEOF
67257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67258ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67259ac_cs_version="\\
67260OpenJDK config.status jdk9
67261configured by $0, generated by GNU Autoconf 2.69,
67262  with options \\"\$ac_cs_config\\"
67263
67264Copyright (C) 2012 Free Software Foundation, Inc.
67265This config.status script is free software; the Free Software Foundation
67266gives unlimited permission to copy, distribute and modify it."
67267
67268ac_pwd='$ac_pwd'
67269srcdir='$srcdir'
67270AWK='$AWK'
67271test -n "\$AWK" || AWK=awk
67272_ACEOF
67273
67274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67275# The default lists apply if the user does not specify any file.
67276ac_need_defaults=:
67277while test $# != 0
67278do
67279  case $1 in
67280  --*=?*)
67281    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67282    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67283    ac_shift=:
67284    ;;
67285  --*=)
67286    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67287    ac_optarg=
67288    ac_shift=:
67289    ;;
67290  *)
67291    ac_option=$1
67292    ac_optarg=$2
67293    ac_shift=shift
67294    ;;
67295  esac
67296
67297  case $ac_option in
67298  # Handling of the options.
67299  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67300    ac_cs_recheck=: ;;
67301  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67302    $as_echo "$ac_cs_version"; exit ;;
67303  --config | --confi | --conf | --con | --co | --c )
67304    $as_echo "$ac_cs_config"; exit ;;
67305  --debug | --debu | --deb | --de | --d | -d )
67306    debug=: ;;
67307  --file | --fil | --fi | --f )
67308    $ac_shift
67309    case $ac_optarg in
67310    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67311    '') as_fn_error $? "missing file argument" ;;
67312    esac
67313    as_fn_append CONFIG_FILES " '$ac_optarg'"
67314    ac_need_defaults=false;;
67315  --he | --h |  --help | --hel | -h )
67316    $as_echo "$ac_cs_usage"; exit ;;
67317  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67318  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67319    ac_cs_silent=: ;;
67320
67321  # This is an error.
67322  -*) as_fn_error $? "unrecognized option: \`$1'
67323Try \`$0 --help' for more information." ;;
67324
67325  *) as_fn_append ac_config_targets " $1"
67326     ac_need_defaults=false ;;
67327
67328  esac
67329  shift
67330done
67331
67332ac_configure_extra_args=
67333
67334if $ac_cs_silent; then
67335  exec 6>/dev/null
67336  ac_configure_extra_args="$ac_configure_extra_args --silent"
67337fi
67338
67339_ACEOF
67340cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67341if \$ac_cs_recheck; then
67342  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67343  shift
67344  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67345  CONFIG_SHELL='$SHELL'
67346  export CONFIG_SHELL
67347  exec "\$@"
67348fi
67349
67350_ACEOF
67351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67352exec 5>>config.log
67353{
67354  echo
67355  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67356## Running $as_me. ##
67357_ASBOX
67358  $as_echo "$ac_log"
67359} >&5
67360
67361_ACEOF
67362cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67363_ACEOF
67364
67365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67366
67367# Handling of arguments.
67368for ac_config_target in $ac_config_targets
67369do
67370  case $ac_config_target in
67371    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67372    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67373    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67374    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67375    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67376
67377  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67378  esac
67379done
67380
67381
67382# If the user did not use the arguments to specify the items to instantiate,
67383# then the envvar interface is used.  Set only those that are not.
67384# We use the long form for the default assignment because of an extremely
67385# bizarre bug on SunOS 4.1.3.
67386if $ac_need_defaults; then
67387  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67388fi
67389
67390# Have a temporary directory for convenience.  Make it in the build tree
67391# simply because there is no reason against having it here, and in addition,
67392# creating and moving files from /tmp can sometimes cause problems.
67393# Hook for its removal unless debugging.
67394# Note that there is a small window in which the directory will not be cleaned:
67395# after its creation but before its name has been assigned to `$tmp'.
67396$debug ||
67397{
67398  tmp= ac_tmp=
67399  trap 'exit_status=$?
67400  : "${ac_tmp:=$tmp}"
67401  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67402' 0
67403  trap 'as_fn_exit 1' 1 2 13 15
67404}
67405# Create a (secure) tmp directory for tmp files.
67406
67407{
67408  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67409  test -d "$tmp"
67410}  ||
67411{
67412  tmp=./conf$$-$RANDOM
67413  (umask 077 && mkdir "$tmp")
67414} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67415ac_tmp=$tmp
67416
67417# Set up the scripts for CONFIG_FILES section.
67418# No need to generate them if there are no CONFIG_FILES.
67419# This happens for instance with `./config.status config.h'.
67420if test -n "$CONFIG_FILES"; then
67421
67422
67423ac_cr=`echo X | tr X '\015'`
67424# On cygwin, bash can eat \r inside `` if the user requested igncr.
67425# But we know of no other shell where ac_cr would be empty at this
67426# point, so we can use a bashism as a fallback.
67427if test "x$ac_cr" = x; then
67428  eval ac_cr=\$\'\\r\'
67429fi
67430ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67431if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67432  ac_cs_awk_cr='\\r'
67433else
67434  ac_cs_awk_cr=$ac_cr
67435fi
67436
67437echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67438_ACEOF
67439
67440
67441{
67442  echo "cat >conf$$subs.awk <<_ACEOF" &&
67443  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67444  echo "_ACEOF"
67445} >conf$$subs.sh ||
67446  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67447ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67448ac_delim='%!_!# '
67449for ac_last_try in false false false false false :; do
67450  . ./conf$$subs.sh ||
67451    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67452
67453  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67454  if test $ac_delim_n = $ac_delim_num; then
67455    break
67456  elif $ac_last_try; then
67457    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67458  else
67459    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67460  fi
67461done
67462rm -f conf$$subs.sh
67463
67464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67465cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67466_ACEOF
67467sed -n '
67468h
67469s/^/S["/; s/!.*/"]=/
67470p
67471g
67472s/^[^!]*!//
67473:repl
67474t repl
67475s/'"$ac_delim"'$//
67476t delim
67477:nl
67478h
67479s/\(.\{148\}\)..*/\1/
67480t more1
67481s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67482p
67483n
67484b repl
67485:more1
67486s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67487p
67488g
67489s/.\{148\}//
67490t nl
67491:delim
67492h
67493s/\(.\{148\}\)..*/\1/
67494t more2
67495s/["\\]/\\&/g; s/^/"/; s/$/"/
67496p
67497b
67498:more2
67499s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67500p
67501g
67502s/.\{148\}//
67503t delim
67504' <conf$$subs.awk | sed '
67505/^[^""]/{
67506  N
67507  s/\n//
67508}
67509' >>$CONFIG_STATUS || ac_write_fail=1
67510rm -f conf$$subs.awk
67511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67512_ACAWK
67513cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67514  for (key in S) S_is_set[key] = 1
67515  FS = ""
67516
67517}
67518{
67519  line = $ 0
67520  nfields = split(line, field, "@")
67521  substed = 0
67522  len = length(field[1])
67523  for (i = 2; i < nfields; i++) {
67524    key = field[i]
67525    keylen = length(key)
67526    if (S_is_set[key]) {
67527      value = S[key]
67528      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67529      len += length(value) + length(field[++i])
67530      substed = 1
67531    } else
67532      len += 1 + keylen
67533  }
67534
67535  print line
67536}
67537
67538_ACAWK
67539_ACEOF
67540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67541if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67542  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67543else
67544  cat
67545fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67546  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67547_ACEOF
67548
67549# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67550# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67551# trailing colons and then remove the whole line if VPATH becomes empty
67552# (actually we leave an empty line to preserve line numbers).
67553if test "x$srcdir" = x.; then
67554  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67555h
67556s///
67557s/^/:/
67558s/[	 ]*$/:/
67559s/:\$(srcdir):/:/g
67560s/:\${srcdir}:/:/g
67561s/:@srcdir@:/:/g
67562s/^:*//
67563s/:*$//
67564x
67565s/\(=[	 ]*\).*/\1/
67566G
67567s/\n//
67568s/^[^=]*=[	 ]*$//
67569}'
67570fi
67571
67572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67573fi # test -n "$CONFIG_FILES"
67574
67575
67576eval set X "  :F $CONFIG_FILES      "
67577shift
67578for ac_tag
67579do
67580  case $ac_tag in
67581  :[FHLC]) ac_mode=$ac_tag; continue;;
67582  esac
67583  case $ac_mode$ac_tag in
67584  :[FHL]*:*);;
67585  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67586  :[FH]-) ac_tag=-:-;;
67587  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67588  esac
67589  ac_save_IFS=$IFS
67590  IFS=:
67591  set x $ac_tag
67592  IFS=$ac_save_IFS
67593  shift
67594  ac_file=$1
67595  shift
67596
67597  case $ac_mode in
67598  :L) ac_source=$1;;
67599  :[FH])
67600    ac_file_inputs=
67601    for ac_f
67602    do
67603      case $ac_f in
67604      -) ac_f="$ac_tmp/stdin";;
67605      *) # Look for the file first in the build tree, then in the source tree
67606	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67607	 # because $ac_f cannot contain `:'.
67608	 test -f "$ac_f" ||
67609	   case $ac_f in
67610	   [\\/$]*) false;;
67611	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67612	   esac ||
67613	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67614      esac
67615      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67616      as_fn_append ac_file_inputs " '$ac_f'"
67617    done
67618
67619    # Let's still pretend it is `configure' which instantiates (i.e., don't
67620    # use $as_me), people would be surprised to read:
67621    #    /* config.h.  Generated by config.status.  */
67622    configure_input='Generated from '`
67623	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67624	`' by configure.'
67625    if test x"$ac_file" != x-; then
67626      configure_input="$ac_file.  $configure_input"
67627      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67628$as_echo "$as_me: creating $ac_file" >&6;}
67629    fi
67630    # Neutralize special characters interpreted by sed in replacement strings.
67631    case $configure_input in #(
67632    *\&* | *\|* | *\\* )
67633       ac_sed_conf_input=`$as_echo "$configure_input" |
67634       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67635    *) ac_sed_conf_input=$configure_input;;
67636    esac
67637
67638    case $ac_tag in
67639    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67640      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67641    esac
67642    ;;
67643  esac
67644
67645  ac_dir=`$as_dirname -- "$ac_file" ||
67646$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67647	 X"$ac_file" : 'X\(//\)[^/]' \| \
67648	 X"$ac_file" : 'X\(//\)$' \| \
67649	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67650$as_echo X"$ac_file" |
67651    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67652	    s//\1/
67653	    q
67654	  }
67655	  /^X\(\/\/\)[^/].*/{
67656	    s//\1/
67657	    q
67658	  }
67659	  /^X\(\/\/\)$/{
67660	    s//\1/
67661	    q
67662	  }
67663	  /^X\(\/\).*/{
67664	    s//\1/
67665	    q
67666	  }
67667	  s/.*/./; q'`
67668  as_dir="$ac_dir"; as_fn_mkdir_p
67669  ac_builddir=.
67670
67671case "$ac_dir" in
67672.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67673*)
67674  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67675  # A ".." for each directory in $ac_dir_suffix.
67676  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67677  case $ac_top_builddir_sub in
67678  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67679  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67680  esac ;;
67681esac
67682ac_abs_top_builddir=$ac_pwd
67683ac_abs_builddir=$ac_pwd$ac_dir_suffix
67684# for backward compatibility:
67685ac_top_builddir=$ac_top_build_prefix
67686
67687case $srcdir in
67688  .)  # We are building in place.
67689    ac_srcdir=.
67690    ac_top_srcdir=$ac_top_builddir_sub
67691    ac_abs_top_srcdir=$ac_pwd ;;
67692  [\\/]* | ?:[\\/]* )  # Absolute name.
67693    ac_srcdir=$srcdir$ac_dir_suffix;
67694    ac_top_srcdir=$srcdir
67695    ac_abs_top_srcdir=$srcdir ;;
67696  *) # Relative name.
67697    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67698    ac_top_srcdir=$ac_top_build_prefix$srcdir
67699    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67700esac
67701ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67702
67703
67704  case $ac_mode in
67705  :F)
67706  #
67707  # CONFIG_FILE
67708  #
67709
67710_ACEOF
67711
67712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67713# If the template does not know about datarootdir, expand it.
67714# FIXME: This hack should be removed a few years after 2.60.
67715ac_datarootdir_hack=; ac_datarootdir_seen=
67716ac_sed_dataroot='
67717/datarootdir/ {
67718  p
67719  q
67720}
67721/@datadir@/p
67722/@docdir@/p
67723/@infodir@/p
67724/@localedir@/p
67725/@mandir@/p'
67726case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67727*datarootdir*) ac_datarootdir_seen=yes;;
67728*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67729  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67730$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67731_ACEOF
67732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67733  ac_datarootdir_hack='
67734  s&@datadir@&$datadir&g
67735  s&@docdir@&$docdir&g
67736  s&@infodir@&$infodir&g
67737  s&@localedir@&$localedir&g
67738  s&@mandir@&$mandir&g
67739  s&\\\${datarootdir}&$datarootdir&g' ;;
67740esac
67741_ACEOF
67742
67743# Neutralize VPATH when `$srcdir' = `.'.
67744# Shell code in configure.ac might set extrasub.
67745# FIXME: do we really want to maintain this feature?
67746cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67747ac_sed_extra="$ac_vpsub
67748$extrasub
67749_ACEOF
67750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67751:t
67752/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67753s|@configure_input@|$ac_sed_conf_input|;t t
67754s&@top_builddir@&$ac_top_builddir_sub&;t t
67755s&@top_build_prefix@&$ac_top_build_prefix&;t t
67756s&@srcdir@&$ac_srcdir&;t t
67757s&@abs_srcdir@&$ac_abs_srcdir&;t t
67758s&@top_srcdir@&$ac_top_srcdir&;t t
67759s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67760s&@builddir@&$ac_builddir&;t t
67761s&@abs_builddir@&$ac_abs_builddir&;t t
67762s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67763$ac_datarootdir_hack
67764"
67765eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67766  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67767
67768test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67769  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67770  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67771      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67772  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67773which seems to be undefined.  Please make sure it is defined" >&5
67774$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67775which seems to be undefined.  Please make sure it is defined" >&2;}
67776
67777  rm -f "$ac_tmp/stdin"
67778  case $ac_file in
67779  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67780  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67781  esac \
67782  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67783 ;;
67784
67785
67786
67787  esac
67788
67789done # for ac_tag
67790
67791
67792as_fn_exit 0
67793_ACEOF
67794ac_clean_files=$ac_clean_files_save
67795
67796test $ac_write_fail = 0 ||
67797  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67798
67799
67800# configure is writing to config.log, and then calls config.status.
67801# config.status does its own redirection, appending to config.log.
67802# Unfortunately, on DOS this fails, as config.log is still kept open
67803# by configure, so config.status won't be able to write to it; its
67804# output is simply discarded.  So we exec the FD to /dev/null,
67805# effectively closing config.log, so it can be properly (re)opened and
67806# appended to by config.status.  When coming back to configure, we
67807# need to make the FD available again.
67808if test "$no_create" != yes; then
67809  ac_cs_success=:
67810  ac_config_status_args=
67811  test "$silent" = yes &&
67812    ac_config_status_args="$ac_config_status_args --quiet"
67813  exec 5>/dev/null
67814  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67815  exec 5>>config.log
67816  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67817  # would make configure fail if this is the last instruction.
67818  $ac_cs_success || as_fn_exit 1
67819fi
67820if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67821  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67822$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67823fi
67824
67825
67826# After AC_OUTPUT, we need to do final work
67827
67828
67829  # Try to move config.log (generated by autoconf) to the configure-support directory.
67830  if test -e ./config.log; then
67831    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67832  fi
67833
67834  # Rotate our log file (configure.log)
67835  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67836    $RM -f "$OUTPUT_ROOT/configure.log.old"
67837  fi
67838  if test -e "$OUTPUT_ROOT/configure.log"; then
67839    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67840  fi
67841
67842  # Move configure.log from current directory to the build output root
67843  if test -e ./configure.log; then
67844    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67845  fi
67846
67847  # Make the compare script executable
67848  $CHMOD +x $OUTPUT_ROOT/compare.sh
67849
67850
67851# Finally output some useful information to the user
67852
67853  # Finally output some useful information to the user
67854
67855  printf "\n"
67856  printf "====================================================\n"
67857  if test "x$no_create" != "xyes"; then
67858    if test "x$IS_RECONFIGURE" != "xyes"; then
67859      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67860    else
67861      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67862    fi
67863  else
67864    if test "x$IS_RECONFIGURE" != "xyes"; then
67865      printf "A configuration has been successfully checked but not created\n"
67866    else
67867      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67868    fi
67869  fi
67870  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67871    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67872  else
67873    printf "using default settings.\n"
67874  fi
67875
67876  printf "\n"
67877  printf "Configuration summary:\n"
67878  printf "* Debug level:    $DEBUG_LEVEL\n"
67879  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67880  printf "* JDK variant:    $JDK_VARIANT\n"
67881  printf "* JVM variants:   $JVM_VARIANTS\n"
67882  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67883  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67884
67885  printf "\n"
67886  printf "Tools summary:\n"
67887  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67888    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67889  fi
67890  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67891  if test "x$TOOLCHAIN_VERSION" != "x"; then
67892    print_version=" $TOOLCHAIN_VERSION"
67893  fi
67894  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67895  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67896  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67897
67898  printf "\n"
67899  printf "Build performance summary:\n"
67900  printf "* Cores to use:   $JOBS\n"
67901  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67902  if test "x$CCACHE_STATUS" != "x"; then
67903    printf "* ccache status:  $CCACHE_STATUS\n"
67904  fi
67905  printf "\n"
67906
67907  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67908    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67909    printf "will result in longer build times.\n"
67910    printf "\n"
67911  fi
67912
67913  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67914    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67915    printf "These are not respected, and will be ignored. It is recommended\n"
67916    printf "that you clean your environment. The following variables are set:\n"
67917    printf "$FOUND_ALT_VARIABLES\n"
67918    printf "\n"
67919  fi
67920
67921  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67922    printf "WARNING: Your build output directory is not on a local disk.\n"
67923    printf "This will severely degrade build performance!\n"
67924    printf "It is recommended that you create an output directory on a local disk,\n"
67925    printf "and run the configure script again from that directory.\n"
67926    printf "\n"
67927  fi
67928
67929  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67930    printf "WARNING: The result of this configuration has overridden an older\n"
67931    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67932    printf "proper build. Failure to do so might result in strange build problems.\n"
67933    printf "\n"
67934  fi
67935
67936  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67937    printf "WARNING: The result of this configuration was not saved.\n"
67938    printf "You should run without '--no-create | -n' to create the configuration.\n"
67939    printf "\n"
67940  fi
67941
67942
67943
67944  # Locate config.log.
67945  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67946    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67947  elif test -e "./config.log"; then
67948    CONFIG_LOG_PATH="."
67949  fi
67950
67951  if test -e "$CONFIG_LOG_PATH/config.log"; then
67952    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67953    if test $? -eq 0; then
67954      printf "The following warnings were produced. Repeated here for convenience:\n"
67955      # We must quote sed expression (using []) to stop m4 from eating the [].
67956      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67957      printf "\n"
67958    fi
67959  fi
67960
67961