generated-configure.sh revision 1735:58e1d618b84c
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
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648LIBZIP_CAN_USE_MMAP
649LIBDL
650LIBM
651USE_EXTERNAL_LCMS
652LCMS_LIBS
653LCMS_CFLAGS
654USE_EXTERNAL_LIBZ
655USE_EXTERNAL_LIBPNG
656PNG_LIBS
657PNG_CFLAGS
658USE_EXTERNAL_LIBGIF
659USE_EXTERNAL_LIBJPEG
660LLVM_LIBS
661LLVM_LDFLAGS
662LLVM_CFLAGS
663LLVM_CONFIG
664LIBFFI_LIBS
665LIBFFI_CFLAGS
666ALSA_LIBS
667ALSA_CFLAGS
668FREETYPE_BUNDLE_LIB_PATH
669FREETYPE_LIBS
670FREETYPE_CFLAGS
671CUPS_CFLAGS
672X_EXTRA_LIBS
673X_LIBS
674X_PRE_LIBS
675X_CFLAGS
676XMKMF
677MSVCP_DLL
678MSVCR_DLL
679LIBCXX
680STATIC_CXX_SETTING
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708CXX_O_FLAG_NONE
709CXX_O_FLAG_DEBUG
710CXX_O_FLAG_NORM
711CXX_O_FLAG_HI
712CXX_O_FLAG_HIGHEST
713C_O_FLAG_NONE
714C_O_FLAG_DEBUG
715C_O_FLAG_NORM
716C_O_FLAG_HI
717C_O_FLAG_HIGHEST
718CXXFLAGS_DEBUG_SYMBOLS
719CFLAGS_DEBUG_SYMBOLS
720CXX_FLAG_DEPS
721C_FLAG_DEPS
722SET_SHARED_LIBRARY_MAPFILE
723SET_SHARED_LIBRARY_NAME
724SET_SHARED_LIBRARY_ORIGIN
725SET_EXECUTABLE_ORIGIN
726CXX_FLAG_REORDER
727C_FLAG_REORDER
728RC_FLAGS
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733STRIPFLAGS
734ARFLAGS
735COMPILER_TARGET_BITS_FLAG
736JT_HOME
737JTREGEXE
738USING_BROKEN_SUSE_LD
739PACKAGE_PATH
740USE_CLANG
741HOTSPOT_LD
742HOTSPOT_CXX
743HOTSPOT_RC
744HOTSPOT_MT
745BUILD_SYSROOT_LDFLAGS
746BUILD_SYSROOT_CFLAGS
747BUILD_LD
748BUILD_CXX
749BUILD_CC
750ac_ct_OBJDUMP
751OBJDUMP
752ac_ct_OBJCOPY
753OBJCOPY
754ac_ct_NM
755ac_ct_STRIP
756GNM
757NM
758STRIP
759MSBUILD
760DUMPBIN
761RC
762MT
763LIPO
764ac_ct_AR
765AR
766AS
767LDCXX
768LD
769CXXCPP
770CPP
771ac_ct_CXX
772CXXFLAGS
773CXX
774ac_ct_PROPER_COMPILER_CXX
775PROPER_COMPILER_CXX
776TOOLCHAIN_PATH_CXX
777POTENTIAL_CXX
778OBJEXT
779EXEEXT
780ac_ct_CC
781CPPFLAGS
782LDFLAGS
783CFLAGS
784CC
785ac_ct_PROPER_COMPILER_CC
786PROPER_COMPILER_CC
787TOOLCHAIN_PATH_CC
788POTENTIAL_CC
789VS_LIB
790VS_INCLUDE
791VS_PATH
792CYGWIN_LINK
793SYSROOT_LDFLAGS
794SYSROOT_CFLAGS
795LEGACY_EXTRA_LDFLAGS
796LEGACY_EXTRA_CXXFLAGS
797LEGACY_EXTRA_CFLAGS
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806STATIC_BUILD
807BUILD_HOTSPOT
808HOTSPOT_DIST
809BUILD_OUTPUT
810OVERRIDE_SRC_ROOT
811ADD_SRC_ROOT
812JDK_TOPDIR
813NASHORN_TOPDIR
814HOTSPOT_TOPDIR
815JAXWS_TOPDIR
816JAXP_TOPDIR
817CORBA_TOPDIR
818LANGTOOLS_TOPDIR
819JAVAC_FLAGS
820BOOT_JDK_SOURCETARGET
821JARSIGNER
822JAR
823JAVAH
824JAVAC
825JAVA
826BOOT_JDK
827JAVA_CHECK
828JAVAC_CHECK
829COOKED_BUILD_NUMBER
830JDK_VERSION
831COPYRIGHT_YEAR
832MACOSX_BUNDLE_ID_BASE
833MACOSX_BUNDLE_NAME_BASE
834COMPANY_NAME
835JDK_RC_PLATFORM_NAME
836PRODUCT_SUFFIX
837PRODUCT_NAME
838LAUNCHER_NAME
839MILESTONE
840JDK_BUILD_NUMBER
841JDK_UPDATE_VERSION
842JDK_MICRO_VERSION
843JDK_MINOR_VERSION
844JDK_MAJOR_VERSION
845USER_RELEASE_SUFFIX
846COMPRESS_JARS
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858SETFILE
859CODESIGN
860XATTR
861DSYMUTIL
862IS_GNU_TIME
863PATCH
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875MAKE
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950NICE
951CPIO
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078enable_static_build
1079with_toolchain_type
1080with_extra_cflags
1081with_extra_cxxflags
1082with_extra_ldflags
1083with_toolchain_version
1084with_jtreg
1085enable_warnings_as_errors
1086enable_debug_symbols
1087enable_zip_debug_info
1088enable_native_coverage
1089with_stdc__lib
1090with_msvcr_dll
1091with_msvcp_dll
1092with_x
1093with_cups
1094with_cups_include
1095with_freetype
1096with_freetype_include
1097with_freetype_lib
1098with_freetype_src
1099enable_freetype_bundling
1100with_alsa
1101with_alsa_include
1102with_alsa_lib
1103with_libffi
1104with_libffi_include
1105with_libffi_lib
1106with_libjpeg
1107with_giflib
1108with_libpng
1109with_zlib
1110with_lcms
1111with_dxsdk
1112with_dxsdk_lib
1113with_dxsdk_include
1114with_num_cores
1115with_memory_size
1116with_jobs
1117with_boot_jdk_jvmargs
1118with_sjavac_server_java
1119enable_sjavac
1120enable_precompiled_headers
1121enable_ccache
1122with_ccache_dir
1123'
1124      ac_precious_vars='build_alias
1125host_alias
1126target_alias
1127BASENAME
1128BASH
1129CAT
1130CHMOD
1131CMP
1132COMM
1133CP
1134CUT
1135DATE
1136DIFF
1137DIRNAME
1138ECHO
1139EXPR
1140FILE
1141FIND
1142HEAD
1143LN
1144LS
1145MKDIR
1146MKTEMP
1147MV
1148NAWK
1149PRINTF
1150RM
1151SH
1152SORT
1153TAIL
1154TAR
1155TEE
1156TOUCH
1157TR
1158UNAME
1159UNIQ
1160WC
1161WHICH
1162XARGS
1163AWK
1164GREP
1165EGREP
1166FGREP
1167SED
1168CYGPATH
1169READLINK
1170DF
1171CPIO
1172NICE
1173UNZIP
1174ZIP
1175LDD
1176OTOOL
1177READELF
1178HG
1179STAT
1180TIME
1181PATCH
1182DSYMUTIL
1183XATTR
1184CODESIGN
1185SETFILE
1186PKG_CONFIG
1187JAVA
1188JAVAC
1189JAVAH
1190JAR
1191JARSIGNER
1192CC
1193CFLAGS
1194LDFLAGS
1195LIBS
1196CPPFLAGS
1197CXX
1198CXXFLAGS
1199CCC
1200CPP
1201CXXCPP
1202AS
1203AR
1204LIPO
1205STRIP
1206NM
1207GNM
1208OBJCOPY
1209OBJDUMP
1210BUILD_CC
1211BUILD_CXX
1212BUILD_LD
1213JTREGEXE
1214XMKMF
1215FREETYPE_CFLAGS
1216FREETYPE_LIBS
1217ALSA_CFLAGS
1218ALSA_LIBS
1219LIBFFI_CFLAGS
1220LIBFFI_LIBS
1221PNG_CFLAGS
1222PNG_LIBS
1223LCMS_CFLAGS
1224LCMS_LIBS
1225CCACHE'
1226
1227
1228# Initialize some variables set by options.
1229ac_init_help=
1230ac_init_version=false
1231ac_unrecognized_opts=
1232ac_unrecognized_sep=
1233# The variables have the same names as the options, with
1234# dashes changed to underlines.
1235cache_file=/dev/null
1236exec_prefix=NONE
1237no_create=
1238no_recursion=
1239prefix=NONE
1240program_prefix=NONE
1241program_suffix=NONE
1242program_transform_name=s,x,x,
1243silent=
1244site=
1245srcdir=
1246verbose=
1247x_includes=NONE
1248x_libraries=NONE
1249
1250# Installation directory options.
1251# These are left unexpanded so users can "make install exec_prefix=/foo"
1252# and all the variables that are supposed to be based on exec_prefix
1253# by default will actually change.
1254# Use braces instead of parens because sh, perl, etc. also accept them.
1255# (The list follows the same order as the GNU Coding Standards.)
1256bindir='${exec_prefix}/bin'
1257sbindir='${exec_prefix}/sbin'
1258libexecdir='${exec_prefix}/libexec'
1259datarootdir='${prefix}/share'
1260datadir='${datarootdir}'
1261sysconfdir='${prefix}/etc'
1262sharedstatedir='${prefix}/com'
1263localstatedir='${prefix}/var'
1264includedir='${prefix}/include'
1265oldincludedir='/usr/include'
1266docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1267infodir='${datarootdir}/info'
1268htmldir='${docdir}'
1269dvidir='${docdir}'
1270pdfdir='${docdir}'
1271psdir='${docdir}'
1272libdir='${exec_prefix}/lib'
1273localedir='${datarootdir}/locale'
1274mandir='${datarootdir}/man'
1275
1276ac_prev=
1277ac_dashdash=
1278for ac_option
1279do
1280  # If the previous option needs an argument, assign it.
1281  if test -n "$ac_prev"; then
1282    eval $ac_prev=\$ac_option
1283    ac_prev=
1284    continue
1285  fi
1286
1287  case $ac_option in
1288  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1289  *=)   ac_optarg= ;;
1290  *)    ac_optarg=yes ;;
1291  esac
1292
1293  # Accept the important Cygnus configure options, so we can diagnose typos.
1294
1295  case $ac_dashdash$ac_option in
1296  --)
1297    ac_dashdash=yes ;;
1298
1299  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1300    ac_prev=bindir ;;
1301  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1302    bindir=$ac_optarg ;;
1303
1304  -build | --build | --buil | --bui | --bu)
1305    ac_prev=build_alias ;;
1306  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1307    build_alias=$ac_optarg ;;
1308
1309  -cache-file | --cache-file | --cache-fil | --cache-fi \
1310  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1311    ac_prev=cache_file ;;
1312  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1313  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1314    cache_file=$ac_optarg ;;
1315
1316  --config-cache | -C)
1317    cache_file=config.cache ;;
1318
1319  -datadir | --datadir | --datadi | --datad)
1320    ac_prev=datadir ;;
1321  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1322    datadir=$ac_optarg ;;
1323
1324  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1325  | --dataroo | --dataro | --datar)
1326    ac_prev=datarootdir ;;
1327  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1328  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1329    datarootdir=$ac_optarg ;;
1330
1331  -disable-* | --disable-*)
1332    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1333    # Reject names that are not valid shell variable names.
1334    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1335      as_fn_error $? "invalid feature name: $ac_useropt"
1336    ac_useropt_orig=$ac_useropt
1337    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1338    case $ac_user_opts in
1339      *"
1340"enable_$ac_useropt"
1341"*) ;;
1342      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1343	 ac_unrecognized_sep=', ';;
1344    esac
1345    eval enable_$ac_useropt=no ;;
1346
1347  -docdir | --docdir | --docdi | --doc | --do)
1348    ac_prev=docdir ;;
1349  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1350    docdir=$ac_optarg ;;
1351
1352  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1353    ac_prev=dvidir ;;
1354  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1355    dvidir=$ac_optarg ;;
1356
1357  -enable-* | --enable-*)
1358    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1359    # Reject names that are not valid shell variable names.
1360    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1361      as_fn_error $? "invalid feature name: $ac_useropt"
1362    ac_useropt_orig=$ac_useropt
1363    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1364    case $ac_user_opts in
1365      *"
1366"enable_$ac_useropt"
1367"*) ;;
1368      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1369	 ac_unrecognized_sep=', ';;
1370    esac
1371    eval enable_$ac_useropt=\$ac_optarg ;;
1372
1373  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1374  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1375  | --exec | --exe | --ex)
1376    ac_prev=exec_prefix ;;
1377  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1378  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1379  | --exec=* | --exe=* | --ex=*)
1380    exec_prefix=$ac_optarg ;;
1381
1382  -gas | --gas | --ga | --g)
1383    # Obsolete; use --with-gas.
1384    with_gas=yes ;;
1385
1386  -help | --help | --hel | --he | -h)
1387    ac_init_help=long ;;
1388  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1389    ac_init_help=recursive ;;
1390  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1391    ac_init_help=short ;;
1392
1393  -host | --host | --hos | --ho)
1394    ac_prev=host_alias ;;
1395  -host=* | --host=* | --hos=* | --ho=*)
1396    host_alias=$ac_optarg ;;
1397
1398  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1399    ac_prev=htmldir ;;
1400  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1401  | --ht=*)
1402    htmldir=$ac_optarg ;;
1403
1404  -includedir | --includedir | --includedi | --included | --include \
1405  | --includ | --inclu | --incl | --inc)
1406    ac_prev=includedir ;;
1407  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1408  | --includ=* | --inclu=* | --incl=* | --inc=*)
1409    includedir=$ac_optarg ;;
1410
1411  -infodir | --infodir | --infodi | --infod | --info | --inf)
1412    ac_prev=infodir ;;
1413  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1414    infodir=$ac_optarg ;;
1415
1416  -libdir | --libdir | --libdi | --libd)
1417    ac_prev=libdir ;;
1418  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1419    libdir=$ac_optarg ;;
1420
1421  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1422  | --libexe | --libex | --libe)
1423    ac_prev=libexecdir ;;
1424  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1425  | --libexe=* | --libex=* | --libe=*)
1426    libexecdir=$ac_optarg ;;
1427
1428  -localedir | --localedir | --localedi | --localed | --locale)
1429    ac_prev=localedir ;;
1430  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1431    localedir=$ac_optarg ;;
1432
1433  -localstatedir | --localstatedir | --localstatedi | --localstated \
1434  | --localstate | --localstat | --localsta | --localst | --locals)
1435    ac_prev=localstatedir ;;
1436  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1437  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1438    localstatedir=$ac_optarg ;;
1439
1440  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1441    ac_prev=mandir ;;
1442  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1443    mandir=$ac_optarg ;;
1444
1445  -nfp | --nfp | --nf)
1446    # Obsolete; use --without-fp.
1447    with_fp=no ;;
1448
1449  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1450  | --no-cr | --no-c | -n)
1451    no_create=yes ;;
1452
1453  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1454  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1455    no_recursion=yes ;;
1456
1457  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1458  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1459  | --oldin | --oldi | --old | --ol | --o)
1460    ac_prev=oldincludedir ;;
1461  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1462  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1463  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1464    oldincludedir=$ac_optarg ;;
1465
1466  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1467    ac_prev=prefix ;;
1468  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1469    prefix=$ac_optarg ;;
1470
1471  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1472  | --program-pre | --program-pr | --program-p)
1473    ac_prev=program_prefix ;;
1474  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1475  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1476    program_prefix=$ac_optarg ;;
1477
1478  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1479  | --program-suf | --program-su | --program-s)
1480    ac_prev=program_suffix ;;
1481  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1482  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1483    program_suffix=$ac_optarg ;;
1484
1485  -program-transform-name | --program-transform-name \
1486  | --program-transform-nam | --program-transform-na \
1487  | --program-transform-n | --program-transform- \
1488  | --program-transform | --program-transfor \
1489  | --program-transfo | --program-transf \
1490  | --program-trans | --program-tran \
1491  | --progr-tra | --program-tr | --program-t)
1492    ac_prev=program_transform_name ;;
1493  -program-transform-name=* | --program-transform-name=* \
1494  | --program-transform-nam=* | --program-transform-na=* \
1495  | --program-transform-n=* | --program-transform-=* \
1496  | --program-transform=* | --program-transfor=* \
1497  | --program-transfo=* | --program-transf=* \
1498  | --program-trans=* | --program-tran=* \
1499  | --progr-tra=* | --program-tr=* | --program-t=*)
1500    program_transform_name=$ac_optarg ;;
1501
1502  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1503    ac_prev=pdfdir ;;
1504  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1505    pdfdir=$ac_optarg ;;
1506
1507  -psdir | --psdir | --psdi | --psd | --ps)
1508    ac_prev=psdir ;;
1509  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1510    psdir=$ac_optarg ;;
1511
1512  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1513  | -silent | --silent | --silen | --sile | --sil)
1514    silent=yes ;;
1515
1516  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1517    ac_prev=sbindir ;;
1518  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1519  | --sbi=* | --sb=*)
1520    sbindir=$ac_optarg ;;
1521
1522  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1523  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1524  | --sharedst | --shareds | --shared | --share | --shar \
1525  | --sha | --sh)
1526    ac_prev=sharedstatedir ;;
1527  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1528  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1529  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1530  | --sha=* | --sh=*)
1531    sharedstatedir=$ac_optarg ;;
1532
1533  -site | --site | --sit)
1534    ac_prev=site ;;
1535  -site=* | --site=* | --sit=*)
1536    site=$ac_optarg ;;
1537
1538  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1539    ac_prev=srcdir ;;
1540  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1541    srcdir=$ac_optarg ;;
1542
1543  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1544  | --syscon | --sysco | --sysc | --sys | --sy)
1545    ac_prev=sysconfdir ;;
1546  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1547  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1548    sysconfdir=$ac_optarg ;;
1549
1550  -target | --target | --targe | --targ | --tar | --ta | --t)
1551    ac_prev=target_alias ;;
1552  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1553    target_alias=$ac_optarg ;;
1554
1555  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1556    verbose=yes ;;
1557
1558  -version | --version | --versio | --versi | --vers | -V)
1559    ac_init_version=: ;;
1560
1561  -with-* | --with-*)
1562    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1563    # Reject names that are not valid shell variable names.
1564    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1565      as_fn_error $? "invalid package name: $ac_useropt"
1566    ac_useropt_orig=$ac_useropt
1567    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1568    case $ac_user_opts in
1569      *"
1570"with_$ac_useropt"
1571"*) ;;
1572      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1573	 ac_unrecognized_sep=', ';;
1574    esac
1575    eval with_$ac_useropt=\$ac_optarg ;;
1576
1577  -without-* | --without-*)
1578    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1579    # Reject names that are not valid shell variable names.
1580    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1581      as_fn_error $? "invalid package name: $ac_useropt"
1582    ac_useropt_orig=$ac_useropt
1583    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1584    case $ac_user_opts in
1585      *"
1586"with_$ac_useropt"
1587"*) ;;
1588      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1589	 ac_unrecognized_sep=', ';;
1590    esac
1591    eval with_$ac_useropt=no ;;
1592
1593  --x)
1594    # Obsolete; use --with-x.
1595    with_x=yes ;;
1596
1597  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1598  | --x-incl | --x-inc | --x-in | --x-i)
1599    ac_prev=x_includes ;;
1600  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1601  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1602    x_includes=$ac_optarg ;;
1603
1604  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1605  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1606    ac_prev=x_libraries ;;
1607  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1608  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1609    x_libraries=$ac_optarg ;;
1610
1611  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1612Try \`$0 --help' for more information"
1613    ;;
1614
1615  *=*)
1616    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1617    # Reject names that are not valid shell variable names.
1618    case $ac_envvar in #(
1619      '' | [0-9]* | *[!_$as_cr_alnum]* )
1620      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1621    esac
1622    eval $ac_envvar=\$ac_optarg
1623    export $ac_envvar ;;
1624
1625  *)
1626    # FIXME: should be removed in autoconf 3.0.
1627    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1628    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1629      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1630    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1631    ;;
1632
1633  esac
1634done
1635
1636if test -n "$ac_prev"; then
1637  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1638  as_fn_error $? "missing argument to $ac_option"
1639fi
1640
1641if test -n "$ac_unrecognized_opts"; then
1642  case $enable_option_checking in
1643    no) ;;
1644    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1645    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1646  esac
1647fi
1648
1649# Check all directory arguments for consistency.
1650for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1651		datadir sysconfdir sharedstatedir localstatedir includedir \
1652		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1653		libdir localedir mandir
1654do
1655  eval ac_val=\$$ac_var
1656  # Remove trailing slashes.
1657  case $ac_val in
1658    */ )
1659      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1660      eval $ac_var=\$ac_val;;
1661  esac
1662  # Be sure to have absolute directory names.
1663  case $ac_val in
1664    [\\/$]* | ?:[\\/]* )  continue;;
1665    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1666  esac
1667  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1668done
1669
1670# There might be people who depend on the old broken behavior: `$host'
1671# used to hold the argument of --host etc.
1672# FIXME: To remove some day.
1673build=$build_alias
1674host=$host_alias
1675target=$target_alias
1676
1677# FIXME: To remove some day.
1678if test "x$host_alias" != x; then
1679  if test "x$build_alias" = x; then
1680    cross_compiling=maybe
1681  elif test "x$build_alias" != "x$host_alias"; then
1682    cross_compiling=yes
1683  fi
1684fi
1685
1686ac_tool_prefix=
1687test -n "$host_alias" && ac_tool_prefix=$host_alias-
1688
1689test "$silent" = yes && exec 6>/dev/null
1690
1691
1692ac_pwd=`pwd` && test -n "$ac_pwd" &&
1693ac_ls_di=`ls -di .` &&
1694ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1695  as_fn_error $? "working directory cannot be determined"
1696test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1697  as_fn_error $? "pwd does not report name of working directory"
1698
1699
1700# Find the source files, if location was not specified.
1701if test -z "$srcdir"; then
1702  ac_srcdir_defaulted=yes
1703  # Try the directory containing this script, then the parent directory.
1704  ac_confdir=`$as_dirname -- "$as_myself" ||
1705$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1706	 X"$as_myself" : 'X\(//\)[^/]' \| \
1707	 X"$as_myself" : 'X\(//\)$' \| \
1708	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1709$as_echo X"$as_myself" |
1710    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1711	    s//\1/
1712	    q
1713	  }
1714	  /^X\(\/\/\)[^/].*/{
1715	    s//\1/
1716	    q
1717	  }
1718	  /^X\(\/\/\)$/{
1719	    s//\1/
1720	    q
1721	  }
1722	  /^X\(\/\).*/{
1723	    s//\1/
1724	    q
1725	  }
1726	  s/.*/./; q'`
1727  srcdir=$ac_confdir
1728  if test ! -r "$srcdir/$ac_unique_file"; then
1729    srcdir=..
1730  fi
1731else
1732  ac_srcdir_defaulted=no
1733fi
1734if test ! -r "$srcdir/$ac_unique_file"; then
1735  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1736  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1737fi
1738ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1739ac_abs_confdir=`(
1740	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1741	pwd)`
1742# When building in place, set srcdir=.
1743if test "$ac_abs_confdir" = "$ac_pwd"; then
1744  srcdir=.
1745fi
1746# Remove unnecessary trailing slashes from srcdir.
1747# Double slashes in file names in object file debugging info
1748# mess up M-x gdb in Emacs.
1749case $srcdir in
1750*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1751esac
1752for ac_var in $ac_precious_vars; do
1753  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1754  eval ac_env_${ac_var}_value=\$${ac_var}
1755  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1756  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1757done
1758
1759#
1760# Report the --help message.
1761#
1762if test "$ac_init_help" = "long"; then
1763  # Omit some internal or obsolete options to make the list less imposing.
1764  # This message is too long to be a string in the A/UX 3.1 sh.
1765  cat <<_ACEOF
1766\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1767
1768Usage: $0 [OPTION]... [VAR=VALUE]...
1769
1770To assign environment variables (e.g., CC, CFLAGS...), specify them as
1771VAR=VALUE.  See below for descriptions of some of the useful variables.
1772
1773Defaults for the options are specified in brackets.
1774
1775Configuration:
1776  -h, --help              display this help and exit
1777      --help=short        display options specific to this package
1778      --help=recursive    display the short help of all the included packages
1779  -V, --version           display version information and exit
1780  -q, --quiet, --silent   do not print \`checking ...' messages
1781      --cache-file=FILE   cache test results in FILE [disabled]
1782  -C, --config-cache      alias for \`--cache-file=config.cache'
1783  -n, --no-create         do not create output files
1784      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1785
1786Installation directories:
1787  --prefix=PREFIX         install architecture-independent files in PREFIX
1788                          [$ac_default_prefix]
1789  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1790                          [PREFIX]
1791
1792By default, \`make install' will install all the files in
1793\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1794an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1795for instance \`--prefix=\$HOME'.
1796
1797For better control, use the options below.
1798
1799Fine tuning of the installation directories:
1800  --bindir=DIR            user executables [EPREFIX/bin]
1801  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1802  --libexecdir=DIR        program executables [EPREFIX/libexec]
1803  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1804  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1805  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1806  --libdir=DIR            object code libraries [EPREFIX/lib]
1807  --includedir=DIR        C header files [PREFIX/include]
1808  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1809  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1810  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1811  --infodir=DIR           info documentation [DATAROOTDIR/info]
1812  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1813  --mandir=DIR            man documentation [DATAROOTDIR/man]
1814  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1815  --htmldir=DIR           html documentation [DOCDIR]
1816  --dvidir=DIR            dvi documentation [DOCDIR]
1817  --pdfdir=DIR            pdf documentation [DOCDIR]
1818  --psdir=DIR             ps documentation [DOCDIR]
1819_ACEOF
1820
1821  cat <<\_ACEOF
1822
1823X features:
1824  --x-includes=DIR    X include files are in DIR
1825  --x-libraries=DIR   X library files are in DIR
1826
1827System types:
1828  --build=BUILD     configure for building on BUILD [guessed]
1829  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1830  --target=TARGET   configure for building compilers for TARGET [HOST]
1831_ACEOF
1832fi
1833
1834if test -n "$ac_init_help"; then
1835  case $ac_init_help in
1836     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1837   esac
1838  cat <<\_ACEOF
1839
1840Optional Features:
1841  --disable-option-checking  ignore unrecognized --enable/--with options
1842  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1843  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1844  --enable-openjdk-only   suppress building custom source even if present
1845                          [disabled]
1846  --enable-debug          set the debug level to fastdebug (shorthand for
1847                          --with-debug-level=fastdebug) [disabled]
1848  --disable-headful       disable building headful support (graphical UI
1849                          support) [enabled]
1850  --enable-hotspot-test-in-build
1851                          run the Queens test after Hotspot build [disabled]
1852  --enable-unlimited-crypto
1853                          Enable unlimited crypto policy [disabled]
1854  --enable-static-build   enable static library build [disabled]
1855  --disable-warnings-as-errors
1856                          do not consider native warnings to be an error
1857                          [enabled]
1858  --disable-debug-symbols disable generation of debug symbols [enabled]
1859  --disable-zip-debug-info
1860                          disable zipping of debug-info files [enabled]
1861  --enable-native-coverage
1862                          enable native compilation with code coverage
1863                          data[disabled]
1864  --disable-freetype-bundling
1865                          disable bundling of the freetype library with the
1866                          build result [enabled on Windows or when using
1867                          --with-freetype, disabled otherwise]
1868  --enable-sjavac         use sjavac to do fast incremental compiles
1869                          [disabled]
1870  --disable-precompiled-headers
1871                          disable using precompiled headers when compiling C++
1872                          [enabled]
1873  --enable-ccache         enable using ccache to speed up recompilations
1874                          [disabled]
1875
1876Optional Packages:
1877  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1878  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1879  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1880                          support it), e.g. --with-target-bits=32 [guessed]
1881  --with-custom-make-dir  Deprecated. Option is kept for backwards
1882                          compatibility and is ignored
1883  --with-jdk-variant      JDK variant to build (normal) [normal]
1884  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1885  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1886                          client, minimal1, kernel, zero, zeroshark, core)
1887                          [server]
1888  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1889                          optimized (HotSpot build only)) [release]
1890  --with-devkit           use this devkit for compilers, tools and resources
1891  --with-sys-root         alias for --with-sysroot for backwards compatability
1892  --with-sysroot          use this directory as sysroot
1893  --with-tools-dir        alias for --with-toolchain-path for backwards
1894                          compatibility
1895  --with-toolchain-path   prepend these directories when searching for
1896                          toolchain binaries (compilers etc)
1897  --with-extra-path       prepend these directories to the default path
1898  --with-sdk-name         use the platform SDK of the given name. [macosx]
1899  --with-conf-name        use this as the name of the configuration [generated
1900                          from important configuration options]
1901  --with-output-sync      set make output sync type if supported by make.
1902                          [recurse]
1903  --with-cacerts-file     specify alternative cacerts file
1904  --with-milestone        Set milestone value for build [internal]
1905  --with-update-version   Set update version value for build [b00]
1906  --with-user-release-suffix
1907                          Add a custom string to the version string if build
1908                          number is not set.[username_builddateb00]
1909  --with-build-number     Set build number value for build [b00]
1910  --with-copyright-year   Set copyright year value for build [current year]
1911  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1912  --with-add-source-root  for each and every source directory, look in this
1913                          additional source root for the same directory; if it
1914                          exists and have files in it, include it in the build
1915  --with-override-source-root
1916                          for each and every source directory, look in this
1917                          override source root for the same directory; if it
1918                          exists, use that directory instead and ignore the
1919                          directory in the original source root
1920  --with-adds-and-overrides
1921                          use the subdirs 'adds' and 'overrides' in the
1922                          specified directory as add-source-root and
1923                          override-source-root
1924  --with-override-langtools
1925                          use this langtools dir for the build
1926  --with-override-corba   use this corba dir for the build
1927  --with-override-jaxp    use this jaxp dir for the build
1928  --with-override-jaxws   use this jaxws dir for the build
1929  --with-override-hotspot use this hotspot dir for the build
1930  --with-override-nashorn use this nashorn dir for the build
1931  --with-override-jdk     use this jdk dir for the build
1932  --with-import-hotspot   import hotspot binaries from this jdk image or
1933                          hotspot build dist dir instead of building from
1934                          source
1935  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1936                          to show possible values [platform dependent]
1937  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1938  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1939  --with-extra-ldflags    extra flags to be used when linking jdk
1940  --with-toolchain-version
1941                          the version of the toolchain to look for, use
1942                          '--help' to show possible values [platform
1943                          dependent]
1944  --with-jtreg            Regression Test Harness [probed]
1945  --with-stdc++lib=<static>,<dynamic>,<default>
1946                          force linking of the C++ runtime on Linux to either
1947                          static or dynamic, default is static with dynamic as
1948                          fallback
1949  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1950                          (Windows only) [probed]
1951  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1952                          (Windows only) [probed]
1953  --with-x                use the X Window System
1954  --with-cups             specify prefix directory for the cups package
1955                          (expecting the headers under PATH/include)
1956  --with-cups-include     specify directory for the cups include files
1957  --with-freetype         specify prefix directory for the freetype package
1958                          (expecting the libraries under PATH/lib and the
1959                          headers under PATH/include)
1960  --with-freetype-include specify directory for the freetype include files
1961  --with-freetype-lib     specify directory for the freetype library
1962  --with-freetype-src     specify directory with freetype sources to
1963                          automatically build the library (experimental,
1964                          Windows-only)
1965  --with-alsa             specify prefix directory for the alsa package
1966                          (expecting the libraries under PATH/lib and the
1967                          headers under PATH/include)
1968  --with-alsa-include     specify directory for the alsa include files
1969  --with-alsa-lib         specify directory for the alsa library
1970  --with-libffi           specify prefix directory for the libffi package
1971                          (expecting the libraries under PATH/lib and the
1972                          headers under PATH/include)
1973  --with-libffi-include   specify directory for the libffi include files
1974  --with-libffi-lib       specify directory for the libffi library
1975  --with-libjpeg          use libjpeg from build system or OpenJDK source
1976                          (system, bundled) [bundled]
1977  --with-giflib           use giflib from build system or OpenJDK source
1978                          (system, bundled) [bundled]
1979  --with-libpng           use libpng from build system or OpenJDK source
1980                          (system, bundled) [bundled]
1981  --with-zlib             use zlib from build system or OpenJDK source
1982                          (system, bundled) [bundled]
1983  --with-lcms             use lcms2 from build system or OpenJDK source
1984                          (system, bundled) [bundled]
1985  --with-dxsdk            Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-dxsdk-include    Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-num-cores        number of cores in the build system, e.g.
1992                          --with-num-cores=8 [probed]
1993  --with-memory-size      memory (in MB) available in the build system, e.g.
1994                          --with-memory-size=1024 [probed]
1995  --with-jobs             number of parallel jobs to let make run [calculated
1996                          based on cores and memory]
1997  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1998                          invocations of boot JDK, overriding the default
1999                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2000                          -enableassertions"
2001  --with-sjavac-server-java
2002                          use this java binary for running the sjavac
2003                          background server [Boot JDK java]
2004  --with-ccache-dir       where to store ccache files [~/.ccache]
2005
2006Some influential environment variables:
2007  BASENAME    Override default value for BASENAME
2008  BASH        Override default value for BASH
2009  CAT         Override default value for CAT
2010  CHMOD       Override default value for CHMOD
2011  CMP         Override default value for CMP
2012  COMM        Override default value for COMM
2013  CP          Override default value for CP
2014  CUT         Override default value for CUT
2015  DATE        Override default value for DATE
2016  DIFF        Override default value for DIFF
2017  DIRNAME     Override default value for DIRNAME
2018  ECHO        Override default value for ECHO
2019  EXPR        Override default value for EXPR
2020  FILE        Override default value for FILE
2021  FIND        Override default value for FIND
2022  HEAD        Override default value for HEAD
2023  LN          Override default value for LN
2024  LS          Override default value for LS
2025  MKDIR       Override default value for MKDIR
2026  MKTEMP      Override default value for MKTEMP
2027  MV          Override default value for MV
2028  NAWK        Override default value for NAWK
2029  PRINTF      Override default value for PRINTF
2030  RM          Override default value for RM
2031  SH          Override default value for SH
2032  SORT        Override default value for SORT
2033  TAIL        Override default value for TAIL
2034  TAR         Override default value for TAR
2035  TEE         Override default value for TEE
2036  TOUCH       Override default value for TOUCH
2037  TR          Override default value for TR
2038  UNAME       Override default value for UNAME
2039  UNIQ        Override default value for UNIQ
2040  WC          Override default value for WC
2041  WHICH       Override default value for WHICH
2042  XARGS       Override default value for XARGS
2043  AWK         Override default value for AWK
2044  GREP        Override default value for GREP
2045  EGREP       Override default value for EGREP
2046  FGREP       Override default value for FGREP
2047  SED         Override default value for SED
2048  CYGPATH     Override default value for CYGPATH
2049  READLINK    Override default value for READLINK
2050  DF          Override default value for DF
2051  CPIO        Override default value for CPIO
2052  NICE        Override default value for NICE
2053  UNZIP       Override default value for UNZIP
2054  ZIP         Override default value for ZIP
2055  LDD         Override default value for LDD
2056  OTOOL       Override default value for OTOOL
2057  READELF     Override default value for READELF
2058  HG          Override default value for HG
2059  STAT        Override default value for STAT
2060  TIME        Override default value for TIME
2061  PATCH       Override default value for PATCH
2062  DSYMUTIL    Override default value for DSYMUTIL
2063  XATTR       Override default value for XATTR
2064  CODESIGN    Override default value for CODESIGN
2065  SETFILE     Override default value for SETFILE
2066  PKG_CONFIG  path to pkg-config utility
2067  JAVA        Override default value for JAVA
2068  JAVAC       Override default value for JAVAC
2069  JAVAH       Override default value for JAVAH
2070  JAR         Override default value for JAR
2071  JARSIGNER   Override default value for JARSIGNER
2072  CC          C compiler command
2073  CFLAGS      C compiler flags
2074  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2075              nonstandard directory <lib dir>
2076  LIBS        libraries to pass to the linker, e.g. -l<library>
2077  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2078              you have headers in a nonstandard directory <include dir>
2079  CXX         C++ compiler command
2080  CXXFLAGS    C++ compiler flags
2081  CPP         C preprocessor
2082  CXXCPP      C++ preprocessor
2083  AS          Override default value for AS
2084  AR          Override default value for AR
2085  LIPO        Override default value for LIPO
2086  STRIP       Override default value for STRIP
2087  NM          Override default value for NM
2088  GNM         Override default value for GNM
2089  OBJCOPY     Override default value for OBJCOPY
2090  OBJDUMP     Override default value for OBJDUMP
2091  BUILD_CC    Override default value for BUILD_CC
2092  BUILD_CXX   Override default value for BUILD_CXX
2093  BUILD_LD    Override default value for BUILD_LD
2094  JTREGEXE    Override default value for JTREGEXE
2095  XMKMF       Path to xmkmf, Makefile generator for X Window System
2096  FREETYPE_CFLAGS
2097              C compiler flags for FREETYPE, overriding pkg-config
2098  FREETYPE_LIBS
2099              linker flags for FREETYPE, overriding pkg-config
2100  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2101  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2102  LIBFFI_CFLAGS
2103              C compiler flags for LIBFFI, overriding pkg-config
2104  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2105  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2106  PNG_LIBS    linker flags for PNG, overriding pkg-config
2107  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2108  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2109  CCACHE      Override default value for CCACHE
2110
2111Use these variables to override the choices made by `configure' or to help
2112it to find libraries and programs with nonstandard names/locations.
2113
2114Report bugs to <build-dev@openjdk.java.net>.
2115OpenJDK home page: <http://openjdk.java.net>.
2116_ACEOF
2117ac_status=$?
2118fi
2119
2120if test "$ac_init_help" = "recursive"; then
2121  # If there are subdirs, report their specific --help.
2122  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2123    test -d "$ac_dir" ||
2124      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2125      continue
2126    ac_builddir=.
2127
2128case "$ac_dir" in
2129.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2130*)
2131  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2132  # A ".." for each directory in $ac_dir_suffix.
2133  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2134  case $ac_top_builddir_sub in
2135  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2136  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2137  esac ;;
2138esac
2139ac_abs_top_builddir=$ac_pwd
2140ac_abs_builddir=$ac_pwd$ac_dir_suffix
2141# for backward compatibility:
2142ac_top_builddir=$ac_top_build_prefix
2143
2144case $srcdir in
2145  .)  # We are building in place.
2146    ac_srcdir=.
2147    ac_top_srcdir=$ac_top_builddir_sub
2148    ac_abs_top_srcdir=$ac_pwd ;;
2149  [\\/]* | ?:[\\/]* )  # Absolute name.
2150    ac_srcdir=$srcdir$ac_dir_suffix;
2151    ac_top_srcdir=$srcdir
2152    ac_abs_top_srcdir=$srcdir ;;
2153  *) # Relative name.
2154    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2155    ac_top_srcdir=$ac_top_build_prefix$srcdir
2156    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2157esac
2158ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2159
2160    cd "$ac_dir" || { ac_status=$?; continue; }
2161    # Check for guested configure.
2162    if test -f "$ac_srcdir/configure.gnu"; then
2163      echo &&
2164      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2165    elif test -f "$ac_srcdir/configure"; then
2166      echo &&
2167      $SHELL "$ac_srcdir/configure" --help=recursive
2168    else
2169      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2170    fi || ac_status=$?
2171    cd "$ac_pwd" || { ac_status=$?; break; }
2172  done
2173fi
2174
2175test -n "$ac_init_help" && exit $ac_status
2176if $ac_init_version; then
2177  cat <<\_ACEOF
2178OpenJDK configure jdk9
2179generated by GNU Autoconf 2.69
2180
2181Copyright (C) 2012 Free Software Foundation, Inc.
2182This configure script is free software; the Free Software Foundation
2183gives unlimited permission to copy, distribute and modify it.
2184_ACEOF
2185  exit
2186fi
2187
2188## ------------------------ ##
2189## Autoconf initialization. ##
2190## ------------------------ ##
2191
2192# ac_fn_c_try_compile LINENO
2193# --------------------------
2194# Try to compile conftest.$ac_ext, and return whether this succeeded.
2195ac_fn_c_try_compile ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  rm -f conftest.$ac_objext
2199  if { { ac_try="$ac_compile"
2200case "(($ac_try" in
2201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2202  *) ac_try_echo=$ac_try;;
2203esac
2204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2205$as_echo "$ac_try_echo"; } >&5
2206  (eval "$ac_compile") 2>conftest.err
2207  ac_status=$?
2208  if test -s conftest.err; then
2209    grep -v '^ *+' conftest.err >conftest.er1
2210    cat conftest.er1 >&5
2211    mv -f conftest.er1 conftest.err
2212  fi
2213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2214  test $ac_status = 0; } && {
2215	 test -z "$ac_c_werror_flag" ||
2216	 test ! -s conftest.err
2217       } && test -s conftest.$ac_objext; then :
2218  ac_retval=0
2219else
2220  $as_echo "$as_me: failed program was:" >&5
2221sed 's/^/| /' conftest.$ac_ext >&5
2222
2223	ac_retval=1
2224fi
2225  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226  as_fn_set_status $ac_retval
2227
2228} # ac_fn_c_try_compile
2229
2230# ac_fn_cxx_try_compile LINENO
2231# ----------------------------
2232# Try to compile conftest.$ac_ext, and return whether this succeeded.
2233ac_fn_cxx_try_compile ()
2234{
2235  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236  rm -f conftest.$ac_objext
2237  if { { ac_try="$ac_compile"
2238case "(($ac_try" in
2239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2240  *) ac_try_echo=$ac_try;;
2241esac
2242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2243$as_echo "$ac_try_echo"; } >&5
2244  (eval "$ac_compile") 2>conftest.err
2245  ac_status=$?
2246  if test -s conftest.err; then
2247    grep -v '^ *+' conftest.err >conftest.er1
2248    cat conftest.er1 >&5
2249    mv -f conftest.er1 conftest.err
2250  fi
2251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2252  test $ac_status = 0; } && {
2253	 test -z "$ac_cxx_werror_flag" ||
2254	 test ! -s conftest.err
2255       } && test -s conftest.$ac_objext; then :
2256  ac_retval=0
2257else
2258  $as_echo "$as_me: failed program was:" >&5
2259sed 's/^/| /' conftest.$ac_ext >&5
2260
2261	ac_retval=1
2262fi
2263  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2264  as_fn_set_status $ac_retval
2265
2266} # ac_fn_cxx_try_compile
2267
2268# ac_fn_c_try_cpp LINENO
2269# ----------------------
2270# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2271ac_fn_c_try_cpp ()
2272{
2273  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274  if { { ac_try="$ac_cpp conftest.$ac_ext"
2275case "(($ac_try" in
2276  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2277  *) ac_try_echo=$ac_try;;
2278esac
2279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2280$as_echo "$ac_try_echo"; } >&5
2281  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2282  ac_status=$?
2283  if test -s conftest.err; then
2284    grep -v '^ *+' conftest.err >conftest.er1
2285    cat conftest.er1 >&5
2286    mv -f conftest.er1 conftest.err
2287  fi
2288  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2289  test $ac_status = 0; } > conftest.i && {
2290	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2291	 test ! -s conftest.err
2292       }; then :
2293  ac_retval=0
2294else
2295  $as_echo "$as_me: failed program was:" >&5
2296sed 's/^/| /' conftest.$ac_ext >&5
2297
2298    ac_retval=1
2299fi
2300  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301  as_fn_set_status $ac_retval
2302
2303} # ac_fn_c_try_cpp
2304
2305# ac_fn_cxx_try_cpp LINENO
2306# ------------------------
2307# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2308ac_fn_cxx_try_cpp ()
2309{
2310  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311  if { { ac_try="$ac_cpp conftest.$ac_ext"
2312case "(($ac_try" in
2313  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2314  *) ac_try_echo=$ac_try;;
2315esac
2316eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2317$as_echo "$ac_try_echo"; } >&5
2318  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2319  ac_status=$?
2320  if test -s conftest.err; then
2321    grep -v '^ *+' conftest.err >conftest.er1
2322    cat conftest.er1 >&5
2323    mv -f conftest.er1 conftest.err
2324  fi
2325  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2326  test $ac_status = 0; } > conftest.i && {
2327	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2328	 test ! -s conftest.err
2329       }; then :
2330  ac_retval=0
2331else
2332  $as_echo "$as_me: failed program was:" >&5
2333sed 's/^/| /' conftest.$ac_ext >&5
2334
2335    ac_retval=1
2336fi
2337  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2338  as_fn_set_status $ac_retval
2339
2340} # ac_fn_cxx_try_cpp
2341
2342# ac_fn_c_try_link LINENO
2343# -----------------------
2344# Try to link conftest.$ac_ext, and return whether this succeeded.
2345ac_fn_c_try_link ()
2346{
2347  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348  rm -f conftest.$ac_objext conftest$ac_exeext
2349  if { { ac_try="$ac_link"
2350case "(($ac_try" in
2351  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2352  *) ac_try_echo=$ac_try;;
2353esac
2354eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2355$as_echo "$ac_try_echo"; } >&5
2356  (eval "$ac_link") 2>conftest.err
2357  ac_status=$?
2358  if test -s conftest.err; then
2359    grep -v '^ *+' conftest.err >conftest.er1
2360    cat conftest.er1 >&5
2361    mv -f conftest.er1 conftest.err
2362  fi
2363  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2364  test $ac_status = 0; } && {
2365	 test -z "$ac_c_werror_flag" ||
2366	 test ! -s conftest.err
2367       } && test -s conftest$ac_exeext && {
2368	 test "$cross_compiling" = yes ||
2369	 test -x conftest$ac_exeext
2370       }; then :
2371  ac_retval=0
2372else
2373  $as_echo "$as_me: failed program was:" >&5
2374sed 's/^/| /' conftest.$ac_ext >&5
2375
2376	ac_retval=1
2377fi
2378  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2379  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2380  # interfere with the next link command; also delete a directory that is
2381  # left behind by Apple's compiler.  We do this before executing the actions.
2382  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2383  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2384  as_fn_set_status $ac_retval
2385
2386} # ac_fn_c_try_link
2387
2388# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2389# ---------------------------------------------------------
2390# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2391# the include files in INCLUDES and setting the cache variable VAR
2392# accordingly.
2393ac_fn_cxx_check_header_mongrel ()
2394{
2395  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2396  if eval \${$3+:} false; then :
2397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2398$as_echo_n "checking for $2... " >&6; }
2399if eval \${$3+:} false; then :
2400  $as_echo_n "(cached) " >&6
2401fi
2402eval ac_res=\$$3
2403	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404$as_echo "$ac_res" >&6; }
2405else
2406  # Is the header compilable?
2407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2408$as_echo_n "checking $2 usability... " >&6; }
2409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410/* end confdefs.h.  */
2411$4
2412#include <$2>
2413_ACEOF
2414if ac_fn_cxx_try_compile "$LINENO"; then :
2415  ac_header_compiler=yes
2416else
2417  ac_header_compiler=no
2418fi
2419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2421$as_echo "$ac_header_compiler" >&6; }
2422
2423# Is the header present?
2424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2425$as_echo_n "checking $2 presence... " >&6; }
2426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427/* end confdefs.h.  */
2428#include <$2>
2429_ACEOF
2430if ac_fn_cxx_try_cpp "$LINENO"; then :
2431  ac_header_preproc=yes
2432else
2433  ac_header_preproc=no
2434fi
2435rm -f conftest.err conftest.i conftest.$ac_ext
2436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2437$as_echo "$ac_header_preproc" >&6; }
2438
2439# So?  What about this header?
2440case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2441  yes:no: )
2442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2443$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2444    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2445$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2446    ;;
2447  no:yes:* )
2448    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2449$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2451$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2452    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2453$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2455$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2457$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2458( $as_echo "## ----------------------------------------- ##
2459## Report this to build-dev@openjdk.java.net ##
2460## ----------------------------------------- ##"
2461     ) | sed "s/^/$as_me: WARNING:     /" >&2
2462    ;;
2463esac
2464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465$as_echo_n "checking for $2... " >&6; }
2466if eval \${$3+:} false; then :
2467  $as_echo_n "(cached) " >&6
2468else
2469  eval "$3=\$ac_header_compiler"
2470fi
2471eval ac_res=\$$3
2472	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473$as_echo "$ac_res" >&6; }
2474fi
2475  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2476
2477} # ac_fn_cxx_check_header_mongrel
2478
2479# ac_fn_cxx_try_run LINENO
2480# ------------------------
2481# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2482# that executables *can* be run.
2483ac_fn_cxx_try_run ()
2484{
2485  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2486  if { { ac_try="$ac_link"
2487case "(($ac_try" in
2488  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2489  *) ac_try_echo=$ac_try;;
2490esac
2491eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2492$as_echo "$ac_try_echo"; } >&5
2493  (eval "$ac_link") 2>&5
2494  ac_status=$?
2495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2497  { { case "(($ac_try" in
2498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499  *) ac_try_echo=$ac_try;;
2500esac
2501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2502$as_echo "$ac_try_echo"; } >&5
2503  (eval "$ac_try") 2>&5
2504  ac_status=$?
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; }; }; then :
2507  ac_retval=0
2508else
2509  $as_echo "$as_me: program exited with status $ac_status" >&5
2510       $as_echo "$as_me: failed program was:" >&5
2511sed 's/^/| /' conftest.$ac_ext >&5
2512
2513       ac_retval=$ac_status
2514fi
2515  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_cxx_try_run
2520
2521# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2522# ---------------------------------------------------------
2523# Tests whether HEADER exists and can be compiled using the include files in
2524# INCLUDES, setting the cache variable VAR accordingly.
2525ac_fn_cxx_check_header_compile ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2529$as_echo_n "checking for $2... " >&6; }
2530if eval \${$3+:} false; then :
2531  $as_echo_n "(cached) " >&6
2532else
2533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534/* end confdefs.h.  */
2535$4
2536#include <$2>
2537_ACEOF
2538if ac_fn_cxx_try_compile "$LINENO"; then :
2539  eval "$3=yes"
2540else
2541  eval "$3=no"
2542fi
2543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2544fi
2545eval ac_res=\$$3
2546	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2547$as_echo "$ac_res" >&6; }
2548  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2549
2550} # ac_fn_cxx_check_header_compile
2551
2552# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2553# ----------------------------------------------
2554# Tries to find the compile-time value of EXPR in a program that includes
2555# INCLUDES, setting VAR accordingly. Returns whether the value could be
2556# computed
2557ac_fn_cxx_compute_int ()
2558{
2559  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560  if test "$cross_compiling" = yes; then
2561    # Depending upon the size, compute the lo and hi bounds.
2562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2563/* end confdefs.h.  */
2564$4
2565int
2566main ()
2567{
2568static int test_array [1 - 2 * !(($2) >= 0)];
2569test_array [0] = 0;
2570return test_array [0];
2571
2572  ;
2573  return 0;
2574}
2575_ACEOF
2576if ac_fn_cxx_try_compile "$LINENO"; then :
2577  ac_lo=0 ac_mid=0
2578  while :; do
2579    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580/* end confdefs.h.  */
2581$4
2582int
2583main ()
2584{
2585static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2586test_array [0] = 0;
2587return test_array [0];
2588
2589  ;
2590  return 0;
2591}
2592_ACEOF
2593if ac_fn_cxx_try_compile "$LINENO"; then :
2594  ac_hi=$ac_mid; break
2595else
2596  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2597			if test $ac_lo -le $ac_mid; then
2598			  ac_lo= ac_hi=
2599			  break
2600			fi
2601			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2602fi
2603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604  done
2605else
2606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609int
2610main ()
2611{
2612static int test_array [1 - 2 * !(($2) < 0)];
2613test_array [0] = 0;
2614return test_array [0];
2615
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_compile "$LINENO"; then :
2621  ac_hi=-1 ac_mid=-1
2622  while :; do
2623    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h.  */
2625$4
2626int
2627main ()
2628{
2629static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2630test_array [0] = 0;
2631return test_array [0];
2632
2633  ;
2634  return 0;
2635}
2636_ACEOF
2637if ac_fn_cxx_try_compile "$LINENO"; then :
2638  ac_lo=$ac_mid; break
2639else
2640  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2641			if test $ac_mid -le $ac_hi; then
2642			  ac_lo= ac_hi=
2643			  break
2644			fi
2645			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2646fi
2647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2648  done
2649else
2650  ac_lo= ac_hi=
2651fi
2652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2653fi
2654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2655# Binary search between lo and hi bounds.
2656while test "x$ac_lo" != "x$ac_hi"; do
2657  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2659/* end confdefs.h.  */
2660$4
2661int
2662main ()
2663{
2664static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2665test_array [0] = 0;
2666return test_array [0];
2667
2668  ;
2669  return 0;
2670}
2671_ACEOF
2672if ac_fn_cxx_try_compile "$LINENO"; then :
2673  ac_hi=$ac_mid
2674else
2675  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2676fi
2677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2678done
2679case $ac_lo in #((
2680?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2681'') ac_retval=1 ;;
2682esac
2683  else
2684    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2685/* end confdefs.h.  */
2686$4
2687static long int longval () { return $2; }
2688static unsigned long int ulongval () { return $2; }
2689#include <stdio.h>
2690#include <stdlib.h>
2691int
2692main ()
2693{
2694
2695  FILE *f = fopen ("conftest.val", "w");
2696  if (! f)
2697    return 1;
2698  if (($2) < 0)
2699    {
2700      long int i = longval ();
2701      if (i != ($2))
2702	return 1;
2703      fprintf (f, "%ld", i);
2704    }
2705  else
2706    {
2707      unsigned long int i = ulongval ();
2708      if (i != ($2))
2709	return 1;
2710      fprintf (f, "%lu", i);
2711    }
2712  /* Do not output a trailing newline, as this causes \r\n confusion
2713     on some platforms.  */
2714  return ferror (f) || fclose (f) != 0;
2715
2716  ;
2717  return 0;
2718}
2719_ACEOF
2720if ac_fn_cxx_try_run "$LINENO"; then :
2721  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2722else
2723  ac_retval=1
2724fi
2725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2726  conftest.$ac_objext conftest.beam conftest.$ac_ext
2727rm -f conftest.val
2728
2729  fi
2730  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2731  as_fn_set_status $ac_retval
2732
2733} # ac_fn_cxx_compute_int
2734
2735# ac_fn_cxx_try_link LINENO
2736# -------------------------
2737# Try to link conftest.$ac_ext, and return whether this succeeded.
2738ac_fn_cxx_try_link ()
2739{
2740  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2741  rm -f conftest.$ac_objext conftest$ac_exeext
2742  if { { ac_try="$ac_link"
2743case "(($ac_try" in
2744  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2745  *) ac_try_echo=$ac_try;;
2746esac
2747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2748$as_echo "$ac_try_echo"; } >&5
2749  (eval "$ac_link") 2>conftest.err
2750  ac_status=$?
2751  if test -s conftest.err; then
2752    grep -v '^ *+' conftest.err >conftest.er1
2753    cat conftest.er1 >&5
2754    mv -f conftest.er1 conftest.err
2755  fi
2756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2757  test $ac_status = 0; } && {
2758	 test -z "$ac_cxx_werror_flag" ||
2759	 test ! -s conftest.err
2760       } && test -s conftest$ac_exeext && {
2761	 test "$cross_compiling" = yes ||
2762	 test -x conftest$ac_exeext
2763       }; then :
2764  ac_retval=0
2765else
2766  $as_echo "$as_me: failed program was:" >&5
2767sed 's/^/| /' conftest.$ac_ext >&5
2768
2769	ac_retval=1
2770fi
2771  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2772  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2773  # interfere with the next link command; also delete a directory that is
2774  # left behind by Apple's compiler.  We do this before executing the actions.
2775  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2776  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2777  as_fn_set_status $ac_retval
2778
2779} # ac_fn_cxx_try_link
2780
2781# ac_fn_cxx_check_func LINENO FUNC VAR
2782# ------------------------------------
2783# Tests whether FUNC exists, setting the cache variable VAR accordingly
2784ac_fn_cxx_check_func ()
2785{
2786  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2788$as_echo_n "checking for $2... " >&6; }
2789if eval \${$3+:} false; then :
2790  $as_echo_n "(cached) " >&6
2791else
2792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793/* end confdefs.h.  */
2794/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2795   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2796#define $2 innocuous_$2
2797
2798/* System header to define __stub macros and hopefully few prototypes,
2799    which can conflict with char $2 (); below.
2800    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2801    <limits.h> exists even on freestanding compilers.  */
2802
2803#ifdef __STDC__
2804# include <limits.h>
2805#else
2806# include <assert.h>
2807#endif
2808
2809#undef $2
2810
2811/* Override any GCC internal prototype to avoid an error.
2812   Use char because int might match the return type of a GCC
2813   builtin and then its argument prototype would still apply.  */
2814#ifdef __cplusplus
2815extern "C"
2816#endif
2817char $2 ();
2818/* The GNU C library defines this for functions which it implements
2819    to always fail with ENOSYS.  Some functions are actually named
2820    something starting with __ and the normal name is an alias.  */
2821#if defined __stub_$2 || defined __stub___$2
2822choke me
2823#endif
2824
2825int
2826main ()
2827{
2828return $2 ();
2829  ;
2830  return 0;
2831}
2832_ACEOF
2833if ac_fn_cxx_try_link "$LINENO"; then :
2834  eval "$3=yes"
2835else
2836  eval "$3=no"
2837fi
2838rm -f core conftest.err conftest.$ac_objext \
2839    conftest$ac_exeext conftest.$ac_ext
2840fi
2841eval ac_res=\$$3
2842	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2843$as_echo "$ac_res" >&6; }
2844  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2845
2846} # ac_fn_cxx_check_func
2847
2848# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2849# -------------------------------------------------------
2850# Tests whether HEADER exists and can be compiled using the include files in
2851# INCLUDES, setting the cache variable VAR accordingly.
2852ac_fn_c_check_header_compile ()
2853{
2854  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2856$as_echo_n "checking for $2... " >&6; }
2857if eval \${$3+:} false; then :
2858  $as_echo_n "(cached) " >&6
2859else
2860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861/* end confdefs.h.  */
2862$4
2863#include <$2>
2864_ACEOF
2865if ac_fn_c_try_compile "$LINENO"; then :
2866  eval "$3=yes"
2867else
2868  eval "$3=no"
2869fi
2870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871fi
2872eval ac_res=\$$3
2873	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2874$as_echo "$ac_res" >&6; }
2875  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2876
2877} # ac_fn_c_check_header_compile
2878cat >config.log <<_ACEOF
2879This file contains any messages produced by compilers while
2880running configure, to aid debugging if configure makes a mistake.
2881
2882It was created by OpenJDK $as_me jdk9, which was
2883generated by GNU Autoconf 2.69.  Invocation command line was
2884
2885  $ $0 $@
2886
2887_ACEOF
2888exec 5>>config.log
2889{
2890cat <<_ASUNAME
2891## --------- ##
2892## Platform. ##
2893## --------- ##
2894
2895hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2896uname -m = `(uname -m) 2>/dev/null || echo unknown`
2897uname -r = `(uname -r) 2>/dev/null || echo unknown`
2898uname -s = `(uname -s) 2>/dev/null || echo unknown`
2899uname -v = `(uname -v) 2>/dev/null || echo unknown`
2900
2901/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2902/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2903
2904/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2905/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2906/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2907/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2908/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2909/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2910/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2911
2912_ASUNAME
2913
2914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2915for as_dir in $PATH
2916do
2917  IFS=$as_save_IFS
2918  test -z "$as_dir" && as_dir=.
2919    $as_echo "PATH: $as_dir"
2920  done
2921IFS=$as_save_IFS
2922
2923} >&5
2924
2925cat >&5 <<_ACEOF
2926
2927
2928## ----------- ##
2929## Core tests. ##
2930## ----------- ##
2931
2932_ACEOF
2933
2934
2935# Keep a trace of the command line.
2936# Strip out --no-create and --no-recursion so they do not pile up.
2937# Strip out --silent because we don't want to record it for future runs.
2938# Also quote any args containing shell meta-characters.
2939# Make two passes to allow for proper duplicate-argument suppression.
2940ac_configure_args=
2941ac_configure_args0=
2942ac_configure_args1=
2943ac_must_keep_next=false
2944for ac_pass in 1 2
2945do
2946  for ac_arg
2947  do
2948    case $ac_arg in
2949    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2950    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2951    | -silent | --silent | --silen | --sile | --sil)
2952      continue ;;
2953    *\'*)
2954      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2955    esac
2956    case $ac_pass in
2957    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2958    2)
2959      as_fn_append ac_configure_args1 " '$ac_arg'"
2960      if test $ac_must_keep_next = true; then
2961	ac_must_keep_next=false # Got value, back to normal.
2962      else
2963	case $ac_arg in
2964	  *=* | --config-cache | -C | -disable-* | --disable-* \
2965	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2966	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2967	  | -with-* | --with-* | -without-* | --without-* | --x)
2968	    case "$ac_configure_args0 " in
2969	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2970	    esac
2971	    ;;
2972	  -* ) ac_must_keep_next=true ;;
2973	esac
2974      fi
2975      as_fn_append ac_configure_args " '$ac_arg'"
2976      ;;
2977    esac
2978  done
2979done
2980{ ac_configure_args0=; unset ac_configure_args0;}
2981{ ac_configure_args1=; unset ac_configure_args1;}
2982
2983# When interrupted or exit'd, cleanup temporary files, and complete
2984# config.log.  We remove comments because anyway the quotes in there
2985# would cause problems or look ugly.
2986# WARNING: Use '\'' to represent an apostrophe within the trap.
2987# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2988trap 'exit_status=$?
2989  # Save into config.log some information that might help in debugging.
2990  {
2991    echo
2992
2993    $as_echo "## ---------------- ##
2994## Cache variables. ##
2995## ---------------- ##"
2996    echo
2997    # The following way of writing the cache mishandles newlines in values,
2998(
2999  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3000    eval ac_val=\$$ac_var
3001    case $ac_val in #(
3002    *${as_nl}*)
3003      case $ac_var in #(
3004      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3005$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3006      esac
3007      case $ac_var in #(
3008      _ | IFS | as_nl) ;; #(
3009      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3010      *) { eval $ac_var=; unset $ac_var;} ;;
3011      esac ;;
3012    esac
3013  done
3014  (set) 2>&1 |
3015    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3016    *${as_nl}ac_space=\ *)
3017      sed -n \
3018	"s/'\''/'\''\\\\'\'''\''/g;
3019	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3020      ;; #(
3021    *)
3022      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3023      ;;
3024    esac |
3025    sort
3026)
3027    echo
3028
3029    $as_echo "## ----------------- ##
3030## Output variables. ##
3031## ----------------- ##"
3032    echo
3033    for ac_var in $ac_subst_vars
3034    do
3035      eval ac_val=\$$ac_var
3036      case $ac_val in
3037      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3038      esac
3039      $as_echo "$ac_var='\''$ac_val'\''"
3040    done | sort
3041    echo
3042
3043    if test -n "$ac_subst_files"; then
3044      $as_echo "## ------------------- ##
3045## File substitutions. ##
3046## ------------------- ##"
3047      echo
3048      for ac_var in $ac_subst_files
3049      do
3050	eval ac_val=\$$ac_var
3051	case $ac_val in
3052	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3053	esac
3054	$as_echo "$ac_var='\''$ac_val'\''"
3055      done | sort
3056      echo
3057    fi
3058
3059    if test -s confdefs.h; then
3060      $as_echo "## ----------- ##
3061## confdefs.h. ##
3062## ----------- ##"
3063      echo
3064      cat confdefs.h
3065      echo
3066    fi
3067    test "$ac_signal" != 0 &&
3068      $as_echo "$as_me: caught signal $ac_signal"
3069    $as_echo "$as_me: exit $exit_status"
3070  } >&5
3071  rm -f core *.core core.conftest.* &&
3072    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3073    exit $exit_status
3074' 0
3075for ac_signal in 1 2 13 15; do
3076  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3077done
3078ac_signal=0
3079
3080# confdefs.h avoids OS command line length limits that DEFS can exceed.
3081rm -f -r conftest* confdefs.h
3082
3083$as_echo "/* confdefs.h */" > confdefs.h
3084
3085# Predefined preprocessor variables.
3086
3087cat >>confdefs.h <<_ACEOF
3088#define PACKAGE_NAME "$PACKAGE_NAME"
3089_ACEOF
3090
3091cat >>confdefs.h <<_ACEOF
3092#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3093_ACEOF
3094
3095cat >>confdefs.h <<_ACEOF
3096#define PACKAGE_VERSION "$PACKAGE_VERSION"
3097_ACEOF
3098
3099cat >>confdefs.h <<_ACEOF
3100#define PACKAGE_STRING "$PACKAGE_STRING"
3101_ACEOF
3102
3103cat >>confdefs.h <<_ACEOF
3104#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3105_ACEOF
3106
3107cat >>confdefs.h <<_ACEOF
3108#define PACKAGE_URL "$PACKAGE_URL"
3109_ACEOF
3110
3111
3112# Let the site file select an alternate cache file if it wants to.
3113# Prefer an explicitly selected file to automatically selected ones.
3114ac_site_file1=NONE
3115ac_site_file2=NONE
3116if test -n "$CONFIG_SITE"; then
3117  # We do not want a PATH search for config.site.
3118  case $CONFIG_SITE in #((
3119    -*)  ac_site_file1=./$CONFIG_SITE;;
3120    */*) ac_site_file1=$CONFIG_SITE;;
3121    *)   ac_site_file1=./$CONFIG_SITE;;
3122  esac
3123elif test "x$prefix" != xNONE; then
3124  ac_site_file1=$prefix/share/config.site
3125  ac_site_file2=$prefix/etc/config.site
3126else
3127  ac_site_file1=$ac_default_prefix/share/config.site
3128  ac_site_file2=$ac_default_prefix/etc/config.site
3129fi
3130for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3131do
3132  test "x$ac_site_file" = xNONE && continue
3133  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3134    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3135$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3136    sed 's/^/| /' "$ac_site_file" >&5
3137    . "$ac_site_file" \
3138      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140as_fn_error $? "failed to load site script $ac_site_file
3141See \`config.log' for more details" "$LINENO" 5; }
3142  fi
3143done
3144
3145if test -r "$cache_file"; then
3146  # Some versions of bash will fail to source /dev/null (special files
3147  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3148  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3149    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3150$as_echo "$as_me: loading cache $cache_file" >&6;}
3151    case $cache_file in
3152      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3153      *)                      . "./$cache_file";;
3154    esac
3155  fi
3156else
3157  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3158$as_echo "$as_me: creating cache $cache_file" >&6;}
3159  >$cache_file
3160fi
3161
3162# Check that the precious variables saved in the cache have kept the same
3163# value.
3164ac_cache_corrupted=false
3165for ac_var in $ac_precious_vars; do
3166  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3167  eval ac_new_set=\$ac_env_${ac_var}_set
3168  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3169  eval ac_new_val=\$ac_env_${ac_var}_value
3170  case $ac_old_set,$ac_new_set in
3171    set,)
3172      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3173$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3174      ac_cache_corrupted=: ;;
3175    ,set)
3176      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3177$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3178      ac_cache_corrupted=: ;;
3179    ,);;
3180    *)
3181      if test "x$ac_old_val" != "x$ac_new_val"; then
3182	# differences in whitespace do not lead to failure.
3183	ac_old_val_w=`echo x $ac_old_val`
3184	ac_new_val_w=`echo x $ac_new_val`
3185	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3186	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3187$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3188	  ac_cache_corrupted=:
3189	else
3190	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3191$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3192	  eval $ac_var=\$ac_old_val
3193	fi
3194	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3195$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3196	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3197$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3198      fi;;
3199  esac
3200  # Pass precious variables to config.status.
3201  if test "$ac_new_set" = set; then
3202    case $ac_new_val in
3203    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3204    *) ac_arg=$ac_var=$ac_new_val ;;
3205    esac
3206    case " $ac_configure_args " in
3207      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3208      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3209    esac
3210  fi
3211done
3212if $ac_cache_corrupted; then
3213  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3214$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3215  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3216$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3217  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3218fi
3219## -------------------- ##
3220## Main body of script. ##
3221## -------------------- ##
3222
3223ac_ext=c
3224ac_cpp='$CPP $CPPFLAGS'
3225ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3226ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3227ac_compiler_gnu=$ac_cv_c_compiler_gnu
3228
3229
3230
3231ac_aux_dir=
3232for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3233  if test -f "$ac_dir/install-sh"; then
3234    ac_aux_dir=$ac_dir
3235    ac_install_sh="$ac_aux_dir/install-sh -c"
3236    break
3237  elif test -f "$ac_dir/install.sh"; then
3238    ac_aux_dir=$ac_dir
3239    ac_install_sh="$ac_aux_dir/install.sh -c"
3240    break
3241  elif test -f "$ac_dir/shtool"; then
3242    ac_aux_dir=$ac_dir
3243    ac_install_sh="$ac_aux_dir/shtool install -c"
3244    break
3245  fi
3246done
3247if test -z "$ac_aux_dir"; then
3248  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
3249fi
3250
3251# These three variables are undocumented and unsupported,
3252# and are intended to be withdrawn in a future Autoconf release.
3253# They can cause serious problems if a builder's source tree is in a directory
3254# whose full name contains unusual characters.
3255ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3256ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3257ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3258
3259
3260# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3261
3262#
3263# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3264# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3265#
3266# This code is free software; you can redistribute it and/or modify it
3267# under the terms of the GNU General Public License version 2 only, as
3268# published by the Free Software Foundation.  Oracle designates this
3269# particular file as subject to the "Classpath" exception as provided
3270# by Oracle in the LICENSE file that accompanied this code.
3271#
3272# This code is distributed in the hope that it will be useful, but WITHOUT
3273# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3274# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3275# version 2 for more details (a copy is included in the LICENSE file that
3276# accompanied this code).
3277#
3278# You should have received a copy of the GNU General Public License version
3279# 2 along with this work; if not, write to the Free Software Foundation,
3280# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3281#
3282# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3283# or visit www.oracle.com if you need additional information or have any
3284# questions.
3285#
3286
3287#
3288# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3289#
3290# This program is free software; you can redistribute it and/or modify
3291# it under the terms of the GNU General Public License as published by
3292# the Free Software Foundation; either version 2 of the License, or
3293# (at your option) any later version.
3294#
3295# This program is distributed in the hope that it will be useful, but
3296# WITHOUT ANY WARRANTY; without even the implied warranty of
3297# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3298# General Public License for more details.
3299#
3300# You should have received a copy of the GNU General Public License
3301# along with this program; if not, write to the Free Software
3302# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3303#
3304# As a special exception to the GNU General Public License, if you
3305# distribute this file as part of a program that contains a
3306# configuration script generated by Autoconf, you may include it under
3307# the same distribution terms that you use for the rest of that program.
3308
3309# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3310# ----------------------------------
3311# PKG_PROG_PKG_CONFIG
3312
3313# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3314#
3315# Check to see whether a particular set of modules exists.  Similar
3316# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3317#
3318#
3319# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3320# this or PKG_CHECK_MODULES is called, or make sure to call
3321# PKG_CHECK_EXISTS manually
3322# --------------------------------------------------------------
3323
3324
3325
3326# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3327# ---------------------------------------------
3328# _PKG_CONFIG
3329
3330# _PKG_SHORT_ERRORS_SUPPORTED
3331# -----------------------------
3332# _PKG_SHORT_ERRORS_SUPPORTED
3333
3334
3335# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3336# [ACTION-IF-NOT-FOUND])
3337#
3338#
3339# Note that if there is a possibility the first call to
3340# PKG_CHECK_MODULES might not happen, you should be sure to include an
3341# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3342#
3343#
3344# --------------------------------------------------------------
3345# PKG_CHECK_MODULES
3346
3347
3348# Include these first...
3349#
3350# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3351# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3352#
3353# This code is free software; you can redistribute it and/or modify it
3354# under the terms of the GNU General Public License version 2 only, as
3355# published by the Free Software Foundation.  Oracle designates this
3356# particular file as subject to the "Classpath" exception as provided
3357# by Oracle in the LICENSE file that accompanied this code.
3358#
3359# This code is distributed in the hope that it will be useful, but WITHOUT
3360# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3361# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3362# version 2 for more details (a copy is included in the LICENSE file that
3363# accompanied this code).
3364#
3365# You should have received a copy of the GNU General Public License version
3366# 2 along with this work; if not, write to the Free Software Foundation,
3367# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3368#
3369# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3370# or visit www.oracle.com if you need additional information or have any
3371# questions.
3372#
3373
3374# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3375# If so, then append $1 to $2 \
3376# Also set JVM_ARG_OK to true/false depending on outcome.
3377
3378
3379# Appends a string to a path variable, only adding the : when needed.
3380
3381
3382# Prepends a string to a path variable, only adding the : when needed.
3383
3384
3385# This will make sure the given variable points to a full and proper
3386# path. This means:
3387# 1) There will be no spaces in the path. On unix platforms,
3388#    spaces in the path will result in an error. On Windows,
3389#    the path will be rewritten using short-style to be space-free.
3390# 2) The path will be absolute, and it will be in unix-style (on
3391#     cygwin).
3392# $1: The name of the variable to fix
3393
3394
3395# This will make sure the given variable points to a executable
3396# with a full and proper path. This means:
3397# 1) There will be no spaces in the path. On unix platforms,
3398#    spaces in the path will result in an error. On Windows,
3399#    the path will be rewritten using short-style to be space-free.
3400# 2) The path will be absolute, and it will be in unix-style (on
3401#     cygwin).
3402# Any arguments given to the executable is preserved.
3403# If the input variable does not have a directory specification, then
3404# it need to be in the PATH.
3405# $1: The name of the variable to fix
3406
3407
3408
3409
3410# Register a --with argument but mark it as deprecated
3411# $1: The name of the with argument to deprecate, not including --with-
3412
3413
3414# Register a --enable argument but mark it as deprecated
3415# $1: The name of the with argument to deprecate, not including --enable-
3416# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3417
3418
3419
3420
3421# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3422# $1: variable to check
3423
3424
3425# Check that there are no unprocessed overridden variables left.
3426# If so, they are an incorrect argument and we will exit with an error.
3427
3428
3429# Setup a tool for the given variable. If correctly specified by the user,
3430# use that value, otherwise search for the tool using the supplied code snippet.
3431# $1: variable to set
3432# $2: code snippet to call to look for the tool
3433
3434
3435# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3436# $1: variable to set
3437# $2: executable name (or list of names) to look for
3438
3439
3440# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3441# $1: variable to set
3442# $2: executable name (or list of names) to look for
3443
3444
3445# Like BASIC_PATH_PROGS but fails if no tool was found.
3446# $1: variable to set
3447# $2: executable name (or list of names) to look for
3448
3449
3450# Like BASIC_SETUP_TOOL but fails if no tool was found.
3451# $1: variable to set
3452# $2: autoconf macro to call to look for the special tool
3453
3454
3455# Setup the most fundamental tools that relies on not much else to set up,
3456# but is used by much of the early bootstrap code.
3457
3458
3459# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3460
3461
3462# Evaluates platform specific overrides for devkit variables.
3463# $1: Name of variable
3464
3465
3466
3467
3468
3469
3470#%%% Simple tools %%%
3471
3472# Check if we have found a usable version of make
3473# $1: the path to a potential make binary (or empty)
3474# $2: the description on how we found this
3475
3476
3477
3478
3479# Goes looking for a usable version of GNU make.
3480
3481
3482
3483
3484
3485
3486# Check if build directory is on local disk. If not possible to determine,
3487# we prefer to claim it's local.
3488# Argument 1: directory to test
3489# Argument 2: what to do if it is on local disk
3490# Argument 3: what to do otherwise (remote disk or failure)
3491
3492
3493# Check that source files have basic read permissions set. This might
3494# not be the case in cygwin in certain conditions.
3495
3496
3497
3498
3499# Check for support for specific options in bash
3500
3501
3502# Code to run after AC_OUTPUT
3503
3504
3505#
3506# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3508#
3509# This code is free software; you can redistribute it and/or modify it
3510# under the terms of the GNU General Public License version 2 only, as
3511# published by the Free Software Foundation.  Oracle designates this
3512# particular file as subject to the "Classpath" exception as provided
3513# by Oracle in the LICENSE file that accompanied this code.
3514#
3515# This code is distributed in the hope that it will be useful, but WITHOUT
3516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3518# version 2 for more details (a copy is included in the LICENSE file that
3519# accompanied this code).
3520#
3521# You should have received a copy of the GNU General Public License version
3522# 2 along with this work; if not, write to the Free Software Foundation,
3523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3524#
3525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3526# or visit www.oracle.com if you need additional information or have any
3527# questions.
3528#
3529
3530
3531
3532
3533
3534# Helper function which possibly converts a path using DOS-style short mode.
3535# If so, the updated path is stored in $new_path.
3536# $1: The path to check
3537
3538
3539# Helper function which possibly converts a path using DOS-style short mode.
3540# If so, the updated path is stored in $new_path.
3541# $1: The path to check
3542
3543
3544# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3545# and could probably be heavily simplified. However, all changes in this
3546# area tend to need lot of testing in different scenarios, and in lack of
3547# proper unit testing, cleaning this up has not been deemed worth the effort
3548# at the moment.
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3559
3560
3561
3562
3563# ... then the rest
3564#
3565# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3567#
3568# This code is free software; you can redistribute it and/or modify it
3569# under the terms of the GNU General Public License version 2 only, as
3570# published by the Free Software Foundation.  Oracle designates this
3571# particular file as subject to the "Classpath" exception as provided
3572# by Oracle in the LICENSE file that accompanied this code.
3573#
3574# This code is distributed in the hope that it will be useful, but WITHOUT
3575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3577# version 2 for more details (a copy is included in the LICENSE file that
3578# accompanied this code).
3579#
3580# You should have received a copy of the GNU General Public License version
3581# 2 along with this work; if not, write to the Free Software Foundation,
3582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3583#
3584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3585# or visit www.oracle.com if you need additional information or have any
3586# questions.
3587#
3588
3589########################################################################
3590# This file handles detection of the Boot JDK. The Boot JDK detection
3591# process has been developed as a response to solve a complex real-world
3592# problem. Initially, it was simple, but it has grown as platform after
3593# platform, idiosyncracy after idiosyncracy has been supported.
3594#
3595# The basic idea is this:
3596# 1) You need an acceptable *) JDK to use as a Boot JDK
3597# 2) There are several ways to locate a JDK, that are mostly platform
3598#    dependent **)
3599# 3) You can have multiple JDKs installed
3600# 4) If possible, configure should try to dig out an acceptable JDK
3601#    automatically, without having to resort to command-line options
3602#
3603# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3604#     javac) and not a JRE, etc.
3605#
3606# **) On Windows we typically use a well-known path.
3607#     On MacOSX we typically use the tool java_home.
3608#     On Linux we typically find javac in the $PATH, and then follow a
3609#     chain of symlinks that often ends up in a real JDK.
3610#
3611# This leads to the code where we check in different ways to locate a
3612# JDK, and if one is found, check if it is acceptable. If not, we print
3613# our reasons for rejecting it (useful when debugging non-working
3614# configure situations) and continue checking the next one.
3615########################################################################
3616
3617# Execute the check given as argument, and verify the result
3618# If the Boot JDK was previously found, do nothing
3619# $1 A command line (typically autoconf macro) to execute
3620
3621
3622# Test: Is bootjdk explicitely set by command line arguments?
3623
3624
3625# Test: Is $JAVA_HOME set?
3626
3627
3628# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3629
3630
3631# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3632# $1: Argument to the java_home binary (optional)
3633
3634
3635# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3636
3637
3638# Look for a jdk in the given path. If there are multiple, try to select the newest.
3639# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3640# $1 = Path to directory containing jdk installations.
3641# $2 = String to append to the found JDK directory to get the proper JDK home
3642
3643
3644# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3645# environmental variable as base for where to look.
3646# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3647
3648
3649# Test: Is there a JDK installed in default, well-known locations?
3650
3651
3652# Check that a command-line tool in the Boot JDK is correct
3653# $1 = name of variable to assign
3654# $2 = name of binary
3655
3656
3657###############################################################################
3658#
3659# We need a Boot JDK to bootstrap the build.
3660#
3661
3662
3663
3664
3665
3666#
3667# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3668# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3669#
3670# This code is free software; you can redistribute it and/or modify it
3671# under the terms of the GNU General Public License version 2 only, as
3672# published by the Free Software Foundation.  Oracle designates this
3673# particular file as subject to the "Classpath" exception as provided
3674# by Oracle in the LICENSE file that accompanied this code.
3675#
3676# This code is distributed in the hope that it will be useful, but WITHOUT
3677# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3678# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3679# version 2 for more details (a copy is included in the LICENSE file that
3680# accompanied this code).
3681#
3682# You should have received a copy of the GNU General Public License version
3683# 2 along with this work; if not, write to the Free Software Foundation,
3684# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3685#
3686# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3687# or visit www.oracle.com if you need additional information or have any
3688# questions.
3689#
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710#
3711# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3712# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3713#
3714# This code is free software; you can redistribute it and/or modify it
3715# under the terms of the GNU General Public License version 2 only, as
3716# published by the Free Software Foundation.  Oracle designates this
3717# particular file as subject to the "Classpath" exception as provided
3718# by Oracle in the LICENSE file that accompanied this code.
3719#
3720# This code is distributed in the hope that it will be useful, but WITHOUT
3721# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3722# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3723# version 2 for more details (a copy is included in the LICENSE file that
3724# accompanied this code).
3725#
3726# You should have received a copy of the GNU General Public License version
3727# 2 along with this work; if not, write to the Free Software Foundation,
3728# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3729#
3730# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3731# or visit www.oracle.com if you need additional information or have any
3732# questions.
3733#
3734
3735# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3736# corresponding configure arguments instead
3737
3738
3739# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3740# that configure can use them while detecting compilers.
3741# TOOLCHAIN_TYPE is available here.
3742
3743
3744
3745
3746
3747
3748# Documentation on common flags used for solstudio in HIGHEST.
3749#
3750# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3751#          done with care, there are some assumptions below that need to
3752#          be understood about the use of pointers, and IEEE behavior.
3753#
3754# -fns: Use non-standard floating point mode (not IEEE 754)
3755# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3756# -fsingle: Use single precision floating point with 'float'
3757# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3758#   (Source with excessing pointer casting and data access with mixed
3759#    pointer types are not recommended)
3760# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3761#   (If you expect perfect errno behavior, do not use this)
3762# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3763# -xrestrict: Pointer parameters to functions do not overlap
3764#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3765#    If you pass in multiple pointers to the same data, do not use this)
3766# -xlibmil: Inline some library routines
3767#   (If you expect perfect errno behavior, do not use this)
3768# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3769#   (If you expect perfect errno behavior, do not use this)
3770#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3771
3772    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3773    # Bug?
3774    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3775    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3776    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3777    #fi
3778
3779
3780
3781
3782
3783# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3784#                                   [RUN-IF-FALSE])
3785# ------------------------------------------------------------
3786# Check that the c and c++ compilers support an argument
3787
3788
3789# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3790#                                    [RUN-IF-FALSE])
3791# ------------------------------------------------------------
3792# Check that the linker support an argument
3793
3794
3795
3796
3797#
3798# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3799# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3800#
3801# This code is free software; you can redistribute it and/or modify it
3802# under the terms of the GNU General Public License version 2 only, as
3803# published by the Free Software Foundation.  Oracle designates this
3804# particular file as subject to the "Classpath" exception as provided
3805# by Oracle in the LICENSE file that accompanied this code.
3806#
3807# This code is distributed in the hope that it will be useful, but WITHOUT
3808# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3809# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3810# version 2 for more details (a copy is included in the LICENSE file that
3811# accompanied this code).
3812#
3813# You should have received a copy of the GNU General Public License version
3814# 2 along with this work; if not, write to the Free Software Foundation,
3815# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3816#
3817# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3818# or visit www.oracle.com if you need additional information or have any
3819# questions.
3820#
3821
3822
3823
3824
3825
3826cygwin_help() {
3827  case $1 in
3828    unzip)
3829      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3830      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3831      ;;
3832    zip)
3833      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3834      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3835      ;;
3836    make)
3837      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3838      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3839      ;;
3840    freetype)
3841      HELP_MSG="
3842The freetype library can now be build during the configure process.
3843Download the freetype sources and unpack them into an arbitrary directory:
3844
3845wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3846tar -xzf freetype-2.5.3.tar.gz
3847
3848Then run configure with '--with-freetype-src=<freetype_src>'. This will
3849automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3850builds or into '<freetype_src>/lib32' for 32-bit builds.
3851Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3852and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3853      ;;
3854  esac
3855}
3856
3857msys_help() {
3858  PKGHANDLER_COMMAND=""
3859}
3860
3861apt_help() {
3862  case $1 in
3863    reduced)
3864      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3865    devkit)
3866      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3867    openjdk)
3868      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3869    alsa)
3870      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3871    cups)
3872      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3873    freetype)
3874      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3875    ffi)
3876      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3877    x11)
3878      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3879    ccache)
3880      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3881  esac
3882}
3883
3884yum_help() {
3885  case $1 in
3886    devkit)
3887      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3888    openjdk)
3889      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3890    alsa)
3891      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3892    cups)
3893      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3894    freetype)
3895      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3896    x11)
3897      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3898    ccache)
3899      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3900  esac
3901}
3902
3903port_help() {
3904  PKGHANDLER_COMMAND=""
3905}
3906
3907pkgutil_help() {
3908  PKGHANDLER_COMMAND=""
3909}
3910
3911pkgadd_help() {
3912  PKGHANDLER_COMMAND=""
3913}
3914
3915# This function will check if we're called from the "configure" wrapper while
3916# printing --help. If so, we will print out additional information that can
3917# only be extracted within the autoconf script, and then exit. This must be
3918# called at the very beginning in configure.ac.
3919
3920
3921
3922
3923
3924
3925#
3926# Copyright (c) 2011, 2015, 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# Should we build only OpenJDK even if closed sources are present?
3962#
3963
3964
3965
3966
3967###############################################################################
3968#
3969# Setup version numbers
3970#
3971
3972
3973
3974
3975
3976
3977################################################################################
3978#
3979# Gcov coverage data for hotspot
3980#
3981
3982
3983################################################################################
3984#
3985# Static build support.  When enabled will generate static
3986# libraries instead of shared libraries for all JDK libs.
3987#
3988
3989
3990
3991
3992#
3993# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3994# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3995#
3996# This code is free software; you can redistribute it and/or modify it
3997# under the terms of the GNU General Public License version 2 only, as
3998# published by the Free Software Foundation.  Oracle designates this
3999# particular file as subject to the "Classpath" exception as provided
4000# by Oracle in the LICENSE file that accompanied this code.
4001#
4002# This code is distributed in the hope that it will be useful, but WITHOUT
4003# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4004# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4005# version 2 for more details (a copy is included in the LICENSE file that
4006# accompanied this code).
4007#
4008# You should have received a copy of the GNU General Public License version
4009# 2 along with this work; if not, write to the Free Software Foundation,
4010# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4011#
4012# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4013# or visit www.oracle.com if you need additional information or have any
4014# questions.
4015#
4016
4017# Major library component reside in separate files.
4018#
4019# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4020# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4021#
4022# This code is free software; you can redistribute it and/or modify it
4023# under the terms of the GNU General Public License version 2 only, as
4024# published by the Free Software Foundation.  Oracle designates this
4025# particular file as subject to the "Classpath" exception as provided
4026# by Oracle in the LICENSE file that accompanied this code.
4027#
4028# This code is distributed in the hope that it will be useful, but WITHOUT
4029# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4030# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4031# version 2 for more details (a copy is included in the LICENSE file that
4032# accompanied this code).
4033#
4034# You should have received a copy of the GNU General Public License version
4035# 2 along with this work; if not, write to the Free Software Foundation,
4036# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4037#
4038# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4039# or visit www.oracle.com if you need additional information or have any
4040# questions.
4041#
4042
4043################################################################################
4044# Setup alsa (Advanced Linux Sound Architecture)
4045################################################################################
4046
4047
4048#
4049# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4050# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4051#
4052# This code is free software; you can redistribute it and/or modify it
4053# under the terms of the GNU General Public License version 2 only, as
4054# published by the Free Software Foundation.  Oracle designates this
4055# particular file as subject to the "Classpath" exception as provided
4056# by Oracle in the LICENSE file that accompanied this code.
4057#
4058# This code is distributed in the hope that it will be useful, but WITHOUT
4059# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4060# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4061# version 2 for more details (a copy is included in the LICENSE file that
4062# accompanied this code).
4063#
4064# You should have received a copy of the GNU General Public License version
4065# 2 along with this work; if not, write to the Free Software Foundation,
4066# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4067#
4068# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4069# or visit www.oracle.com if you need additional information or have any
4070# questions.
4071#
4072
4073################################################################################
4074# Setup bundled libraries.
4075#
4076# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4077# OpenJDK repository. Default is to use these libraries as bundled, but they
4078# might be replaced by en external version by the user.
4079################################################################################
4080
4081
4082################################################################################
4083# Setup libjpeg
4084################################################################################
4085
4086
4087################################################################################
4088# Setup giflib
4089################################################################################
4090
4091
4092################################################################################
4093# Setup libpng
4094################################################################################
4095
4096
4097################################################################################
4098# Setup zlib
4099################################################################################
4100
4101
4102################################################################################
4103# Setup lcms (Little CMS)
4104################################################################################
4105
4106
4107#
4108# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4109# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4110#
4111# This code is free software; you can redistribute it and/or modify it
4112# under the terms of the GNU General Public License version 2 only, as
4113# published by the Free Software Foundation.  Oracle designates this
4114# particular file as subject to the "Classpath" exception as provided
4115# by Oracle in the LICENSE file that accompanied this code.
4116#
4117# This code is distributed in the hope that it will be useful, but WITHOUT
4118# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4119# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4120# version 2 for more details (a copy is included in the LICENSE file that
4121# accompanied this code).
4122#
4123# You should have received a copy of the GNU General Public License version
4124# 2 along with this work; if not, write to the Free Software Foundation,
4125# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4126#
4127# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4128# or visit www.oracle.com if you need additional information or have any
4129# questions.
4130#
4131
4132################################################################################
4133# Setup cups (Common Unix Printing System)
4134################################################################################
4135
4136
4137#
4138# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4139# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4140#
4141# This code is free software; you can redistribute it and/or modify it
4142# under the terms of the GNU General Public License version 2 only, as
4143# published by the Free Software Foundation.  Oracle designates this
4144# particular file as subject to the "Classpath" exception as provided
4145# by Oracle in the LICENSE file that accompanied this code.
4146#
4147# This code is distributed in the hope that it will be useful, but WITHOUT
4148# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4149# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4150# version 2 for more details (a copy is included in the LICENSE file that
4151# accompanied this code).
4152#
4153# You should have received a copy of the GNU General Public License version
4154# 2 along with this work; if not, write to the Free Software Foundation,
4155# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4156#
4157# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4158# or visit www.oracle.com if you need additional information or have any
4159# questions.
4160#
4161
4162################################################################################
4163# Setup libffi (Foreign Function Interface)
4164################################################################################
4165
4166
4167#
4168# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4169# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4170#
4171# This code is free software; you can redistribute it and/or modify it
4172# under the terms of the GNU General Public License version 2 only, as
4173# published by the Free Software Foundation.  Oracle designates this
4174# particular file as subject to the "Classpath" exception as provided
4175# by Oracle in the LICENSE file that accompanied this code.
4176#
4177# This code is distributed in the hope that it will be useful, but WITHOUT
4178# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4179# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4180# version 2 for more details (a copy is included in the LICENSE file that
4181# accompanied this code).
4182#
4183# You should have received a copy of the GNU General Public License version
4184# 2 along with this work; if not, write to the Free Software Foundation,
4185# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4186#
4187# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4188# or visit www.oracle.com if you need additional information or have any
4189# questions.
4190#
4191
4192################################################################################
4193# Build the freetype lib from source
4194################################################################################
4195
4196
4197################################################################################
4198# Check if a potential freeype library match is correct and usable
4199################################################################################
4200
4201
4202################################################################################
4203# Setup freetype (The FreeType2 font rendering library)
4204################################################################################
4205
4206
4207#
4208# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4209# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4210#
4211# This code is free software; you can redistribute it and/or modify it
4212# under the terms of the GNU General Public License version 2 only, as
4213# published by the Free Software Foundation.  Oracle designates this
4214# particular file as subject to the "Classpath" exception as provided
4215# by Oracle in the LICENSE file that accompanied this code.
4216#
4217# This code is distributed in the hope that it will be useful, but WITHOUT
4218# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4219# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4220# version 2 for more details (a copy is included in the LICENSE file that
4221# accompanied this code).
4222#
4223# You should have received a copy of the GNU General Public License version
4224# 2 along with this work; if not, write to the Free Software Foundation,
4225# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4226#
4227# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4228# or visit www.oracle.com if you need additional information or have any
4229# questions.
4230#
4231
4232################################################################################
4233# Setup the standard C/C++ runtime libraries.
4234#
4235# Most importantly, determine if stdc++ should be linked statically or
4236# dynamically.
4237################################################################################
4238
4239
4240#
4241# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4242# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4243#
4244# This code is free software; you can redistribute it and/or modify it
4245# under the terms of the GNU General Public License version 2 only, as
4246# published by the Free Software Foundation.  Oracle designates this
4247# particular file as subject to the "Classpath" exception as provided
4248# by Oracle in the LICENSE file that accompanied this code.
4249#
4250# This code is distributed in the hope that it will be useful, but WITHOUT
4251# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4252# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4253# version 2 for more details (a copy is included in the LICENSE file that
4254# accompanied this code).
4255#
4256# You should have received a copy of the GNU General Public License version
4257# 2 along with this work; if not, write to the Free Software Foundation,
4258# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4259#
4260# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4261# or visit www.oracle.com if you need additional information or have any
4262# questions.
4263#
4264
4265################################################################################
4266# Setup X11 Windows system
4267################################################################################
4268
4269
4270
4271################################################################################
4272# Determine which libraries are needed for this configuration
4273################################################################################
4274
4275
4276################################################################################
4277# Parse library options, and setup needed libraries
4278################################################################################
4279
4280
4281################################################################################
4282# Setup llvm (Low-Level VM)
4283################################################################################
4284
4285
4286################################################################################
4287# Setup various libraries, typically small system libraries
4288################################################################################
4289
4290
4291#
4292# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4294#
4295# This code is free software; you can redistribute it and/or modify it
4296# under the terms of the GNU General Public License version 2 only, as
4297# published by the Free Software Foundation.  Oracle designates this
4298# particular file as subject to the "Classpath" exception as provided
4299# by Oracle in the LICENSE file that accompanied this code.
4300#
4301# This code is distributed in the hope that it will be useful, but WITHOUT
4302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4304# version 2 for more details (a copy is included in the LICENSE file that
4305# accompanied this code).
4306#
4307# You should have received a copy of the GNU General Public License version
4308# 2 along with this work; if not, write to the Free Software Foundation,
4309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4310#
4311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4312# or visit www.oracle.com if you need additional information or have any
4313# questions.
4314#
4315
4316# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4317# Converts autoconf style CPU name to OpenJDK style, into
4318# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4319
4320
4321# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4322# Converts autoconf style OS name to OpenJDK style, into
4323# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4324
4325
4326# Expects $host_os $host_cpu $build_os and $build_cpu
4327# and $with_target_bits to have been setup!
4328#
4329# Translate the standard triplet(quadruplet) definition
4330# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4331# OPENJDK_BUILD_OS, etc.
4332
4333
4334# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4335# accordingly. Must be done after setting up build and target system, but before
4336# doing anything else with these values.
4337
4338
4339# Setup the legacy variables, for controlling the old makefiles.
4340#
4341
4342
4343
4344
4345#%%% Build and target systems %%%
4346
4347
4348
4349
4350# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4351# Add -mX to various FLAGS variables.
4352
4353
4354
4355
4356
4357
4358#
4359# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4360# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4361#
4362# This code is free software; you can redistribute it and/or modify it
4363# under the terms of the GNU General Public License version 2 only, as
4364# published by the Free Software Foundation.  Oracle designates this
4365# particular file as subject to the "Classpath" exception as provided
4366# by Oracle in the LICENSE file that accompanied this code.
4367#
4368# This code is distributed in the hope that it will be useful, but WITHOUT
4369# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4370# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4371# version 2 for more details (a copy is included in the LICENSE file that
4372# accompanied this code).
4373#
4374# You should have received a copy of the GNU General Public License version
4375# 2 along with this work; if not, write to the Free Software Foundation,
4376# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4377#
4378# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4379# or visit www.oracle.com if you need additional information or have any
4380# questions.
4381#
4382
4383
4384
4385
4386
4387
4388
4389
4390#
4391# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4392# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4393#
4394# This code is free software; you can redistribute it and/or modify it
4395# under the terms of the GNU General Public License version 2 only, as
4396# published by the Free Software Foundation.  Oracle designates this
4397# particular file as subject to the "Classpath" exception as provided
4398# by Oracle in the LICENSE file that accompanied this code.
4399#
4400# This code is distributed in the hope that it will be useful, but WITHOUT
4401# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4402# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4403# version 2 for more details (a copy is included in the LICENSE file that
4404# accompanied this code).
4405#
4406# You should have received a copy of the GNU General Public License version
4407# 2 along with this work; if not, write to the Free Software Foundation,
4408# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4409#
4410# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4411# or visit www.oracle.com if you need additional information or have any
4412# questions.
4413#
4414
4415########################################################################
4416# This file is responsible for detecting, verifying and setting up the
4417# toolchain, i.e. the compiler, linker and related utilities. It will setup
4418# proper paths to the binaries, but it will not setup any flags.
4419#
4420# The binaries used is determined by the toolchain type, which is the family of
4421# compilers and related tools that are used.
4422########################################################################
4423
4424
4425# All valid toolchains, regardless of platform (used by help.m4)
4426VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4427
4428# These toolchains are valid on different platforms
4429VALID_TOOLCHAINS_linux="gcc clang"
4430VALID_TOOLCHAINS_solaris="solstudio"
4431VALID_TOOLCHAINS_macosx="gcc clang"
4432VALID_TOOLCHAINS_aix="xlc"
4433VALID_TOOLCHAINS_windows="microsoft"
4434
4435# Toolchain descriptions
4436TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4437TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4438TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4439TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4440TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4441
4442# Setup a number of variables describing how native output files are
4443# named on this platform/toolchain.
4444
4445
4446# Determine which toolchain type to use, and make sure it is valid for this
4447# platform. Setup various information about the selected toolchain.
4448
4449
4450# Before we start detecting the toolchain executables, we might need some
4451# special setup, e.g. additional paths etc.
4452
4453
4454# Restore path, etc
4455
4456
4457# Check if a compiler is of the toolchain type we expect, and save the version
4458# information from it. If the compiler does not match the expected type,
4459# this function will abort using AC_MSG_ERROR. If it matches, the version will
4460# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4461# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4462#
4463# $1 = compiler to test (CC or CXX)
4464# $2 = human readable name of compiler (C or C++)
4465
4466
4467# Try to locate the given C or C++ compiler in the path, or otherwise.
4468#
4469# $1 = compiler to test (CC or CXX)
4470# $2 = human readable name of compiler (C or C++)
4471# $3 = list of compiler names to search for
4472
4473
4474# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4475# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4476# archiver (AR). Verify that the compilers are correct according to the
4477# toolchain type.
4478
4479
4480# Setup additional tools that is considered a part of the toolchain, but not the
4481# core part. Many of these are highly platform-specific and do not exist,
4482# and/or are not needed on all platforms.
4483
4484
4485# Setup the build tools (i.e, the compiler and linker used to build programs
4486# that should be run on the build platform, not the target platform, as a build
4487# helper). Since the non-cross-compile case uses the normal, target compilers
4488# for this, we can only do this after these have been setup.
4489
4490
4491# Setup legacy variables that are still needed as alternative ways to refer to
4492# parts of the toolchain.
4493
4494
4495# Do some additional checks on the detected tools.
4496
4497
4498# Setup the JTReg Regression Test Harness.
4499
4500
4501#
4502# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4503# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4504#
4505# This code is free software; you can redistribute it and/or modify it
4506# under the terms of the GNU General Public License version 2 only, as
4507# published by the Free Software Foundation.  Oracle designates this
4508# particular file as subject to the "Classpath" exception as provided
4509# by Oracle in the LICENSE file that accompanied this code.
4510#
4511# This code is distributed in the hope that it will be useful, but WITHOUT
4512# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4513# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4514# version 2 for more details (a copy is included in the LICENSE file that
4515# accompanied this code).
4516#
4517# You should have received a copy of the GNU General Public License version
4518# 2 along with this work; if not, write to the Free Software Foundation,
4519# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4520#
4521# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4522# or visit www.oracle.com if you need additional information or have any
4523# questions.
4524#
4525
4526################################################################################
4527# The order of these defines the priority by which we try to find them.
4528VALID_VS_VERSIONS="2013 2012 2010"
4529
4530VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4531VS_VERSION_INTERNAL_2010=100
4532VS_MSVCR_2010=msvcr100.dll
4533# We don't use msvcp on Visual Studio 2010
4534#VS_MSVCP_2010=msvcp100.dll
4535VS_ENVVAR_2010="VS100COMNTOOLS"
4536VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4537VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4538VS_VS_PLATFORM_NAME_2010="v100"
4539VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4540
4541VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4542VS_VERSION_INTERNAL_2012=110
4543VS_MSVCR_2012=msvcr110.dll
4544VS_MSVCP_2012=msvcp110.dll
4545VS_ENVVAR_2012="VS110COMNTOOLS"
4546VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4547VS_SDK_INSTALLDIR_2012=
4548VS_VS_PLATFORM_NAME_2012="v110"
4549VS_SDK_PLATFORM_NAME_2012=
4550
4551VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4552VS_VERSION_INTERNAL_2013=120
4553VS_MSVCR_2013=msvcr120.dll
4554VS_MSVCP_2013=msvcp120.dll
4555VS_ENVVAR_2013="VS120COMNTOOLS"
4556VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4557VS_SDK_INSTALLDIR_2013=
4558VS_VS_PLATFORM_NAME_2013="v120"
4559VS_SDK_PLATFORM_NAME_2013=
4560
4561################################################################################
4562
4563
4564
4565################################################################################
4566
4567
4568
4569################################################################################
4570# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4571# build environment and assigns it to VS_ENV_CMD
4572
4573
4574################################################################################
4575
4576
4577
4578################################################################################
4579# Check if the VS env variables were setup prior to running configure.
4580# If not, then find vcvarsall.bat and run it automatically, and integrate
4581# the set env variables into the spec file.
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596# This line needs to be here, verbatim, after all includes and the dummy hook
4597# definitions. It is replaced with custom functionality when building
4598# custom sources.
4599#CUSTOM_AUTOCONF_INCLUDE
4600
4601# Do not change or remove the following line, it is needed for consistency checks:
4602DATE_WHEN_GENERATED=1445274290
4603
4604###############################################################################
4605#
4606# Initialization / Boot-strapping
4607#
4608# The bootstrapping process needs to solve the "chicken or the egg" problem,
4609# thus it jumps back and forth, each time gaining something needed later on.
4610#
4611###############################################################################
4612
4613# If we are requested to print additional help, do that and then exit.
4614# This must be the very first call.
4615
4616  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4617    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4618    $PRINTF "Which are valid to use depends on the build platform.\n"
4619    for toolchain in $VALID_TOOLCHAINS_all; do
4620      # Use indirect variable referencing
4621      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4622      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4623      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4624    done
4625
4626    # And now exit directly
4627    exit 0
4628  fi
4629
4630
4631# Basic initialization that must happen first of all in the normal process.
4632
4633  # Save the original command line. This is passed to us by the wrapper configure script.
4634
4635  # Save the path variable before it gets changed
4636  ORIGINAL_PATH="$PATH"
4637
4638  DATE_WHEN_CONFIGURED=`LANG=C date`
4639
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4641$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4642  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4643$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4644
4645
4646  # Start with tools that do not need have cross compilation support
4647  # and can be expected to be found in the default PATH. These tools are
4648  # used by configure.
4649
4650  # First are all the simple required tools.
4651
4652
4653
4654  # Publish this variable in the help.
4655
4656
4657  if [ -z "${BASENAME+x}" ]; then
4658    # The variable is not set by user, try to locate tool using the code snippet
4659    for ac_prog in basename
4660do
4661  # Extract the first word of "$ac_prog", so it can be a program name with args.
4662set dummy $ac_prog; ac_word=$2
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4664$as_echo_n "checking for $ac_word... " >&6; }
4665if ${ac_cv_path_BASENAME+:} false; then :
4666  $as_echo_n "(cached) " >&6
4667else
4668  case $BASENAME in
4669  [\\/]* | ?:[\\/]*)
4670  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4671  ;;
4672  *)
4673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in $PATH
4675do
4676  IFS=$as_save_IFS
4677  test -z "$as_dir" && as_dir=.
4678    for ac_exec_ext in '' $ac_executable_extensions; do
4679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4680    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682    break 2
4683  fi
4684done
4685  done
4686IFS=$as_save_IFS
4687
4688  ;;
4689esac
4690fi
4691BASENAME=$ac_cv_path_BASENAME
4692if test -n "$BASENAME"; then
4693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4694$as_echo "$BASENAME" >&6; }
4695else
4696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697$as_echo "no" >&6; }
4698fi
4699
4700
4701  test -n "$BASENAME" && break
4702done
4703
4704  else
4705    # The variable is set, but is it from the command line or the environment?
4706
4707    # Try to remove the string !BASENAME! from our list.
4708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4710      # If it failed, the variable was not from the command line. Ignore it,
4711      # but warn the user (except for BASH, which is always set by the calling BASH).
4712      if test "xBASENAME" != xBASH; then
4713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4714$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4715      fi
4716      # Try to locate tool using the code snippet
4717      for ac_prog in basename
4718do
4719  # Extract the first word of "$ac_prog", so it can be a program name with args.
4720set dummy $ac_prog; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
4723if ${ac_cv_path_BASENAME+:} false; then :
4724  $as_echo_n "(cached) " >&6
4725else
4726  case $BASENAME in
4727  [\\/]* | ?:[\\/]*)
4728  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4729  ;;
4730  *)
4731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in $PATH
4733do
4734  IFS=$as_save_IFS
4735  test -z "$as_dir" && as_dir=.
4736    for ac_exec_ext in '' $ac_executable_extensions; do
4737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4738    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740    break 2
4741  fi
4742done
4743  done
4744IFS=$as_save_IFS
4745
4746  ;;
4747esac
4748fi
4749BASENAME=$ac_cv_path_BASENAME
4750if test -n "$BASENAME"; then
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4752$as_echo "$BASENAME" >&6; }
4753else
4754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
4756fi
4757
4758
4759  test -n "$BASENAME" && break
4760done
4761
4762    else
4763      # If it succeeded, then it was overridden by the user. We will use it
4764      # for the tool.
4765
4766      # First remove it from the list of overridden variables, so we can test
4767      # for unknown variables in the end.
4768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4769
4770      # Check if we try to supply an empty value
4771      if test "x$BASENAME" = x; then
4772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4773$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4775$as_echo_n "checking for BASENAME... " >&6; }
4776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4777$as_echo "disabled" >&6; }
4778      else
4779        # Check if the provided tool contains a complete path.
4780        tool_specified="$BASENAME"
4781        tool_basename="${tool_specified##*/}"
4782        if test "x$tool_basename" = "x$tool_specified"; then
4783          # A command without a complete path is provided, search $PATH.
4784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4785$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4786          # Extract the first word of "$tool_basename", so it can be a program name with args.
4787set dummy $tool_basename; ac_word=$2
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
4790if ${ac_cv_path_BASENAME+:} false; then :
4791  $as_echo_n "(cached) " >&6
4792else
4793  case $BASENAME in
4794  [\\/]* | ?:[\\/]*)
4795  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4796  ;;
4797  *)
4798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in $PATH
4800do
4801  IFS=$as_save_IFS
4802  test -z "$as_dir" && as_dir=.
4803    for ac_exec_ext in '' $ac_executable_extensions; do
4804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4805    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4807    break 2
4808  fi
4809done
4810  done
4811IFS=$as_save_IFS
4812
4813  ;;
4814esac
4815fi
4816BASENAME=$ac_cv_path_BASENAME
4817if test -n "$BASENAME"; then
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4819$as_echo "$BASENAME" >&6; }
4820else
4821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
4823fi
4824
4825
4826          if test "x$BASENAME" = x; then
4827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4828          fi
4829        else
4830          # Otherwise we believe it is a complete path. Use it as it is.
4831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4832$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4834$as_echo_n "checking for BASENAME... " >&6; }
4835          if test ! -x "$tool_specified"; then
4836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4837$as_echo "not found" >&6; }
4838            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4839          fi
4840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4841$as_echo "$tool_specified" >&6; }
4842        fi
4843      fi
4844    fi
4845  fi
4846
4847
4848
4849  if test "x$BASENAME" = x; then
4850    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4851  fi
4852
4853
4854
4855
4856
4857  # Publish this variable in the help.
4858
4859
4860  if [ -z "${BASH+x}" ]; then
4861    # The variable is not set by user, try to locate tool using the code snippet
4862    for ac_prog in bash
4863do
4864  # Extract the first word of "$ac_prog", so it can be a program name with args.
4865set dummy $ac_prog; ac_word=$2
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4867$as_echo_n "checking for $ac_word... " >&6; }
4868if ${ac_cv_path_BASH+:} false; then :
4869  $as_echo_n "(cached) " >&6
4870else
4871  case $BASH in
4872  [\\/]* | ?:[\\/]*)
4873  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4874  ;;
4875  *)
4876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in $PATH
4878do
4879  IFS=$as_save_IFS
4880  test -z "$as_dir" && as_dir=.
4881    for ac_exec_ext in '' $ac_executable_extensions; do
4882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4883    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885    break 2
4886  fi
4887done
4888  done
4889IFS=$as_save_IFS
4890
4891  ;;
4892esac
4893fi
4894BASH=$ac_cv_path_BASH
4895if test -n "$BASH"; then
4896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4897$as_echo "$BASH" >&6; }
4898else
4899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
4903
4904  test -n "$BASH" && break
4905done
4906
4907  else
4908    # The variable is set, but is it from the command line or the environment?
4909
4910    # Try to remove the string !BASH! from our list.
4911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4913      # If it failed, the variable was not from the command line. Ignore it,
4914      # but warn the user (except for BASH, which is always set by the calling BASH).
4915      if test "xBASH" != xBASH; then
4916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4917$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4918      fi
4919      # Try to locate tool using the code snippet
4920      for ac_prog in bash
4921do
4922  # Extract the first word of "$ac_prog", so it can be a program name with args.
4923set dummy $ac_prog; ac_word=$2
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4925$as_echo_n "checking for $ac_word... " >&6; }
4926if ${ac_cv_path_BASH+:} false; then :
4927  $as_echo_n "(cached) " >&6
4928else
4929  case $BASH in
4930  [\\/]* | ?:[\\/]*)
4931  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4932  ;;
4933  *)
4934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935for as_dir in $PATH
4936do
4937  IFS=$as_save_IFS
4938  test -z "$as_dir" && as_dir=.
4939    for ac_exec_ext in '' $ac_executable_extensions; do
4940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4941    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4943    break 2
4944  fi
4945done
4946  done
4947IFS=$as_save_IFS
4948
4949  ;;
4950esac
4951fi
4952BASH=$ac_cv_path_BASH
4953if test -n "$BASH"; then
4954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4955$as_echo "$BASH" >&6; }
4956else
4957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958$as_echo "no" >&6; }
4959fi
4960
4961
4962  test -n "$BASH" && break
4963done
4964
4965    else
4966      # If it succeeded, then it was overridden by the user. We will use it
4967      # for the tool.
4968
4969      # First remove it from the list of overridden variables, so we can test
4970      # for unknown variables in the end.
4971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4972
4973      # Check if we try to supply an empty value
4974      if test "x$BASH" = x; then
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4976$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4978$as_echo_n "checking for BASH... " >&6; }
4979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4980$as_echo "disabled" >&6; }
4981      else
4982        # Check if the provided tool contains a complete path.
4983        tool_specified="$BASH"
4984        tool_basename="${tool_specified##*/}"
4985        if test "x$tool_basename" = "x$tool_specified"; then
4986          # A command without a complete path is provided, search $PATH.
4987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4988$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4989          # Extract the first word of "$tool_basename", so it can be a program name with args.
4990set dummy $tool_basename; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_BASH+:} false; then :
4994  $as_echo_n "(cached) " >&6
4995else
4996  case $BASH in
4997  [\\/]* | ?:[\\/]*)
4998  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4999  ;;
5000  *)
5001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in $PATH
5003do
5004  IFS=$as_save_IFS
5005  test -z "$as_dir" && as_dir=.
5006    for ac_exec_ext in '' $ac_executable_extensions; do
5007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010    break 2
5011  fi
5012done
5013  done
5014IFS=$as_save_IFS
5015
5016  ;;
5017esac
5018fi
5019BASH=$ac_cv_path_BASH
5020if test -n "$BASH"; then
5021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5022$as_echo "$BASH" >&6; }
5023else
5024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029          if test "x$BASH" = x; then
5030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5031          fi
5032        else
5033          # Otherwise we believe it is a complete path. Use it as it is.
5034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5035$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5037$as_echo_n "checking for BASH... " >&6; }
5038          if test ! -x "$tool_specified"; then
5039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5040$as_echo "not found" >&6; }
5041            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5042          fi
5043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5044$as_echo "$tool_specified" >&6; }
5045        fi
5046      fi
5047    fi
5048  fi
5049
5050
5051
5052  if test "x$BASH" = x; then
5053    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5054  fi
5055
5056
5057
5058
5059
5060  # Publish this variable in the help.
5061
5062
5063  if [ -z "${CAT+x}" ]; then
5064    # The variable is not set by user, try to locate tool using the code snippet
5065    for ac_prog in cat
5066do
5067  # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_CAT+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $CAT in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097CAT=$ac_cv_path_CAT
5098if test -n "$CAT"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5100$as_echo "$CAT" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107  test -n "$CAT" && break
5108done
5109
5110  else
5111    # The variable is set, but is it from the command line or the environment?
5112
5113    # Try to remove the string !CAT! from our list.
5114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5116      # If it failed, the variable was not from the command line. Ignore it,
5117      # but warn the user (except for BASH, which is always set by the calling BASH).
5118      if test "xCAT" != xBASH; then
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5120$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5121      fi
5122      # Try to locate tool using the code snippet
5123      for ac_prog in cat
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_path_CAT+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $CAT in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5144    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155CAT=$ac_cv_path_CAT
5156if test -n "$CAT"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5158$as_echo "$CAT" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$CAT" && break
5166done
5167
5168    else
5169      # If it succeeded, then it was overridden by the user. We will use it
5170      # for the tool.
5171
5172      # First remove it from the list of overridden variables, so we can test
5173      # for unknown variables in the end.
5174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5175
5176      # Check if we try to supply an empty value
5177      if test "x$CAT" = x; then
5178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5179$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5181$as_echo_n "checking for CAT... " >&6; }
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5183$as_echo "disabled" >&6; }
5184      else
5185        # Check if the provided tool contains a complete path.
5186        tool_specified="$CAT"
5187        tool_basename="${tool_specified##*/}"
5188        if test "x$tool_basename" = "x$tool_specified"; then
5189          # A command without a complete path is provided, search $PATH.
5190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5191$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5192          # Extract the first word of "$tool_basename", so it can be a program name with args.
5193set dummy $tool_basename; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_path_CAT+:} false; then :
5197  $as_echo_n "(cached) " >&6
5198else
5199  case $CAT in
5200  [\\/]* | ?:[\\/]*)
5201  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5202  ;;
5203  *)
5204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207  IFS=$as_save_IFS
5208  test -z "$as_dir" && as_dir=.
5209    for ac_exec_ext in '' $ac_executable_extensions; do
5210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213    break 2
5214  fi
5215done
5216  done
5217IFS=$as_save_IFS
5218
5219  ;;
5220esac
5221fi
5222CAT=$ac_cv_path_CAT
5223if test -n "$CAT"; then
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5225$as_echo "$CAT" >&6; }
5226else
5227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232          if test "x$CAT" = x; then
5233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234          fi
5235        else
5236          # Otherwise we believe it is a complete path. Use it as it is.
5237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5238$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5240$as_echo_n "checking for CAT... " >&6; }
5241          if test ! -x "$tool_specified"; then
5242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243$as_echo "not found" >&6; }
5244            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5245          fi
5246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247$as_echo "$tool_specified" >&6; }
5248        fi
5249      fi
5250    fi
5251  fi
5252
5253
5254
5255  if test "x$CAT" = x; then
5256    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5257  fi
5258
5259
5260
5261
5262
5263  # Publish this variable in the help.
5264
5265
5266  if [ -z "${CHMOD+x}" ]; then
5267    # The variable is not set by user, try to locate tool using the code snippet
5268    for ac_prog in chmod
5269do
5270  # Extract the first word of "$ac_prog", so it can be a program name with args.
5271set dummy $ac_prog; ac_word=$2
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5273$as_echo_n "checking for $ac_word... " >&6; }
5274if ${ac_cv_path_CHMOD+:} false; then :
5275  $as_echo_n "(cached) " >&6
5276else
5277  case $CHMOD in
5278  [\\/]* | ?:[\\/]*)
5279  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5280  ;;
5281  *)
5282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5283for as_dir in $PATH
5284do
5285  IFS=$as_save_IFS
5286  test -z "$as_dir" && as_dir=.
5287    for ac_exec_ext in '' $ac_executable_extensions; do
5288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5289    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5291    break 2
5292  fi
5293done
5294  done
5295IFS=$as_save_IFS
5296
5297  ;;
5298esac
5299fi
5300CHMOD=$ac_cv_path_CHMOD
5301if test -n "$CHMOD"; then
5302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5303$as_echo "$CHMOD" >&6; }
5304else
5305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5306$as_echo "no" >&6; }
5307fi
5308
5309
5310  test -n "$CHMOD" && break
5311done
5312
5313  else
5314    # The variable is set, but is it from the command line or the environment?
5315
5316    # Try to remove the string !CHMOD! from our list.
5317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5319      # If it failed, the variable was not from the command line. Ignore it,
5320      # but warn the user (except for BASH, which is always set by the calling BASH).
5321      if test "xCHMOD" != xBASH; then
5322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5323$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5324      fi
5325      # Try to locate tool using the code snippet
5326      for ac_prog in chmod
5327do
5328  # Extract the first word of "$ac_prog", so it can be a program name with args.
5329set dummy $ac_prog; ac_word=$2
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5331$as_echo_n "checking for $ac_word... " >&6; }
5332if ${ac_cv_path_CHMOD+:} false; then :
5333  $as_echo_n "(cached) " >&6
5334else
5335  case $CHMOD in
5336  [\\/]* | ?:[\\/]*)
5337  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5338  ;;
5339  *)
5340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5341for as_dir in $PATH
5342do
5343  IFS=$as_save_IFS
5344  test -z "$as_dir" && as_dir=.
5345    for ac_exec_ext in '' $ac_executable_extensions; do
5346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5347    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5349    break 2
5350  fi
5351done
5352  done
5353IFS=$as_save_IFS
5354
5355  ;;
5356esac
5357fi
5358CHMOD=$ac_cv_path_CHMOD
5359if test -n "$CHMOD"; then
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5361$as_echo "$CHMOD" >&6; }
5362else
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5364$as_echo "no" >&6; }
5365fi
5366
5367
5368  test -n "$CHMOD" && break
5369done
5370
5371    else
5372      # If it succeeded, then it was overridden by the user. We will use it
5373      # for the tool.
5374
5375      # First remove it from the list of overridden variables, so we can test
5376      # for unknown variables in the end.
5377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5378
5379      # Check if we try to supply an empty value
5380      if test "x$CHMOD" = x; then
5381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5382$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5384$as_echo_n "checking for CHMOD... " >&6; }
5385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5386$as_echo "disabled" >&6; }
5387      else
5388        # Check if the provided tool contains a complete path.
5389        tool_specified="$CHMOD"
5390        tool_basename="${tool_specified##*/}"
5391        if test "x$tool_basename" = "x$tool_specified"; then
5392          # A command without a complete path is provided, search $PATH.
5393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5394$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5395          # Extract the first word of "$tool_basename", so it can be a program name with args.
5396set dummy $tool_basename; ac_word=$2
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5398$as_echo_n "checking for $ac_word... " >&6; }
5399if ${ac_cv_path_CHMOD+:} false; then :
5400  $as_echo_n "(cached) " >&6
5401else
5402  case $CHMOD in
5403  [\\/]* | ?:[\\/]*)
5404  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5405  ;;
5406  *)
5407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in $PATH
5409do
5410  IFS=$as_save_IFS
5411  test -z "$as_dir" && as_dir=.
5412    for ac_exec_ext in '' $ac_executable_extensions; do
5413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5414    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5416    break 2
5417  fi
5418done
5419  done
5420IFS=$as_save_IFS
5421
5422  ;;
5423esac
5424fi
5425CHMOD=$ac_cv_path_CHMOD
5426if test -n "$CHMOD"; then
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5428$as_echo "$CHMOD" >&6; }
5429else
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5431$as_echo "no" >&6; }
5432fi
5433
5434
5435          if test "x$CHMOD" = x; then
5436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5437          fi
5438        else
5439          # Otherwise we believe it is a complete path. Use it as it is.
5440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5441$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5443$as_echo_n "checking for CHMOD... " >&6; }
5444          if test ! -x "$tool_specified"; then
5445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5446$as_echo "not found" >&6; }
5447            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5448          fi
5449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5450$as_echo "$tool_specified" >&6; }
5451        fi
5452      fi
5453    fi
5454  fi
5455
5456
5457
5458  if test "x$CHMOD" = x; then
5459    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5460  fi
5461
5462
5463
5464
5465
5466  # Publish this variable in the help.
5467
5468
5469  if [ -z "${CMP+x}" ]; then
5470    # The variable is not set by user, try to locate tool using the code snippet
5471    for ac_prog in cmp
5472do
5473  # Extract the first word of "$ac_prog", so it can be a program name with args.
5474set dummy $ac_prog; ac_word=$2
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476$as_echo_n "checking for $ac_word... " >&6; }
5477if ${ac_cv_path_CMP+:} false; then :
5478  $as_echo_n "(cached) " >&6
5479else
5480  case $CMP in
5481  [\\/]* | ?:[\\/]*)
5482  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5483  ;;
5484  *)
5485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5486for as_dir in $PATH
5487do
5488  IFS=$as_save_IFS
5489  test -z "$as_dir" && as_dir=.
5490    for ac_exec_ext in '' $ac_executable_extensions; do
5491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5492    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5494    break 2
5495  fi
5496done
5497  done
5498IFS=$as_save_IFS
5499
5500  ;;
5501esac
5502fi
5503CMP=$ac_cv_path_CMP
5504if test -n "$CMP"; then
5505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5506$as_echo "$CMP" >&6; }
5507else
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5509$as_echo "no" >&6; }
5510fi
5511
5512
5513  test -n "$CMP" && break
5514done
5515
5516  else
5517    # The variable is set, but is it from the command line or the environment?
5518
5519    # Try to remove the string !CMP! from our list.
5520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5522      # If it failed, the variable was not from the command line. Ignore it,
5523      # but warn the user (except for BASH, which is always set by the calling BASH).
5524      if test "xCMP" != xBASH; then
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5526$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5527      fi
5528      # Try to locate tool using the code snippet
5529      for ac_prog in cmp
5530do
5531  # Extract the first word of "$ac_prog", so it can be a program name with args.
5532set dummy $ac_prog; ac_word=$2
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
5535if ${ac_cv_path_CMP+:} false; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  case $CMP in
5539  [\\/]* | ?:[\\/]*)
5540  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5541  ;;
5542  *)
5543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546  IFS=$as_save_IFS
5547  test -z "$as_dir" && as_dir=.
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5550    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552    break 2
5553  fi
5554done
5555  done
5556IFS=$as_save_IFS
5557
5558  ;;
5559esac
5560fi
5561CMP=$ac_cv_path_CMP
5562if test -n "$CMP"; then
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5564$as_echo "$CMP" >&6; }
5565else
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568fi
5569
5570
5571  test -n "$CMP" && break
5572done
5573
5574    else
5575      # If it succeeded, then it was overridden by the user. We will use it
5576      # for the tool.
5577
5578      # First remove it from the list of overridden variables, so we can test
5579      # for unknown variables in the end.
5580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5581
5582      # Check if we try to supply an empty value
5583      if test "x$CMP" = x; then
5584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5585$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5587$as_echo_n "checking for CMP... " >&6; }
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5589$as_echo "disabled" >&6; }
5590      else
5591        # Check if the provided tool contains a complete path.
5592        tool_specified="$CMP"
5593        tool_basename="${tool_specified##*/}"
5594        if test "x$tool_basename" = "x$tool_specified"; then
5595          # A command without a complete path is provided, search $PATH.
5596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5597$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5598          # Extract the first word of "$tool_basename", so it can be a program name with args.
5599set dummy $tool_basename; ac_word=$2
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5601$as_echo_n "checking for $ac_word... " >&6; }
5602if ${ac_cv_path_CMP+:} false; then :
5603  $as_echo_n "(cached) " >&6
5604else
5605  case $CMP in
5606  [\\/]* | ?:[\\/]*)
5607  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5608  ;;
5609  *)
5610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5611for as_dir in $PATH
5612do
5613  IFS=$as_save_IFS
5614  test -z "$as_dir" && as_dir=.
5615    for ac_exec_ext in '' $ac_executable_extensions; do
5616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5617    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5619    break 2
5620  fi
5621done
5622  done
5623IFS=$as_save_IFS
5624
5625  ;;
5626esac
5627fi
5628CMP=$ac_cv_path_CMP
5629if test -n "$CMP"; then
5630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5631$as_echo "$CMP" >&6; }
5632else
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5634$as_echo "no" >&6; }
5635fi
5636
5637
5638          if test "x$CMP" = x; then
5639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5640          fi
5641        else
5642          # Otherwise we believe it is a complete path. Use it as it is.
5643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5644$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5646$as_echo_n "checking for CMP... " >&6; }
5647          if test ! -x "$tool_specified"; then
5648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5649$as_echo "not found" >&6; }
5650            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5651          fi
5652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5653$as_echo "$tool_specified" >&6; }
5654        fi
5655      fi
5656    fi
5657  fi
5658
5659
5660
5661  if test "x$CMP" = x; then
5662    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5663  fi
5664
5665
5666
5667
5668
5669  # Publish this variable in the help.
5670
5671
5672  if [ -z "${COMM+x}" ]; then
5673    # The variable is not set by user, try to locate tool using the code snippet
5674    for ac_prog in comm
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_COMM+:} false; then :
5681  $as_echo_n "(cached) " >&6
5682else
5683  case $COMM in
5684  [\\/]* | ?:[\\/]*)
5685  ac_cv_path_COMM="$COMM" # 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_COMM="$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
5706COMM=$ac_cv_path_COMM
5707if test -n "$COMM"; then
5708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5709$as_echo "$COMM" >&6; }
5710else
5711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712$as_echo "no" >&6; }
5713fi
5714
5715
5716  test -n "$COMM" && break
5717done
5718
5719  else
5720    # The variable is set, but is it from the command line or the environment?
5721
5722    # Try to remove the string !COMM! from our list.
5723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5725      # If it failed, the variable was not from the command line. Ignore it,
5726      # but warn the user (except for BASH, which is always set by the calling BASH).
5727      if test "xCOMM" != xBASH; then
5728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5729$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5730      fi
5731      # Try to locate tool using the code snippet
5732      for ac_prog in comm
5733do
5734  # Extract the first word of "$ac_prog", so it can be a program name with args.
5735set dummy $ac_prog; ac_word=$2
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737$as_echo_n "checking for $ac_word... " >&6; }
5738if ${ac_cv_path_COMM+:} false; then :
5739  $as_echo_n "(cached) " >&6
5740else
5741  case $COMM in
5742  [\\/]* | ?:[\\/]*)
5743  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5744  ;;
5745  *)
5746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749  IFS=$as_save_IFS
5750  test -z "$as_dir" && as_dir=.
5751    for ac_exec_ext in '' $ac_executable_extensions; do
5752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5753    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5755    break 2
5756  fi
5757done
5758  done
5759IFS=$as_save_IFS
5760
5761  ;;
5762esac
5763fi
5764COMM=$ac_cv_path_COMM
5765if test -n "$COMM"; then
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5767$as_echo "$COMM" >&6; }
5768else
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5770$as_echo "no" >&6; }
5771fi
5772
5773
5774  test -n "$COMM" && break
5775done
5776
5777    else
5778      # If it succeeded, then it was overridden by the user. We will use it
5779      # for the tool.
5780
5781      # First remove it from the list of overridden variables, so we can test
5782      # for unknown variables in the end.
5783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5784
5785      # Check if we try to supply an empty value
5786      if test "x$COMM" = x; then
5787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5788$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5790$as_echo_n "checking for COMM... " >&6; }
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5792$as_echo "disabled" >&6; }
5793      else
5794        # Check if the provided tool contains a complete path.
5795        tool_specified="$COMM"
5796        tool_basename="${tool_specified##*/}"
5797        if test "x$tool_basename" = "x$tool_specified"; then
5798          # A command without a complete path is provided, search $PATH.
5799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5800$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5801          # Extract the first word of "$tool_basename", so it can be a program name with args.
5802set dummy $tool_basename; ac_word=$2
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5804$as_echo_n "checking for $ac_word... " >&6; }
5805if ${ac_cv_path_COMM+:} false; then :
5806  $as_echo_n "(cached) " >&6
5807else
5808  case $COMM in
5809  [\\/]* | ?:[\\/]*)
5810  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5811  ;;
5812  *)
5813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816  IFS=$as_save_IFS
5817  test -z "$as_dir" && as_dir=.
5818    for ac_exec_ext in '' $ac_executable_extensions; do
5819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5820    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5822    break 2
5823  fi
5824done
5825  done
5826IFS=$as_save_IFS
5827
5828  ;;
5829esac
5830fi
5831COMM=$ac_cv_path_COMM
5832if test -n "$COMM"; then
5833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5834$as_echo "$COMM" >&6; }
5835else
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837$as_echo "no" >&6; }
5838fi
5839
5840
5841          if test "x$COMM" = x; then
5842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5843          fi
5844        else
5845          # Otherwise we believe it is a complete path. Use it as it is.
5846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5847$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5849$as_echo_n "checking for COMM... " >&6; }
5850          if test ! -x "$tool_specified"; then
5851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5852$as_echo "not found" >&6; }
5853            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5854          fi
5855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5856$as_echo "$tool_specified" >&6; }
5857        fi
5858      fi
5859    fi
5860  fi
5861
5862
5863
5864  if test "x$COMM" = x; then
5865    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5866  fi
5867
5868
5869
5870
5871
5872  # Publish this variable in the help.
5873
5874
5875  if [ -z "${CP+x}" ]; then
5876    # The variable is not set by user, try to locate tool using the code snippet
5877    for ac_prog in cp
5878do
5879  # Extract the first word of "$ac_prog", so it can be a program name with args.
5880set dummy $ac_prog; ac_word=$2
5881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5882$as_echo_n "checking for $ac_word... " >&6; }
5883if ${ac_cv_path_CP+:} false; then :
5884  $as_echo_n "(cached) " >&6
5885else
5886  case $CP in
5887  [\\/]* | ?:[\\/]*)
5888  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5889  ;;
5890  *)
5891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5892for as_dir in $PATH
5893do
5894  IFS=$as_save_IFS
5895  test -z "$as_dir" && as_dir=.
5896    for ac_exec_ext in '' $ac_executable_extensions; do
5897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5898    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5900    break 2
5901  fi
5902done
5903  done
5904IFS=$as_save_IFS
5905
5906  ;;
5907esac
5908fi
5909CP=$ac_cv_path_CP
5910if test -n "$CP"; then
5911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5912$as_echo "$CP" >&6; }
5913else
5914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5915$as_echo "no" >&6; }
5916fi
5917
5918
5919  test -n "$CP" && break
5920done
5921
5922  else
5923    # The variable is set, but is it from the command line or the environment?
5924
5925    # Try to remove the string !CP! from our list.
5926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5928      # If it failed, the variable was not from the command line. Ignore it,
5929      # but warn the user (except for BASH, which is always set by the calling BASH).
5930      if test "xCP" != xBASH; then
5931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5932$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5933      fi
5934      # Try to locate tool using the code snippet
5935      for ac_prog in cp
5936do
5937  # Extract the first word of "$ac_prog", so it can be a program name with args.
5938set dummy $ac_prog; ac_word=$2
5939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5940$as_echo_n "checking for $ac_word... " >&6; }
5941if ${ac_cv_path_CP+:} false; then :
5942  $as_echo_n "(cached) " >&6
5943else
5944  case $CP in
5945  [\\/]* | ?:[\\/]*)
5946  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5947  ;;
5948  *)
5949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952  IFS=$as_save_IFS
5953  test -z "$as_dir" && as_dir=.
5954    for ac_exec_ext in '' $ac_executable_extensions; do
5955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5956    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5958    break 2
5959  fi
5960done
5961  done
5962IFS=$as_save_IFS
5963
5964  ;;
5965esac
5966fi
5967CP=$ac_cv_path_CP
5968if test -n "$CP"; then
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5970$as_echo "$CP" >&6; }
5971else
5972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5973$as_echo "no" >&6; }
5974fi
5975
5976
5977  test -n "$CP" && break
5978done
5979
5980    else
5981      # If it succeeded, then it was overridden by the user. We will use it
5982      # for the tool.
5983
5984      # First remove it from the list of overridden variables, so we can test
5985      # for unknown variables in the end.
5986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5987
5988      # Check if we try to supply an empty value
5989      if test "x$CP" = x; then
5990        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
5991$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
5992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5993$as_echo_n "checking for CP... " >&6; }
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5995$as_echo "disabled" >&6; }
5996      else
5997        # Check if the provided tool contains a complete path.
5998        tool_specified="$CP"
5999        tool_basename="${tool_specified##*/}"
6000        if test "x$tool_basename" = "x$tool_specified"; then
6001          # A command without a complete path is provided, search $PATH.
6002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6003$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6004          # Extract the first word of "$tool_basename", so it can be a program name with args.
6005set dummy $tool_basename; ac_word=$2
6006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
6008if ${ac_cv_path_CP+:} false; then :
6009  $as_echo_n "(cached) " >&6
6010else
6011  case $CP in
6012  [\\/]* | ?:[\\/]*)
6013  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6014  ;;
6015  *)
6016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017for as_dir in $PATH
6018do
6019  IFS=$as_save_IFS
6020  test -z "$as_dir" && as_dir=.
6021    for ac_exec_ext in '' $ac_executable_extensions; do
6022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6023    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6025    break 2
6026  fi
6027done
6028  done
6029IFS=$as_save_IFS
6030
6031  ;;
6032esac
6033fi
6034CP=$ac_cv_path_CP
6035if test -n "$CP"; then
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6037$as_echo "$CP" >&6; }
6038else
6039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041fi
6042
6043
6044          if test "x$CP" = x; then
6045            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6046          fi
6047        else
6048          # Otherwise we believe it is a complete path. Use it as it is.
6049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6050$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6051          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6052$as_echo_n "checking for CP... " >&6; }
6053          if test ! -x "$tool_specified"; then
6054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6055$as_echo "not found" >&6; }
6056            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6057          fi
6058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6059$as_echo "$tool_specified" >&6; }
6060        fi
6061      fi
6062    fi
6063  fi
6064
6065
6066
6067  if test "x$CP" = x; then
6068    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6069  fi
6070
6071
6072
6073
6074
6075  # Publish this variable in the help.
6076
6077
6078  if [ -z "${CUT+x}" ]; then
6079    # The variable is not set by user, try to locate tool using the code snippet
6080    for ac_prog in cut
6081do
6082  # Extract the first word of "$ac_prog", so it can be a program name with args.
6083set dummy $ac_prog; ac_word=$2
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6085$as_echo_n "checking for $ac_word... " >&6; }
6086if ${ac_cv_path_CUT+:} false; then :
6087  $as_echo_n "(cached) " >&6
6088else
6089  case $CUT in
6090  [\\/]* | ?:[\\/]*)
6091  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6092  ;;
6093  *)
6094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095for as_dir in $PATH
6096do
6097  IFS=$as_save_IFS
6098  test -z "$as_dir" && as_dir=.
6099    for ac_exec_ext in '' $ac_executable_extensions; do
6100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6101    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6103    break 2
6104  fi
6105done
6106  done
6107IFS=$as_save_IFS
6108
6109  ;;
6110esac
6111fi
6112CUT=$ac_cv_path_CUT
6113if test -n "$CUT"; then
6114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6115$as_echo "$CUT" >&6; }
6116else
6117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118$as_echo "no" >&6; }
6119fi
6120
6121
6122  test -n "$CUT" && break
6123done
6124
6125  else
6126    # The variable is set, but is it from the command line or the environment?
6127
6128    # Try to remove the string !CUT! from our list.
6129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6131      # If it failed, the variable was not from the command line. Ignore it,
6132      # but warn the user (except for BASH, which is always set by the calling BASH).
6133      if test "xCUT" != xBASH; then
6134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6135$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6136      fi
6137      # Try to locate tool using the code snippet
6138      for ac_prog in cut
6139do
6140  # Extract the first word of "$ac_prog", so it can be a program name with args.
6141set dummy $ac_prog; ac_word=$2
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6143$as_echo_n "checking for $ac_word... " >&6; }
6144if ${ac_cv_path_CUT+:} false; then :
6145  $as_echo_n "(cached) " >&6
6146else
6147  case $CUT in
6148  [\\/]* | ?:[\\/]*)
6149  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6150  ;;
6151  *)
6152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6153for as_dir in $PATH
6154do
6155  IFS=$as_save_IFS
6156  test -z "$as_dir" && as_dir=.
6157    for ac_exec_ext in '' $ac_executable_extensions; do
6158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6159    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6161    break 2
6162  fi
6163done
6164  done
6165IFS=$as_save_IFS
6166
6167  ;;
6168esac
6169fi
6170CUT=$ac_cv_path_CUT
6171if test -n "$CUT"; then
6172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6173$as_echo "$CUT" >&6; }
6174else
6175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6176$as_echo "no" >&6; }
6177fi
6178
6179
6180  test -n "$CUT" && break
6181done
6182
6183    else
6184      # If it succeeded, then it was overridden by the user. We will use it
6185      # for the tool.
6186
6187      # First remove it from the list of overridden variables, so we can test
6188      # for unknown variables in the end.
6189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6190
6191      # Check if we try to supply an empty value
6192      if test "x$CUT" = x; then
6193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6194$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6196$as_echo_n "checking for CUT... " >&6; }
6197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6198$as_echo "disabled" >&6; }
6199      else
6200        # Check if the provided tool contains a complete path.
6201        tool_specified="$CUT"
6202        tool_basename="${tool_specified##*/}"
6203        if test "x$tool_basename" = "x$tool_specified"; then
6204          # A command without a complete path is provided, search $PATH.
6205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6206$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6207          # Extract the first word of "$tool_basename", so it can be a program name with args.
6208set dummy $tool_basename; ac_word=$2
6209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6210$as_echo_n "checking for $ac_word... " >&6; }
6211if ${ac_cv_path_CUT+:} false; then :
6212  $as_echo_n "(cached) " >&6
6213else
6214  case $CUT in
6215  [\\/]* | ?:[\\/]*)
6216  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6217  ;;
6218  *)
6219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220for as_dir in $PATH
6221do
6222  IFS=$as_save_IFS
6223  test -z "$as_dir" && as_dir=.
6224    for ac_exec_ext in '' $ac_executable_extensions; do
6225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6226    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228    break 2
6229  fi
6230done
6231  done
6232IFS=$as_save_IFS
6233
6234  ;;
6235esac
6236fi
6237CUT=$ac_cv_path_CUT
6238if test -n "$CUT"; then
6239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6240$as_echo "$CUT" >&6; }
6241else
6242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6243$as_echo "no" >&6; }
6244fi
6245
6246
6247          if test "x$CUT" = x; then
6248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6249          fi
6250        else
6251          # Otherwise we believe it is a complete path. Use it as it is.
6252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6253$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6255$as_echo_n "checking for CUT... " >&6; }
6256          if test ! -x "$tool_specified"; then
6257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6258$as_echo "not found" >&6; }
6259            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6260          fi
6261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6262$as_echo "$tool_specified" >&6; }
6263        fi
6264      fi
6265    fi
6266  fi
6267
6268
6269
6270  if test "x$CUT" = x; then
6271    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6272  fi
6273
6274
6275
6276
6277
6278  # Publish this variable in the help.
6279
6280
6281  if [ -z "${DATE+x}" ]; then
6282    # The variable is not set by user, try to locate tool using the code snippet
6283    for ac_prog in date
6284do
6285  # Extract the first word of "$ac_prog", so it can be a program name with args.
6286set dummy $ac_prog; ac_word=$2
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6288$as_echo_n "checking for $ac_word... " >&6; }
6289if ${ac_cv_path_DATE+:} false; then :
6290  $as_echo_n "(cached) " >&6
6291else
6292  case $DATE in
6293  [\\/]* | ?:[\\/]*)
6294  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6295  ;;
6296  *)
6297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6298for as_dir in $PATH
6299do
6300  IFS=$as_save_IFS
6301  test -z "$as_dir" && as_dir=.
6302    for ac_exec_ext in '' $ac_executable_extensions; do
6303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6304    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6306    break 2
6307  fi
6308done
6309  done
6310IFS=$as_save_IFS
6311
6312  ;;
6313esac
6314fi
6315DATE=$ac_cv_path_DATE
6316if test -n "$DATE"; then
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6318$as_echo "$DATE" >&6; }
6319else
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321$as_echo "no" >&6; }
6322fi
6323
6324
6325  test -n "$DATE" && break
6326done
6327
6328  else
6329    # The variable is set, but is it from the command line or the environment?
6330
6331    # Try to remove the string !DATE! from our list.
6332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6334      # If it failed, the variable was not from the command line. Ignore it,
6335      # but warn the user (except for BASH, which is always set by the calling BASH).
6336      if test "xDATE" != xBASH; then
6337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6338$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6339      fi
6340      # Try to locate tool using the code snippet
6341      for ac_prog in date
6342do
6343  # Extract the first word of "$ac_prog", so it can be a program name with args.
6344set dummy $ac_prog; ac_word=$2
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346$as_echo_n "checking for $ac_word... " >&6; }
6347if ${ac_cv_path_DATE+:} false; then :
6348  $as_echo_n "(cached) " >&6
6349else
6350  case $DATE in
6351  [\\/]* | ?:[\\/]*)
6352  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6353  ;;
6354  *)
6355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356for as_dir in $PATH
6357do
6358  IFS=$as_save_IFS
6359  test -z "$as_dir" && as_dir=.
6360    for ac_exec_ext in '' $ac_executable_extensions; do
6361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6362    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6364    break 2
6365  fi
6366done
6367  done
6368IFS=$as_save_IFS
6369
6370  ;;
6371esac
6372fi
6373DATE=$ac_cv_path_DATE
6374if test -n "$DATE"; then
6375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6376$as_echo "$DATE" >&6; }
6377else
6378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; }
6380fi
6381
6382
6383  test -n "$DATE" && break
6384done
6385
6386    else
6387      # If it succeeded, then it was overridden by the user. We will use it
6388      # for the tool.
6389
6390      # First remove it from the list of overridden variables, so we can test
6391      # for unknown variables in the end.
6392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6393
6394      # Check if we try to supply an empty value
6395      if test "x$DATE" = x; then
6396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6397$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6399$as_echo_n "checking for DATE... " >&6; }
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6401$as_echo "disabled" >&6; }
6402      else
6403        # Check if the provided tool contains a complete path.
6404        tool_specified="$DATE"
6405        tool_basename="${tool_specified##*/}"
6406        if test "x$tool_basename" = "x$tool_specified"; then
6407          # A command without a complete path is provided, search $PATH.
6408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6409$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6410          # Extract the first word of "$tool_basename", so it can be a program name with args.
6411set dummy $tool_basename; ac_word=$2
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6413$as_echo_n "checking for $ac_word... " >&6; }
6414if ${ac_cv_path_DATE+:} false; then :
6415  $as_echo_n "(cached) " >&6
6416else
6417  case $DATE in
6418  [\\/]* | ?:[\\/]*)
6419  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6420  ;;
6421  *)
6422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6423for as_dir in $PATH
6424do
6425  IFS=$as_save_IFS
6426  test -z "$as_dir" && as_dir=.
6427    for ac_exec_ext in '' $ac_executable_extensions; do
6428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6429    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6431    break 2
6432  fi
6433done
6434  done
6435IFS=$as_save_IFS
6436
6437  ;;
6438esac
6439fi
6440DATE=$ac_cv_path_DATE
6441if test -n "$DATE"; then
6442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6443$as_echo "$DATE" >&6; }
6444else
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }
6447fi
6448
6449
6450          if test "x$DATE" = x; then
6451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6452          fi
6453        else
6454          # Otherwise we believe it is a complete path. Use it as it is.
6455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6456$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6458$as_echo_n "checking for DATE... " >&6; }
6459          if test ! -x "$tool_specified"; then
6460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6461$as_echo "not found" >&6; }
6462            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6463          fi
6464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6465$as_echo "$tool_specified" >&6; }
6466        fi
6467      fi
6468    fi
6469  fi
6470
6471
6472
6473  if test "x$DATE" = x; then
6474    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6475  fi
6476
6477
6478
6479
6480
6481  # Publish this variable in the help.
6482
6483
6484  if [ -z "${DIFF+x}" ]; then
6485    # The variable is not set by user, try to locate tool using the code snippet
6486    for ac_prog in gdiff diff
6487do
6488  # Extract the first word of "$ac_prog", so it can be a program name with args.
6489set dummy $ac_prog; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_path_DIFF+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  case $DIFF in
6496  [\\/]* | ?:[\\/]*)
6497  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6498  ;;
6499  *)
6500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
6503  IFS=$as_save_IFS
6504  test -z "$as_dir" && as_dir=.
6505    for ac_exec_ext in '' $ac_executable_extensions; do
6506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509    break 2
6510  fi
6511done
6512  done
6513IFS=$as_save_IFS
6514
6515  ;;
6516esac
6517fi
6518DIFF=$ac_cv_path_DIFF
6519if test -n "$DIFF"; then
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6521$as_echo "$DIFF" >&6; }
6522else
6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527
6528  test -n "$DIFF" && break
6529done
6530
6531  else
6532    # The variable is set, but is it from the command line or the environment?
6533
6534    # Try to remove the string !DIFF! from our list.
6535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6537      # If it failed, the variable was not from the command line. Ignore it,
6538      # but warn the user (except for BASH, which is always set by the calling BASH).
6539      if test "xDIFF" != xBASH; then
6540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6541$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6542      fi
6543      # Try to locate tool using the code snippet
6544      for ac_prog in gdiff diff
6545do
6546  # Extract the first word of "$ac_prog", so it can be a program name with args.
6547set dummy $ac_prog; ac_word=$2
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6549$as_echo_n "checking for $ac_word... " >&6; }
6550if ${ac_cv_path_DIFF+:} false; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  case $DIFF in
6554  [\\/]* | ?:[\\/]*)
6555  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6556  ;;
6557  *)
6558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559for as_dir in $PATH
6560do
6561  IFS=$as_save_IFS
6562  test -z "$as_dir" && as_dir=.
6563    for ac_exec_ext in '' $ac_executable_extensions; do
6564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567    break 2
6568  fi
6569done
6570  done
6571IFS=$as_save_IFS
6572
6573  ;;
6574esac
6575fi
6576DIFF=$ac_cv_path_DIFF
6577if test -n "$DIFF"; then
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6579$as_echo "$DIFF" >&6; }
6580else
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585
6586  test -n "$DIFF" && break
6587done
6588
6589    else
6590      # If it succeeded, then it was overridden by the user. We will use it
6591      # for the tool.
6592
6593      # First remove it from the list of overridden variables, so we can test
6594      # for unknown variables in the end.
6595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6596
6597      # Check if we try to supply an empty value
6598      if test "x$DIFF" = x; then
6599        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6600$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6602$as_echo_n "checking for DIFF... " >&6; }
6603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6604$as_echo "disabled" >&6; }
6605      else
6606        # Check if the provided tool contains a complete path.
6607        tool_specified="$DIFF"
6608        tool_basename="${tool_specified##*/}"
6609        if test "x$tool_basename" = "x$tool_specified"; then
6610          # A command without a complete path is provided, search $PATH.
6611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6612$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6613          # Extract the first word of "$tool_basename", so it can be a program name with args.
6614set dummy $tool_basename; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_path_DIFF+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  case $DIFF in
6621  [\\/]* | ?:[\\/]*)
6622  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6623  ;;
6624  *)
6625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in $PATH
6627do
6628  IFS=$as_save_IFS
6629  test -z "$as_dir" && as_dir=.
6630    for ac_exec_ext in '' $ac_executable_extensions; do
6631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634    break 2
6635  fi
6636done
6637  done
6638IFS=$as_save_IFS
6639
6640  ;;
6641esac
6642fi
6643DIFF=$ac_cv_path_DIFF
6644if test -n "$DIFF"; then
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6646$as_echo "$DIFF" >&6; }
6647else
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652
6653          if test "x$DIFF" = x; then
6654            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6655          fi
6656        else
6657          # Otherwise we believe it is a complete path. Use it as it is.
6658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6659$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6660          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6661$as_echo_n "checking for DIFF... " >&6; }
6662          if test ! -x "$tool_specified"; then
6663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6664$as_echo "not found" >&6; }
6665            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6666          fi
6667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6668$as_echo "$tool_specified" >&6; }
6669        fi
6670      fi
6671    fi
6672  fi
6673
6674
6675
6676  if test "x$DIFF" = x; then
6677    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6678  fi
6679
6680
6681
6682
6683
6684  # Publish this variable in the help.
6685
6686
6687  if [ -z "${DIRNAME+x}" ]; then
6688    # The variable is not set by user, try to locate tool using the code snippet
6689    for ac_prog in dirname
6690do
6691  # Extract the first word of "$ac_prog", so it can be a program name with args.
6692set dummy $ac_prog; ac_word=$2
6693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6694$as_echo_n "checking for $ac_word... " >&6; }
6695if ${ac_cv_path_DIRNAME+:} false; then :
6696  $as_echo_n "(cached) " >&6
6697else
6698  case $DIRNAME in
6699  [\\/]* | ?:[\\/]*)
6700  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6701  ;;
6702  *)
6703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6704for as_dir in $PATH
6705do
6706  IFS=$as_save_IFS
6707  test -z "$as_dir" && as_dir=.
6708    for ac_exec_ext in '' $ac_executable_extensions; do
6709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6710    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6712    break 2
6713  fi
6714done
6715  done
6716IFS=$as_save_IFS
6717
6718  ;;
6719esac
6720fi
6721DIRNAME=$ac_cv_path_DIRNAME
6722if test -n "$DIRNAME"; then
6723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6724$as_echo "$DIRNAME" >&6; }
6725else
6726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6727$as_echo "no" >&6; }
6728fi
6729
6730
6731  test -n "$DIRNAME" && break
6732done
6733
6734  else
6735    # The variable is set, but is it from the command line or the environment?
6736
6737    # Try to remove the string !DIRNAME! from our list.
6738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6740      # If it failed, the variable was not from the command line. Ignore it,
6741      # but warn the user (except for BASH, which is always set by the calling BASH).
6742      if test "xDIRNAME" != xBASH; then
6743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6744$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6745      fi
6746      # Try to locate tool using the code snippet
6747      for ac_prog in dirname
6748do
6749  # Extract the first word of "$ac_prog", so it can be a program name with args.
6750set dummy $ac_prog; ac_word=$2
6751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6752$as_echo_n "checking for $ac_word... " >&6; }
6753if ${ac_cv_path_DIRNAME+:} false; then :
6754  $as_echo_n "(cached) " >&6
6755else
6756  case $DIRNAME in
6757  [\\/]* | ?:[\\/]*)
6758  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6759  ;;
6760  *)
6761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6762for as_dir in $PATH
6763do
6764  IFS=$as_save_IFS
6765  test -z "$as_dir" && as_dir=.
6766    for ac_exec_ext in '' $ac_executable_extensions; do
6767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6768    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6770    break 2
6771  fi
6772done
6773  done
6774IFS=$as_save_IFS
6775
6776  ;;
6777esac
6778fi
6779DIRNAME=$ac_cv_path_DIRNAME
6780if test -n "$DIRNAME"; then
6781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6782$as_echo "$DIRNAME" >&6; }
6783else
6784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6785$as_echo "no" >&6; }
6786fi
6787
6788
6789  test -n "$DIRNAME" && break
6790done
6791
6792    else
6793      # If it succeeded, then it was overridden by the user. We will use it
6794      # for the tool.
6795
6796      # First remove it from the list of overridden variables, so we can test
6797      # for unknown variables in the end.
6798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6799
6800      # Check if we try to supply an empty value
6801      if test "x$DIRNAME" = x; then
6802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6803$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6805$as_echo_n "checking for DIRNAME... " >&6; }
6806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6807$as_echo "disabled" >&6; }
6808      else
6809        # Check if the provided tool contains a complete path.
6810        tool_specified="$DIRNAME"
6811        tool_basename="${tool_specified##*/}"
6812        if test "x$tool_basename" = "x$tool_specified"; then
6813          # A command without a complete path is provided, search $PATH.
6814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6815$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6816          # Extract the first word of "$tool_basename", so it can be a program name with args.
6817set dummy $tool_basename; ac_word=$2
6818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819$as_echo_n "checking for $ac_word... " >&6; }
6820if ${ac_cv_path_DIRNAME+:} false; then :
6821  $as_echo_n "(cached) " >&6
6822else
6823  case $DIRNAME in
6824  [\\/]* | ?:[\\/]*)
6825  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6826  ;;
6827  *)
6828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6829for as_dir in $PATH
6830do
6831  IFS=$as_save_IFS
6832  test -z "$as_dir" && as_dir=.
6833    for ac_exec_ext in '' $ac_executable_extensions; do
6834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6835    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837    break 2
6838  fi
6839done
6840  done
6841IFS=$as_save_IFS
6842
6843  ;;
6844esac
6845fi
6846DIRNAME=$ac_cv_path_DIRNAME
6847if test -n "$DIRNAME"; then
6848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6849$as_echo "$DIRNAME" >&6; }
6850else
6851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6852$as_echo "no" >&6; }
6853fi
6854
6855
6856          if test "x$DIRNAME" = x; then
6857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6858          fi
6859        else
6860          # Otherwise we believe it is a complete path. Use it as it is.
6861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6862$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6864$as_echo_n "checking for DIRNAME... " >&6; }
6865          if test ! -x "$tool_specified"; then
6866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6867$as_echo "not found" >&6; }
6868            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6869          fi
6870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6871$as_echo "$tool_specified" >&6; }
6872        fi
6873      fi
6874    fi
6875  fi
6876
6877
6878
6879  if test "x$DIRNAME" = x; then
6880    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6881  fi
6882
6883
6884
6885
6886
6887  # Publish this variable in the help.
6888
6889
6890  if [ -z "${ECHO+x}" ]; then
6891    # The variable is not set by user, try to locate tool using the code snippet
6892    for ac_prog in echo
6893do
6894  # Extract the first word of "$ac_prog", so it can be a program name with args.
6895set dummy $ac_prog; ac_word=$2
6896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6897$as_echo_n "checking for $ac_word... " >&6; }
6898if ${ac_cv_path_ECHO+:} false; then :
6899  $as_echo_n "(cached) " >&6
6900else
6901  case $ECHO in
6902  [\\/]* | ?:[\\/]*)
6903  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6904  ;;
6905  *)
6906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6907for as_dir in $PATH
6908do
6909  IFS=$as_save_IFS
6910  test -z "$as_dir" && as_dir=.
6911    for ac_exec_ext in '' $ac_executable_extensions; do
6912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6913    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6915    break 2
6916  fi
6917done
6918  done
6919IFS=$as_save_IFS
6920
6921  ;;
6922esac
6923fi
6924ECHO=$ac_cv_path_ECHO
6925if test -n "$ECHO"; then
6926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6927$as_echo "$ECHO" >&6; }
6928else
6929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6930$as_echo "no" >&6; }
6931fi
6932
6933
6934  test -n "$ECHO" && break
6935done
6936
6937  else
6938    # The variable is set, but is it from the command line or the environment?
6939
6940    # Try to remove the string !ECHO! from our list.
6941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6943      # If it failed, the variable was not from the command line. Ignore it,
6944      # but warn the user (except for BASH, which is always set by the calling BASH).
6945      if test "xECHO" != xBASH; then
6946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6947$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6948      fi
6949      # Try to locate tool using the code snippet
6950      for ac_prog in echo
6951do
6952  # Extract the first word of "$ac_prog", so it can be a program name with args.
6953set dummy $ac_prog; ac_word=$2
6954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6955$as_echo_n "checking for $ac_word... " >&6; }
6956if ${ac_cv_path_ECHO+:} false; then :
6957  $as_echo_n "(cached) " >&6
6958else
6959  case $ECHO in
6960  [\\/]* | ?:[\\/]*)
6961  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6962  ;;
6963  *)
6964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6965for as_dir in $PATH
6966do
6967  IFS=$as_save_IFS
6968  test -z "$as_dir" && as_dir=.
6969    for ac_exec_ext in '' $ac_executable_extensions; do
6970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6971    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6973    break 2
6974  fi
6975done
6976  done
6977IFS=$as_save_IFS
6978
6979  ;;
6980esac
6981fi
6982ECHO=$ac_cv_path_ECHO
6983if test -n "$ECHO"; then
6984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6985$as_echo "$ECHO" >&6; }
6986else
6987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6988$as_echo "no" >&6; }
6989fi
6990
6991
6992  test -n "$ECHO" && break
6993done
6994
6995    else
6996      # If it succeeded, then it was overridden by the user. We will use it
6997      # for the tool.
6998
6999      # First remove it from the list of overridden variables, so we can test
7000      # for unknown variables in the end.
7001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7002
7003      # Check if we try to supply an empty value
7004      if test "x$ECHO" = x; then
7005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7006$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7008$as_echo_n "checking for ECHO... " >&6; }
7009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7010$as_echo "disabled" >&6; }
7011      else
7012        # Check if the provided tool contains a complete path.
7013        tool_specified="$ECHO"
7014        tool_basename="${tool_specified##*/}"
7015        if test "x$tool_basename" = "x$tool_specified"; then
7016          # A command without a complete path is provided, search $PATH.
7017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7018$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7019          # Extract the first word of "$tool_basename", so it can be a program name with args.
7020set dummy $tool_basename; ac_word=$2
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7022$as_echo_n "checking for $ac_word... " >&6; }
7023if ${ac_cv_path_ECHO+:} false; then :
7024  $as_echo_n "(cached) " >&6
7025else
7026  case $ECHO in
7027  [\\/]* | ?:[\\/]*)
7028  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7029  ;;
7030  *)
7031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7032for as_dir in $PATH
7033do
7034  IFS=$as_save_IFS
7035  test -z "$as_dir" && as_dir=.
7036    for ac_exec_ext in '' $ac_executable_extensions; do
7037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7038    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7040    break 2
7041  fi
7042done
7043  done
7044IFS=$as_save_IFS
7045
7046  ;;
7047esac
7048fi
7049ECHO=$ac_cv_path_ECHO
7050if test -n "$ECHO"; then
7051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7052$as_echo "$ECHO" >&6; }
7053else
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055$as_echo "no" >&6; }
7056fi
7057
7058
7059          if test "x$ECHO" = x; then
7060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7061          fi
7062        else
7063          # Otherwise we believe it is a complete path. Use it as it is.
7064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7065$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7067$as_echo_n "checking for ECHO... " >&6; }
7068          if test ! -x "$tool_specified"; then
7069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7070$as_echo "not found" >&6; }
7071            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7072          fi
7073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7074$as_echo "$tool_specified" >&6; }
7075        fi
7076      fi
7077    fi
7078  fi
7079
7080
7081
7082  if test "x$ECHO" = x; then
7083    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7084  fi
7085
7086
7087
7088
7089
7090  # Publish this variable in the help.
7091
7092
7093  if [ -z "${EXPR+x}" ]; then
7094    # The variable is not set by user, try to locate tool using the code snippet
7095    for ac_prog in expr
7096do
7097  # Extract the first word of "$ac_prog", so it can be a program name with args.
7098set dummy $ac_prog; ac_word=$2
7099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7100$as_echo_n "checking for $ac_word... " >&6; }
7101if ${ac_cv_path_EXPR+:} false; then :
7102  $as_echo_n "(cached) " >&6
7103else
7104  case $EXPR in
7105  [\\/]* | ?:[\\/]*)
7106  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7107  ;;
7108  *)
7109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7110for as_dir in $PATH
7111do
7112  IFS=$as_save_IFS
7113  test -z "$as_dir" && as_dir=.
7114    for ac_exec_ext in '' $ac_executable_extensions; do
7115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7116    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7118    break 2
7119  fi
7120done
7121  done
7122IFS=$as_save_IFS
7123
7124  ;;
7125esac
7126fi
7127EXPR=$ac_cv_path_EXPR
7128if test -n "$EXPR"; then
7129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7130$as_echo "$EXPR" >&6; }
7131else
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133$as_echo "no" >&6; }
7134fi
7135
7136
7137  test -n "$EXPR" && break
7138done
7139
7140  else
7141    # The variable is set, but is it from the command line or the environment?
7142
7143    # Try to remove the string !EXPR! from our list.
7144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7146      # If it failed, the variable was not from the command line. Ignore it,
7147      # but warn the user (except for BASH, which is always set by the calling BASH).
7148      if test "xEXPR" != xBASH; then
7149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7150$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7151      fi
7152      # Try to locate tool using the code snippet
7153      for ac_prog in expr
7154do
7155  # Extract the first word of "$ac_prog", so it can be a program name with args.
7156set dummy $ac_prog; ac_word=$2
7157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7158$as_echo_n "checking for $ac_word... " >&6; }
7159if ${ac_cv_path_EXPR+:} false; then :
7160  $as_echo_n "(cached) " >&6
7161else
7162  case $EXPR in
7163  [\\/]* | ?:[\\/]*)
7164  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7165  ;;
7166  *)
7167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7168for as_dir in $PATH
7169do
7170  IFS=$as_save_IFS
7171  test -z "$as_dir" && as_dir=.
7172    for ac_exec_ext in '' $ac_executable_extensions; do
7173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7174    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7176    break 2
7177  fi
7178done
7179  done
7180IFS=$as_save_IFS
7181
7182  ;;
7183esac
7184fi
7185EXPR=$ac_cv_path_EXPR
7186if test -n "$EXPR"; then
7187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7188$as_echo "$EXPR" >&6; }
7189else
7190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191$as_echo "no" >&6; }
7192fi
7193
7194
7195  test -n "$EXPR" && break
7196done
7197
7198    else
7199      # If it succeeded, then it was overridden by the user. We will use it
7200      # for the tool.
7201
7202      # First remove it from the list of overridden variables, so we can test
7203      # for unknown variables in the end.
7204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7205
7206      # Check if we try to supply an empty value
7207      if test "x$EXPR" = x; then
7208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7209$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7211$as_echo_n "checking for EXPR... " >&6; }
7212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7213$as_echo "disabled" >&6; }
7214      else
7215        # Check if the provided tool contains a complete path.
7216        tool_specified="$EXPR"
7217        tool_basename="${tool_specified##*/}"
7218        if test "x$tool_basename" = "x$tool_specified"; then
7219          # A command without a complete path is provided, search $PATH.
7220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7221$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7222          # Extract the first word of "$tool_basename", so it can be a program name with args.
7223set dummy $tool_basename; ac_word=$2
7224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7225$as_echo_n "checking for $ac_word... " >&6; }
7226if ${ac_cv_path_EXPR+:} false; then :
7227  $as_echo_n "(cached) " >&6
7228else
7229  case $EXPR in
7230  [\\/]* | ?:[\\/]*)
7231  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7232  ;;
7233  *)
7234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7235for as_dir in $PATH
7236do
7237  IFS=$as_save_IFS
7238  test -z "$as_dir" && as_dir=.
7239    for ac_exec_ext in '' $ac_executable_extensions; do
7240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7241    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7243    break 2
7244  fi
7245done
7246  done
7247IFS=$as_save_IFS
7248
7249  ;;
7250esac
7251fi
7252EXPR=$ac_cv_path_EXPR
7253if test -n "$EXPR"; then
7254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7255$as_echo "$EXPR" >&6; }
7256else
7257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7258$as_echo "no" >&6; }
7259fi
7260
7261
7262          if test "x$EXPR" = x; then
7263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7264          fi
7265        else
7266          # Otherwise we believe it is a complete path. Use it as it is.
7267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7268$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7270$as_echo_n "checking for EXPR... " >&6; }
7271          if test ! -x "$tool_specified"; then
7272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7273$as_echo "not found" >&6; }
7274            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7275          fi
7276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7277$as_echo "$tool_specified" >&6; }
7278        fi
7279      fi
7280    fi
7281  fi
7282
7283
7284
7285  if test "x$EXPR" = x; then
7286    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7287  fi
7288
7289
7290
7291
7292
7293  # Publish this variable in the help.
7294
7295
7296  if [ -z "${FILE+x}" ]; then
7297    # The variable is not set by user, try to locate tool using the code snippet
7298    for ac_prog in file
7299do
7300  # Extract the first word of "$ac_prog", so it can be a program name with args.
7301set dummy $ac_prog; ac_word=$2
7302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7303$as_echo_n "checking for $ac_word... " >&6; }
7304if ${ac_cv_path_FILE+:} false; then :
7305  $as_echo_n "(cached) " >&6
7306else
7307  case $FILE in
7308  [\\/]* | ?:[\\/]*)
7309  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7310  ;;
7311  *)
7312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7313for as_dir in $PATH
7314do
7315  IFS=$as_save_IFS
7316  test -z "$as_dir" && as_dir=.
7317    for ac_exec_ext in '' $ac_executable_extensions; do
7318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7319    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7321    break 2
7322  fi
7323done
7324  done
7325IFS=$as_save_IFS
7326
7327  ;;
7328esac
7329fi
7330FILE=$ac_cv_path_FILE
7331if test -n "$FILE"; then
7332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7333$as_echo "$FILE" >&6; }
7334else
7335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7336$as_echo "no" >&6; }
7337fi
7338
7339
7340  test -n "$FILE" && break
7341done
7342
7343  else
7344    # The variable is set, but is it from the command line or the environment?
7345
7346    # Try to remove the string !FILE! from our list.
7347    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7348    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7349      # If it failed, the variable was not from the command line. Ignore it,
7350      # but warn the user (except for BASH, which is always set by the calling BASH).
7351      if test "xFILE" != xBASH; then
7352        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7353$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7354      fi
7355      # Try to locate tool using the code snippet
7356      for ac_prog in file
7357do
7358  # Extract the first word of "$ac_prog", so it can be a program name with args.
7359set dummy $ac_prog; ac_word=$2
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7361$as_echo_n "checking for $ac_word... " >&6; }
7362if ${ac_cv_path_FILE+:} false; then :
7363  $as_echo_n "(cached) " >&6
7364else
7365  case $FILE in
7366  [\\/]* | ?:[\\/]*)
7367  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7368  ;;
7369  *)
7370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7371for as_dir in $PATH
7372do
7373  IFS=$as_save_IFS
7374  test -z "$as_dir" && as_dir=.
7375    for ac_exec_ext in '' $ac_executable_extensions; do
7376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7377    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7379    break 2
7380  fi
7381done
7382  done
7383IFS=$as_save_IFS
7384
7385  ;;
7386esac
7387fi
7388FILE=$ac_cv_path_FILE
7389if test -n "$FILE"; then
7390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7391$as_echo "$FILE" >&6; }
7392else
7393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
7395fi
7396
7397
7398  test -n "$FILE" && break
7399done
7400
7401    else
7402      # If it succeeded, then it was overridden by the user. We will use it
7403      # for the tool.
7404
7405      # First remove it from the list of overridden variables, so we can test
7406      # for unknown variables in the end.
7407      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7408
7409      # Check if we try to supply an empty value
7410      if test "x$FILE" = x; then
7411        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7412$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7414$as_echo_n "checking for FILE... " >&6; }
7415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7416$as_echo "disabled" >&6; }
7417      else
7418        # Check if the provided tool contains a complete path.
7419        tool_specified="$FILE"
7420        tool_basename="${tool_specified##*/}"
7421        if test "x$tool_basename" = "x$tool_specified"; then
7422          # A command without a complete path is provided, search $PATH.
7423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7424$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7425          # Extract the first word of "$tool_basename", so it can be a program name with args.
7426set dummy $tool_basename; ac_word=$2
7427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7428$as_echo_n "checking for $ac_word... " >&6; }
7429if ${ac_cv_path_FILE+:} false; then :
7430  $as_echo_n "(cached) " >&6
7431else
7432  case $FILE in
7433  [\\/]* | ?:[\\/]*)
7434  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7435  ;;
7436  *)
7437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438for as_dir in $PATH
7439do
7440  IFS=$as_save_IFS
7441  test -z "$as_dir" && as_dir=.
7442    for ac_exec_ext in '' $ac_executable_extensions; do
7443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7444    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7446    break 2
7447  fi
7448done
7449  done
7450IFS=$as_save_IFS
7451
7452  ;;
7453esac
7454fi
7455FILE=$ac_cv_path_FILE
7456if test -n "$FILE"; then
7457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7458$as_echo "$FILE" >&6; }
7459else
7460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7461$as_echo "no" >&6; }
7462fi
7463
7464
7465          if test "x$FILE" = x; then
7466            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7467          fi
7468        else
7469          # Otherwise we believe it is a complete path. Use it as it is.
7470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7471$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7472          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7473$as_echo_n "checking for FILE... " >&6; }
7474          if test ! -x "$tool_specified"; then
7475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7476$as_echo "not found" >&6; }
7477            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7478          fi
7479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7480$as_echo "$tool_specified" >&6; }
7481        fi
7482      fi
7483    fi
7484  fi
7485
7486
7487
7488  if test "x$FILE" = x; then
7489    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7490  fi
7491
7492
7493
7494
7495
7496  # Publish this variable in the help.
7497
7498
7499  if [ -z "${FIND+x}" ]; then
7500    # The variable is not set by user, try to locate tool using the code snippet
7501    for ac_prog in find
7502do
7503  # Extract the first word of "$ac_prog", so it can be a program name with args.
7504set dummy $ac_prog; ac_word=$2
7505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7506$as_echo_n "checking for $ac_word... " >&6; }
7507if ${ac_cv_path_FIND+:} false; then :
7508  $as_echo_n "(cached) " >&6
7509else
7510  case $FIND in
7511  [\\/]* | ?:[\\/]*)
7512  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7513  ;;
7514  *)
7515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7516for as_dir in $PATH
7517do
7518  IFS=$as_save_IFS
7519  test -z "$as_dir" && as_dir=.
7520    for ac_exec_ext in '' $ac_executable_extensions; do
7521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7522    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7524    break 2
7525  fi
7526done
7527  done
7528IFS=$as_save_IFS
7529
7530  ;;
7531esac
7532fi
7533FIND=$ac_cv_path_FIND
7534if test -n "$FIND"; then
7535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7536$as_echo "$FIND" >&6; }
7537else
7538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7539$as_echo "no" >&6; }
7540fi
7541
7542
7543  test -n "$FIND" && break
7544done
7545
7546  else
7547    # The variable is set, but is it from the command line or the environment?
7548
7549    # Try to remove the string !FIND! from our list.
7550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7552      # If it failed, the variable was not from the command line. Ignore it,
7553      # but warn the user (except for BASH, which is always set by the calling BASH).
7554      if test "xFIND" != xBASH; then
7555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7556$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7557      fi
7558      # Try to locate tool using the code snippet
7559      for ac_prog in find
7560do
7561  # Extract the first word of "$ac_prog", so it can be a program name with args.
7562set dummy $ac_prog; ac_word=$2
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7564$as_echo_n "checking for $ac_word... " >&6; }
7565if ${ac_cv_path_FIND+:} false; then :
7566  $as_echo_n "(cached) " >&6
7567else
7568  case $FIND in
7569  [\\/]* | ?:[\\/]*)
7570  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7571  ;;
7572  *)
7573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7574for as_dir in $PATH
7575do
7576  IFS=$as_save_IFS
7577  test -z "$as_dir" && as_dir=.
7578    for ac_exec_ext in '' $ac_executable_extensions; do
7579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7580    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7582    break 2
7583  fi
7584done
7585  done
7586IFS=$as_save_IFS
7587
7588  ;;
7589esac
7590fi
7591FIND=$ac_cv_path_FIND
7592if test -n "$FIND"; then
7593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7594$as_echo "$FIND" >&6; }
7595else
7596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597$as_echo "no" >&6; }
7598fi
7599
7600
7601  test -n "$FIND" && break
7602done
7603
7604    else
7605      # If it succeeded, then it was overridden by the user. We will use it
7606      # for the tool.
7607
7608      # First remove it from the list of overridden variables, so we can test
7609      # for unknown variables in the end.
7610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7611
7612      # Check if we try to supply an empty value
7613      if test "x$FIND" = x; then
7614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7615$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7617$as_echo_n "checking for FIND... " >&6; }
7618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7619$as_echo "disabled" >&6; }
7620      else
7621        # Check if the provided tool contains a complete path.
7622        tool_specified="$FIND"
7623        tool_basename="${tool_specified##*/}"
7624        if test "x$tool_basename" = "x$tool_specified"; then
7625          # A command without a complete path is provided, search $PATH.
7626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7627$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7628          # Extract the first word of "$tool_basename", so it can be a program name with args.
7629set dummy $tool_basename; ac_word=$2
7630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7631$as_echo_n "checking for $ac_word... " >&6; }
7632if ${ac_cv_path_FIND+:} false; then :
7633  $as_echo_n "(cached) " >&6
7634else
7635  case $FIND in
7636  [\\/]* | ?:[\\/]*)
7637  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7638  ;;
7639  *)
7640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7641for as_dir in $PATH
7642do
7643  IFS=$as_save_IFS
7644  test -z "$as_dir" && as_dir=.
7645    for ac_exec_ext in '' $ac_executable_extensions; do
7646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7647    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7649    break 2
7650  fi
7651done
7652  done
7653IFS=$as_save_IFS
7654
7655  ;;
7656esac
7657fi
7658FIND=$ac_cv_path_FIND
7659if test -n "$FIND"; then
7660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7661$as_echo "$FIND" >&6; }
7662else
7663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7664$as_echo "no" >&6; }
7665fi
7666
7667
7668          if test "x$FIND" = x; then
7669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7670          fi
7671        else
7672          # Otherwise we believe it is a complete path. Use it as it is.
7673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7674$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7676$as_echo_n "checking for FIND... " >&6; }
7677          if test ! -x "$tool_specified"; then
7678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7679$as_echo "not found" >&6; }
7680            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7681          fi
7682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7683$as_echo "$tool_specified" >&6; }
7684        fi
7685      fi
7686    fi
7687  fi
7688
7689
7690
7691  if test "x$FIND" = x; then
7692    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7693  fi
7694
7695
7696
7697
7698
7699  # Publish this variable in the help.
7700
7701
7702  if [ -z "${HEAD+x}" ]; then
7703    # The variable is not set by user, try to locate tool using the code snippet
7704    for ac_prog in head
7705do
7706  # Extract the first word of "$ac_prog", so it can be a program name with args.
7707set dummy $ac_prog; ac_word=$2
7708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7709$as_echo_n "checking for $ac_word... " >&6; }
7710if ${ac_cv_path_HEAD+:} false; then :
7711  $as_echo_n "(cached) " >&6
7712else
7713  case $HEAD in
7714  [\\/]* | ?:[\\/]*)
7715  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7716  ;;
7717  *)
7718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719for as_dir in $PATH
7720do
7721  IFS=$as_save_IFS
7722  test -z "$as_dir" && as_dir=.
7723    for ac_exec_ext in '' $ac_executable_extensions; do
7724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7725    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7727    break 2
7728  fi
7729done
7730  done
7731IFS=$as_save_IFS
7732
7733  ;;
7734esac
7735fi
7736HEAD=$ac_cv_path_HEAD
7737if test -n "$HEAD"; then
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7739$as_echo "$HEAD" >&6; }
7740else
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742$as_echo "no" >&6; }
7743fi
7744
7745
7746  test -n "$HEAD" && break
7747done
7748
7749  else
7750    # The variable is set, but is it from the command line or the environment?
7751
7752    # Try to remove the string !HEAD! from our list.
7753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7755      # If it failed, the variable was not from the command line. Ignore it,
7756      # but warn the user (except for BASH, which is always set by the calling BASH).
7757      if test "xHEAD" != xBASH; then
7758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7759$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7760      fi
7761      # Try to locate tool using the code snippet
7762      for ac_prog in head
7763do
7764  # Extract the first word of "$ac_prog", so it can be a program name with args.
7765set dummy $ac_prog; ac_word=$2
7766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7767$as_echo_n "checking for $ac_word... " >&6; }
7768if ${ac_cv_path_HEAD+:} false; then :
7769  $as_echo_n "(cached) " >&6
7770else
7771  case $HEAD in
7772  [\\/]* | ?:[\\/]*)
7773  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7774  ;;
7775  *)
7776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7777for as_dir in $PATH
7778do
7779  IFS=$as_save_IFS
7780  test -z "$as_dir" && as_dir=.
7781    for ac_exec_ext in '' $ac_executable_extensions; do
7782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7783    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7785    break 2
7786  fi
7787done
7788  done
7789IFS=$as_save_IFS
7790
7791  ;;
7792esac
7793fi
7794HEAD=$ac_cv_path_HEAD
7795if test -n "$HEAD"; then
7796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7797$as_echo "$HEAD" >&6; }
7798else
7799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7800$as_echo "no" >&6; }
7801fi
7802
7803
7804  test -n "$HEAD" && break
7805done
7806
7807    else
7808      # If it succeeded, then it was overridden by the user. We will use it
7809      # for the tool.
7810
7811      # First remove it from the list of overridden variables, so we can test
7812      # for unknown variables in the end.
7813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7814
7815      # Check if we try to supply an empty value
7816      if test "x$HEAD" = x; then
7817        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7818$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7820$as_echo_n "checking for HEAD... " >&6; }
7821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7822$as_echo "disabled" >&6; }
7823      else
7824        # Check if the provided tool contains a complete path.
7825        tool_specified="$HEAD"
7826        tool_basename="${tool_specified##*/}"
7827        if test "x$tool_basename" = "x$tool_specified"; then
7828          # A command without a complete path is provided, search $PATH.
7829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7830$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7831          # Extract the first word of "$tool_basename", so it can be a program name with args.
7832set dummy $tool_basename; ac_word=$2
7833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7834$as_echo_n "checking for $ac_word... " >&6; }
7835if ${ac_cv_path_HEAD+:} false; then :
7836  $as_echo_n "(cached) " >&6
7837else
7838  case $HEAD in
7839  [\\/]* | ?:[\\/]*)
7840  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7841  ;;
7842  *)
7843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7844for as_dir in $PATH
7845do
7846  IFS=$as_save_IFS
7847  test -z "$as_dir" && as_dir=.
7848    for ac_exec_ext in '' $ac_executable_extensions; do
7849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7850    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7852    break 2
7853  fi
7854done
7855  done
7856IFS=$as_save_IFS
7857
7858  ;;
7859esac
7860fi
7861HEAD=$ac_cv_path_HEAD
7862if test -n "$HEAD"; then
7863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7864$as_echo "$HEAD" >&6; }
7865else
7866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867$as_echo "no" >&6; }
7868fi
7869
7870
7871          if test "x$HEAD" = x; then
7872            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7873          fi
7874        else
7875          # Otherwise we believe it is a complete path. Use it as it is.
7876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7877$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7878          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7879$as_echo_n "checking for HEAD... " >&6; }
7880          if test ! -x "$tool_specified"; then
7881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7882$as_echo "not found" >&6; }
7883            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7884          fi
7885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7886$as_echo "$tool_specified" >&6; }
7887        fi
7888      fi
7889    fi
7890  fi
7891
7892
7893
7894  if test "x$HEAD" = x; then
7895    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7896  fi
7897
7898
7899
7900
7901
7902  # Publish this variable in the help.
7903
7904
7905  if [ -z "${LN+x}" ]; then
7906    # The variable is not set by user, try to locate tool using the code snippet
7907    for ac_prog in ln
7908do
7909  # Extract the first word of "$ac_prog", so it can be a program name with args.
7910set dummy $ac_prog; ac_word=$2
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7912$as_echo_n "checking for $ac_word... " >&6; }
7913if ${ac_cv_path_LN+:} false; then :
7914  $as_echo_n "(cached) " >&6
7915else
7916  case $LN in
7917  [\\/]* | ?:[\\/]*)
7918  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7919  ;;
7920  *)
7921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7922for as_dir in $PATH
7923do
7924  IFS=$as_save_IFS
7925  test -z "$as_dir" && as_dir=.
7926    for ac_exec_ext in '' $ac_executable_extensions; do
7927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7928    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7930    break 2
7931  fi
7932done
7933  done
7934IFS=$as_save_IFS
7935
7936  ;;
7937esac
7938fi
7939LN=$ac_cv_path_LN
7940if test -n "$LN"; then
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7942$as_echo "$LN" >&6; }
7943else
7944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7945$as_echo "no" >&6; }
7946fi
7947
7948
7949  test -n "$LN" && break
7950done
7951
7952  else
7953    # The variable is set, but is it from the command line or the environment?
7954
7955    # Try to remove the string !LN! from our list.
7956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7958      # If it failed, the variable was not from the command line. Ignore it,
7959      # but warn the user (except for BASH, which is always set by the calling BASH).
7960      if test "xLN" != xBASH; then
7961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7962$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7963      fi
7964      # Try to locate tool using the code snippet
7965      for ac_prog in ln
7966do
7967  # Extract the first word of "$ac_prog", so it can be a program name with args.
7968set dummy $ac_prog; ac_word=$2
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7970$as_echo_n "checking for $ac_word... " >&6; }
7971if ${ac_cv_path_LN+:} false; then :
7972  $as_echo_n "(cached) " >&6
7973else
7974  case $LN in
7975  [\\/]* | ?:[\\/]*)
7976  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7977  ;;
7978  *)
7979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7980for as_dir in $PATH
7981do
7982  IFS=$as_save_IFS
7983  test -z "$as_dir" && as_dir=.
7984    for ac_exec_ext in '' $ac_executable_extensions; do
7985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7986    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7988    break 2
7989  fi
7990done
7991  done
7992IFS=$as_save_IFS
7993
7994  ;;
7995esac
7996fi
7997LN=$ac_cv_path_LN
7998if test -n "$LN"; then
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8000$as_echo "$LN" >&6; }
8001else
8002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003$as_echo "no" >&6; }
8004fi
8005
8006
8007  test -n "$LN" && break
8008done
8009
8010    else
8011      # If it succeeded, then it was overridden by the user. We will use it
8012      # for the tool.
8013
8014      # First remove it from the list of overridden variables, so we can test
8015      # for unknown variables in the end.
8016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8017
8018      # Check if we try to supply an empty value
8019      if test "x$LN" = x; then
8020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8021$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8023$as_echo_n "checking for LN... " >&6; }
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8025$as_echo "disabled" >&6; }
8026      else
8027        # Check if the provided tool contains a complete path.
8028        tool_specified="$LN"
8029        tool_basename="${tool_specified##*/}"
8030        if test "x$tool_basename" = "x$tool_specified"; then
8031          # A command without a complete path is provided, search $PATH.
8032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8033$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8034          # Extract the first word of "$tool_basename", so it can be a program name with args.
8035set dummy $tool_basename; ac_word=$2
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037$as_echo_n "checking for $ac_word... " >&6; }
8038if ${ac_cv_path_LN+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  case $LN in
8042  [\\/]* | ?:[\\/]*)
8043  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8044  ;;
8045  *)
8046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049  IFS=$as_save_IFS
8050  test -z "$as_dir" && as_dir=.
8051    for ac_exec_ext in '' $ac_executable_extensions; do
8052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055    break 2
8056  fi
8057done
8058  done
8059IFS=$as_save_IFS
8060
8061  ;;
8062esac
8063fi
8064LN=$ac_cv_path_LN
8065if test -n "$LN"; then
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8067$as_echo "$LN" >&6; }
8068else
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
8071fi
8072
8073
8074          if test "x$LN" = x; then
8075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8076          fi
8077        else
8078          # Otherwise we believe it is a complete path. Use it as it is.
8079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8080$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8082$as_echo_n "checking for LN... " >&6; }
8083          if test ! -x "$tool_specified"; then
8084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8085$as_echo "not found" >&6; }
8086            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8087          fi
8088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8089$as_echo "$tool_specified" >&6; }
8090        fi
8091      fi
8092    fi
8093  fi
8094
8095
8096
8097  if test "x$LN" = x; then
8098    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8099  fi
8100
8101
8102
8103
8104
8105  # Publish this variable in the help.
8106
8107
8108  if [ -z "${LS+x}" ]; then
8109    # The variable is not set by user, try to locate tool using the code snippet
8110    for ac_prog in ls
8111do
8112  # Extract the first word of "$ac_prog", so it can be a program name with args.
8113set dummy $ac_prog; ac_word=$2
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8115$as_echo_n "checking for $ac_word... " >&6; }
8116if ${ac_cv_path_LS+:} false; then :
8117  $as_echo_n "(cached) " >&6
8118else
8119  case $LS in
8120  [\\/]* | ?:[\\/]*)
8121  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8122  ;;
8123  *)
8124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8125for as_dir in $PATH
8126do
8127  IFS=$as_save_IFS
8128  test -z "$as_dir" && as_dir=.
8129    for ac_exec_ext in '' $ac_executable_extensions; do
8130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8131    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8133    break 2
8134  fi
8135done
8136  done
8137IFS=$as_save_IFS
8138
8139  ;;
8140esac
8141fi
8142LS=$ac_cv_path_LS
8143if test -n "$LS"; then
8144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8145$as_echo "$LS" >&6; }
8146else
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148$as_echo "no" >&6; }
8149fi
8150
8151
8152  test -n "$LS" && break
8153done
8154
8155  else
8156    # The variable is set, but is it from the command line or the environment?
8157
8158    # Try to remove the string !LS! from our list.
8159    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8160    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8161      # If it failed, the variable was not from the command line. Ignore it,
8162      # but warn the user (except for BASH, which is always set by the calling BASH).
8163      if test "xLS" != xBASH; then
8164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8165$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8166      fi
8167      # Try to locate tool using the code snippet
8168      for ac_prog in ls
8169do
8170  # Extract the first word of "$ac_prog", so it can be a program name with args.
8171set dummy $ac_prog; ac_word=$2
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8173$as_echo_n "checking for $ac_word... " >&6; }
8174if ${ac_cv_path_LS+:} false; then :
8175  $as_echo_n "(cached) " >&6
8176else
8177  case $LS in
8178  [\\/]* | ?:[\\/]*)
8179  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8180  ;;
8181  *)
8182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8183for as_dir in $PATH
8184do
8185  IFS=$as_save_IFS
8186  test -z "$as_dir" && as_dir=.
8187    for ac_exec_ext in '' $ac_executable_extensions; do
8188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8189    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8191    break 2
8192  fi
8193done
8194  done
8195IFS=$as_save_IFS
8196
8197  ;;
8198esac
8199fi
8200LS=$ac_cv_path_LS
8201if test -n "$LS"; then
8202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8203$as_echo "$LS" >&6; }
8204else
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
8207fi
8208
8209
8210  test -n "$LS" && break
8211done
8212
8213    else
8214      # If it succeeded, then it was overridden by the user. We will use it
8215      # for the tool.
8216
8217      # First remove it from the list of overridden variables, so we can test
8218      # for unknown variables in the end.
8219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8220
8221      # Check if we try to supply an empty value
8222      if test "x$LS" = x; then
8223        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8224$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8226$as_echo_n "checking for LS... " >&6; }
8227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8228$as_echo "disabled" >&6; }
8229      else
8230        # Check if the provided tool contains a complete path.
8231        tool_specified="$LS"
8232        tool_basename="${tool_specified##*/}"
8233        if test "x$tool_basename" = "x$tool_specified"; then
8234          # A command without a complete path is provided, search $PATH.
8235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8236$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8237          # Extract the first word of "$tool_basename", so it can be a program name with args.
8238set dummy $tool_basename; ac_word=$2
8239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8240$as_echo_n "checking for $ac_word... " >&6; }
8241if ${ac_cv_path_LS+:} false; then :
8242  $as_echo_n "(cached) " >&6
8243else
8244  case $LS in
8245  [\\/]* | ?:[\\/]*)
8246  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8247  ;;
8248  *)
8249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8250for as_dir in $PATH
8251do
8252  IFS=$as_save_IFS
8253  test -z "$as_dir" && as_dir=.
8254    for ac_exec_ext in '' $ac_executable_extensions; do
8255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8256    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8258    break 2
8259  fi
8260done
8261  done
8262IFS=$as_save_IFS
8263
8264  ;;
8265esac
8266fi
8267LS=$ac_cv_path_LS
8268if test -n "$LS"; then
8269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8270$as_echo "$LS" >&6; }
8271else
8272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273$as_echo "no" >&6; }
8274fi
8275
8276
8277          if test "x$LS" = x; then
8278            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8279          fi
8280        else
8281          # Otherwise we believe it is a complete path. Use it as it is.
8282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8283$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8284          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8285$as_echo_n "checking for LS... " >&6; }
8286          if test ! -x "$tool_specified"; then
8287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8288$as_echo "not found" >&6; }
8289            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8290          fi
8291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8292$as_echo "$tool_specified" >&6; }
8293        fi
8294      fi
8295    fi
8296  fi
8297
8298
8299
8300  if test "x$LS" = x; then
8301    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8302  fi
8303
8304
8305
8306
8307
8308  # Publish this variable in the help.
8309
8310
8311  if [ -z "${MKDIR+x}" ]; then
8312    # The variable is not set by user, try to locate tool using the code snippet
8313    for ac_prog in mkdir
8314do
8315  # Extract the first word of "$ac_prog", so it can be a program name with args.
8316set dummy $ac_prog; ac_word=$2
8317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8318$as_echo_n "checking for $ac_word... " >&6; }
8319if ${ac_cv_path_MKDIR+:} false; then :
8320  $as_echo_n "(cached) " >&6
8321else
8322  case $MKDIR in
8323  [\\/]* | ?:[\\/]*)
8324  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8325  ;;
8326  *)
8327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330  IFS=$as_save_IFS
8331  test -z "$as_dir" && as_dir=.
8332    for ac_exec_ext in '' $ac_executable_extensions; do
8333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8334    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8336    break 2
8337  fi
8338done
8339  done
8340IFS=$as_save_IFS
8341
8342  ;;
8343esac
8344fi
8345MKDIR=$ac_cv_path_MKDIR
8346if test -n "$MKDIR"; then
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8348$as_echo "$MKDIR" >&6; }
8349else
8350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8351$as_echo "no" >&6; }
8352fi
8353
8354
8355  test -n "$MKDIR" && break
8356done
8357
8358  else
8359    # The variable is set, but is it from the command line or the environment?
8360
8361    # Try to remove the string !MKDIR! from our list.
8362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8364      # If it failed, the variable was not from the command line. Ignore it,
8365      # but warn the user (except for BASH, which is always set by the calling BASH).
8366      if test "xMKDIR" != xBASH; then
8367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8368$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8369      fi
8370      # Try to locate tool using the code snippet
8371      for ac_prog in mkdir
8372do
8373  # Extract the first word of "$ac_prog", so it can be a program name with args.
8374set dummy $ac_prog; ac_word=$2
8375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8376$as_echo_n "checking for $ac_word... " >&6; }
8377if ${ac_cv_path_MKDIR+:} false; then :
8378  $as_echo_n "(cached) " >&6
8379else
8380  case $MKDIR in
8381  [\\/]* | ?:[\\/]*)
8382  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8383  ;;
8384  *)
8385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8386for as_dir in $PATH
8387do
8388  IFS=$as_save_IFS
8389  test -z "$as_dir" && as_dir=.
8390    for ac_exec_ext in '' $ac_executable_extensions; do
8391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8392    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8394    break 2
8395  fi
8396done
8397  done
8398IFS=$as_save_IFS
8399
8400  ;;
8401esac
8402fi
8403MKDIR=$ac_cv_path_MKDIR
8404if test -n "$MKDIR"; then
8405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8406$as_echo "$MKDIR" >&6; }
8407else
8408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409$as_echo "no" >&6; }
8410fi
8411
8412
8413  test -n "$MKDIR" && break
8414done
8415
8416    else
8417      # If it succeeded, then it was overridden by the user. We will use it
8418      # for the tool.
8419
8420      # First remove it from the list of overridden variables, so we can test
8421      # for unknown variables in the end.
8422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8423
8424      # Check if we try to supply an empty value
8425      if test "x$MKDIR" = x; then
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8427$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8429$as_echo_n "checking for MKDIR... " >&6; }
8430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8431$as_echo "disabled" >&6; }
8432      else
8433        # Check if the provided tool contains a complete path.
8434        tool_specified="$MKDIR"
8435        tool_basename="${tool_specified##*/}"
8436        if test "x$tool_basename" = "x$tool_specified"; then
8437          # A command without a complete path is provided, search $PATH.
8438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8439$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8440          # Extract the first word of "$tool_basename", so it can be a program name with args.
8441set dummy $tool_basename; ac_word=$2
8442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8443$as_echo_n "checking for $ac_word... " >&6; }
8444if ${ac_cv_path_MKDIR+:} false; then :
8445  $as_echo_n "(cached) " >&6
8446else
8447  case $MKDIR in
8448  [\\/]* | ?:[\\/]*)
8449  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8450  ;;
8451  *)
8452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8453for as_dir in $PATH
8454do
8455  IFS=$as_save_IFS
8456  test -z "$as_dir" && as_dir=.
8457    for ac_exec_ext in '' $ac_executable_extensions; do
8458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8459    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8461    break 2
8462  fi
8463done
8464  done
8465IFS=$as_save_IFS
8466
8467  ;;
8468esac
8469fi
8470MKDIR=$ac_cv_path_MKDIR
8471if test -n "$MKDIR"; then
8472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8473$as_echo "$MKDIR" >&6; }
8474else
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8476$as_echo "no" >&6; }
8477fi
8478
8479
8480          if test "x$MKDIR" = x; then
8481            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8482          fi
8483        else
8484          # Otherwise we believe it is a complete path. Use it as it is.
8485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8486$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8487          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8488$as_echo_n "checking for MKDIR... " >&6; }
8489          if test ! -x "$tool_specified"; then
8490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8491$as_echo "not found" >&6; }
8492            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8493          fi
8494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8495$as_echo "$tool_specified" >&6; }
8496        fi
8497      fi
8498    fi
8499  fi
8500
8501
8502
8503  if test "x$MKDIR" = x; then
8504    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8505  fi
8506
8507
8508
8509
8510
8511  # Publish this variable in the help.
8512
8513
8514  if [ -z "${MKTEMP+x}" ]; then
8515    # The variable is not set by user, try to locate tool using the code snippet
8516    for ac_prog in mktemp
8517do
8518  # Extract the first word of "$ac_prog", so it can be a program name with args.
8519set dummy $ac_prog; ac_word=$2
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8521$as_echo_n "checking for $ac_word... " >&6; }
8522if ${ac_cv_path_MKTEMP+:} false; then :
8523  $as_echo_n "(cached) " >&6
8524else
8525  case $MKTEMP in
8526  [\\/]* | ?:[\\/]*)
8527  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8528  ;;
8529  *)
8530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531for as_dir in $PATH
8532do
8533  IFS=$as_save_IFS
8534  test -z "$as_dir" && as_dir=.
8535    for ac_exec_ext in '' $ac_executable_extensions; do
8536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8537    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539    break 2
8540  fi
8541done
8542  done
8543IFS=$as_save_IFS
8544
8545  ;;
8546esac
8547fi
8548MKTEMP=$ac_cv_path_MKTEMP
8549if test -n "$MKTEMP"; then
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8551$as_echo "$MKTEMP" >&6; }
8552else
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557
8558  test -n "$MKTEMP" && break
8559done
8560
8561  else
8562    # The variable is set, but is it from the command line or the environment?
8563
8564    # Try to remove the string !MKTEMP! from our list.
8565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8567      # If it failed, the variable was not from the command line. Ignore it,
8568      # but warn the user (except for BASH, which is always set by the calling BASH).
8569      if test "xMKTEMP" != xBASH; then
8570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8571$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8572      fi
8573      # Try to locate tool using the code snippet
8574      for ac_prog in mktemp
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_MKTEMP+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $MKTEMP in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606MKTEMP=$ac_cv_path_MKTEMP
8607if test -n "$MKTEMP"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8609$as_echo "$MKTEMP" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$MKTEMP" && break
8617done
8618
8619    else
8620      # If it succeeded, then it was overridden by the user. We will use it
8621      # for the tool.
8622
8623      # First remove it from the list of overridden variables, so we can test
8624      # for unknown variables in the end.
8625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8626
8627      # Check if we try to supply an empty value
8628      if test "x$MKTEMP" = x; then
8629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8630$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8632$as_echo_n "checking for MKTEMP... " >&6; }
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8634$as_echo "disabled" >&6; }
8635      else
8636        # Check if the provided tool contains a complete path.
8637        tool_specified="$MKTEMP"
8638        tool_basename="${tool_specified##*/}"
8639        if test "x$tool_basename" = "x$tool_specified"; then
8640          # A command without a complete path is provided, search $PATH.
8641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8642$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8643          # Extract the first word of "$tool_basename", so it can be a program name with args.
8644set dummy $tool_basename; ac_word=$2
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8646$as_echo_n "checking for $ac_word... " >&6; }
8647if ${ac_cv_path_MKTEMP+:} false; then :
8648  $as_echo_n "(cached) " >&6
8649else
8650  case $MKTEMP in
8651  [\\/]* | ?:[\\/]*)
8652  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8653  ;;
8654  *)
8655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660    for ac_exec_ext in '' $ac_executable_extensions; do
8661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664    break 2
8665  fi
8666done
8667  done
8668IFS=$as_save_IFS
8669
8670  ;;
8671esac
8672fi
8673MKTEMP=$ac_cv_path_MKTEMP
8674if test -n "$MKTEMP"; then
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8676$as_echo "$MKTEMP" >&6; }
8677else
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679$as_echo "no" >&6; }
8680fi
8681
8682
8683          if test "x$MKTEMP" = x; then
8684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8685          fi
8686        else
8687          # Otherwise we believe it is a complete path. Use it as it is.
8688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8689$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8691$as_echo_n "checking for MKTEMP... " >&6; }
8692          if test ! -x "$tool_specified"; then
8693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8694$as_echo "not found" >&6; }
8695            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8696          fi
8697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8698$as_echo "$tool_specified" >&6; }
8699        fi
8700      fi
8701    fi
8702  fi
8703
8704
8705
8706  if test "x$MKTEMP" = x; then
8707    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8708  fi
8709
8710
8711
8712
8713
8714  # Publish this variable in the help.
8715
8716
8717  if [ -z "${MV+x}" ]; then
8718    # The variable is not set by user, try to locate tool using the code snippet
8719    for ac_prog in mv
8720do
8721  # Extract the first word of "$ac_prog", so it can be a program name with args.
8722set dummy $ac_prog; ac_word=$2
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8724$as_echo_n "checking for $ac_word... " >&6; }
8725if ${ac_cv_path_MV+:} false; then :
8726  $as_echo_n "(cached) " >&6
8727else
8728  case $MV in
8729  [\\/]* | ?:[\\/]*)
8730  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8731  ;;
8732  *)
8733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8734for as_dir in $PATH
8735do
8736  IFS=$as_save_IFS
8737  test -z "$as_dir" && as_dir=.
8738    for ac_exec_ext in '' $ac_executable_extensions; do
8739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8740    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8742    break 2
8743  fi
8744done
8745  done
8746IFS=$as_save_IFS
8747
8748  ;;
8749esac
8750fi
8751MV=$ac_cv_path_MV
8752if test -n "$MV"; then
8753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8754$as_echo "$MV" >&6; }
8755else
8756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8757$as_echo "no" >&6; }
8758fi
8759
8760
8761  test -n "$MV" && break
8762done
8763
8764  else
8765    # The variable is set, but is it from the command line or the environment?
8766
8767    # Try to remove the string !MV! from our list.
8768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8770      # If it failed, the variable was not from the command line. Ignore it,
8771      # but warn the user (except for BASH, which is always set by the calling BASH).
8772      if test "xMV" != xBASH; then
8773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8774$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8775      fi
8776      # Try to locate tool using the code snippet
8777      for ac_prog in mv
8778do
8779  # Extract the first word of "$ac_prog", so it can be a program name with args.
8780set dummy $ac_prog; ac_word=$2
8781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8782$as_echo_n "checking for $ac_word... " >&6; }
8783if ${ac_cv_path_MV+:} false; then :
8784  $as_echo_n "(cached) " >&6
8785else
8786  case $MV in
8787  [\\/]* | ?:[\\/]*)
8788  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8789  ;;
8790  *)
8791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8792for as_dir in $PATH
8793do
8794  IFS=$as_save_IFS
8795  test -z "$as_dir" && as_dir=.
8796    for ac_exec_ext in '' $ac_executable_extensions; do
8797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8798    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8800    break 2
8801  fi
8802done
8803  done
8804IFS=$as_save_IFS
8805
8806  ;;
8807esac
8808fi
8809MV=$ac_cv_path_MV
8810if test -n "$MV"; then
8811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8812$as_echo "$MV" >&6; }
8813else
8814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
8816fi
8817
8818
8819  test -n "$MV" && break
8820done
8821
8822    else
8823      # If it succeeded, then it was overridden by the user. We will use it
8824      # for the tool.
8825
8826      # First remove it from the list of overridden variables, so we can test
8827      # for unknown variables in the end.
8828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8829
8830      # Check if we try to supply an empty value
8831      if test "x$MV" = x; then
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8833$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8835$as_echo_n "checking for MV... " >&6; }
8836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8837$as_echo "disabled" >&6; }
8838      else
8839        # Check if the provided tool contains a complete path.
8840        tool_specified="$MV"
8841        tool_basename="${tool_specified##*/}"
8842        if test "x$tool_basename" = "x$tool_specified"; then
8843          # A command without a complete path is provided, search $PATH.
8844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8845$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8846          # Extract the first word of "$tool_basename", so it can be a program name with args.
8847set dummy $tool_basename; ac_word=$2
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8849$as_echo_n "checking for $ac_word... " >&6; }
8850if ${ac_cv_path_MV+:} false; then :
8851  $as_echo_n "(cached) " >&6
8852else
8853  case $MV in
8854  [\\/]* | ?:[\\/]*)
8855  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8856  ;;
8857  *)
8858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8859for as_dir in $PATH
8860do
8861  IFS=$as_save_IFS
8862  test -z "$as_dir" && as_dir=.
8863    for ac_exec_ext in '' $ac_executable_extensions; do
8864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8865    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8867    break 2
8868  fi
8869done
8870  done
8871IFS=$as_save_IFS
8872
8873  ;;
8874esac
8875fi
8876MV=$ac_cv_path_MV
8877if test -n "$MV"; then
8878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8879$as_echo "$MV" >&6; }
8880else
8881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8882$as_echo "no" >&6; }
8883fi
8884
8885
8886          if test "x$MV" = x; then
8887            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8888          fi
8889        else
8890          # Otherwise we believe it is a complete path. Use it as it is.
8891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8892$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8893          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8894$as_echo_n "checking for MV... " >&6; }
8895          if test ! -x "$tool_specified"; then
8896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8897$as_echo "not found" >&6; }
8898            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8899          fi
8900          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8901$as_echo "$tool_specified" >&6; }
8902        fi
8903      fi
8904    fi
8905  fi
8906
8907
8908
8909  if test "x$MV" = x; then
8910    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8911  fi
8912
8913
8914
8915
8916
8917  # Publish this variable in the help.
8918
8919
8920  if [ -z "${NAWK+x}" ]; then
8921    # The variable is not set by user, try to locate tool using the code snippet
8922    for ac_prog in nawk gawk awk
8923do
8924  # Extract the first word of "$ac_prog", so it can be a program name with args.
8925set dummy $ac_prog; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_NAWK+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $NAWK in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954NAWK=$ac_cv_path_NAWK
8955if test -n "$NAWK"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8957$as_echo "$NAWK" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964  test -n "$NAWK" && break
8965done
8966
8967  else
8968    # The variable is set, but is it from the command line or the environment?
8969
8970    # Try to remove the string !NAWK! from our list.
8971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8973      # If it failed, the variable was not from the command line. Ignore it,
8974      # but warn the user (except for BASH, which is always set by the calling BASH).
8975      if test "xNAWK" != xBASH; then
8976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8977$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8978      fi
8979      # Try to locate tool using the code snippet
8980      for ac_prog in nawk gawk awk
8981do
8982  # Extract the first word of "$ac_prog", so it can be a program name with args.
8983set dummy $ac_prog; ac_word=$2
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
8986if ${ac_cv_path_NAWK+:} false; then :
8987  $as_echo_n "(cached) " >&6
8988else
8989  case $NAWK in
8990  [\\/]* | ?:[\\/]*)
8991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8992  ;;
8993  *)
8994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009  ;;
9010esac
9011fi
9012NAWK=$ac_cv_path_NAWK
9013if test -n "$NAWK"; then
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9015$as_echo "$NAWK" >&6; }
9016else
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019fi
9020
9021
9022  test -n "$NAWK" && break
9023done
9024
9025    else
9026      # If it succeeded, then it was overridden by the user. We will use it
9027      # for the tool.
9028
9029      # First remove it from the list of overridden variables, so we can test
9030      # for unknown variables in the end.
9031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9032
9033      # Check if we try to supply an empty value
9034      if test "x$NAWK" = x; then
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9036$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9038$as_echo_n "checking for NAWK... " >&6; }
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9040$as_echo "disabled" >&6; }
9041      else
9042        # Check if the provided tool contains a complete path.
9043        tool_specified="$NAWK"
9044        tool_basename="${tool_specified##*/}"
9045        if test "x$tool_basename" = "x$tool_specified"; then
9046          # A command without a complete path is provided, search $PATH.
9047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9048$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9049          # Extract the first word of "$tool_basename", so it can be a program name with args.
9050set dummy $tool_basename; ac_word=$2
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9052$as_echo_n "checking for $ac_word... " >&6; }
9053if ${ac_cv_path_NAWK+:} false; then :
9054  $as_echo_n "(cached) " >&6
9055else
9056  case $NAWK in
9057  [\\/]* | ?:[\\/]*)
9058  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9059  ;;
9060  *)
9061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9062for as_dir in $PATH
9063do
9064  IFS=$as_save_IFS
9065  test -z "$as_dir" && as_dir=.
9066    for ac_exec_ext in '' $ac_executable_extensions; do
9067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9068    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9070    break 2
9071  fi
9072done
9073  done
9074IFS=$as_save_IFS
9075
9076  ;;
9077esac
9078fi
9079NAWK=$ac_cv_path_NAWK
9080if test -n "$NAWK"; then
9081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9082$as_echo "$NAWK" >&6; }
9083else
9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9085$as_echo "no" >&6; }
9086fi
9087
9088
9089          if test "x$NAWK" = x; then
9090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9091          fi
9092        else
9093          # Otherwise we believe it is a complete path. Use it as it is.
9094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9095$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9097$as_echo_n "checking for NAWK... " >&6; }
9098          if test ! -x "$tool_specified"; then
9099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9100$as_echo "not found" >&6; }
9101            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9102          fi
9103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9104$as_echo "$tool_specified" >&6; }
9105        fi
9106      fi
9107    fi
9108  fi
9109
9110
9111
9112  if test "x$NAWK" = x; then
9113    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9114  fi
9115
9116
9117
9118
9119
9120  # Publish this variable in the help.
9121
9122
9123  if [ -z "${PRINTF+x}" ]; then
9124    # The variable is not set by user, try to locate tool using the code snippet
9125    for ac_prog in printf
9126do
9127  # Extract the first word of "$ac_prog", so it can be a program name with args.
9128set dummy $ac_prog; ac_word=$2
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130$as_echo_n "checking for $ac_word... " >&6; }
9131if ${ac_cv_path_PRINTF+:} false; then :
9132  $as_echo_n "(cached) " >&6
9133else
9134  case $PRINTF in
9135  [\\/]* | ?:[\\/]*)
9136  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9137  ;;
9138  *)
9139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142  IFS=$as_save_IFS
9143  test -z "$as_dir" && as_dir=.
9144    for ac_exec_ext in '' $ac_executable_extensions; do
9145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9146    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9148    break 2
9149  fi
9150done
9151  done
9152IFS=$as_save_IFS
9153
9154  ;;
9155esac
9156fi
9157PRINTF=$ac_cv_path_PRINTF
9158if test -n "$PRINTF"; then
9159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9160$as_echo "$PRINTF" >&6; }
9161else
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
9164fi
9165
9166
9167  test -n "$PRINTF" && break
9168done
9169
9170  else
9171    # The variable is set, but is it from the command line or the environment?
9172
9173    # Try to remove the string !PRINTF! from our list.
9174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9176      # If it failed, the variable was not from the command line. Ignore it,
9177      # but warn the user (except for BASH, which is always set by the calling BASH).
9178      if test "xPRINTF" != xBASH; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9180$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9181      fi
9182      # Try to locate tool using the code snippet
9183      for ac_prog in printf
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_PRINTF+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $PRINTF in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215PRINTF=$ac_cv_path_PRINTF
9216if test -n "$PRINTF"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9218$as_echo "$PRINTF" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$PRINTF" && break
9226done
9227
9228    else
9229      # If it succeeded, then it was overridden by the user. We will use it
9230      # for the tool.
9231
9232      # First remove it from the list of overridden variables, so we can test
9233      # for unknown variables in the end.
9234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9235
9236      # Check if we try to supply an empty value
9237      if test "x$PRINTF" = x; then
9238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9239$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9241$as_echo_n "checking for PRINTF... " >&6; }
9242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9243$as_echo "disabled" >&6; }
9244      else
9245        # Check if the provided tool contains a complete path.
9246        tool_specified="$PRINTF"
9247        tool_basename="${tool_specified##*/}"
9248        if test "x$tool_basename" = "x$tool_specified"; then
9249          # A command without a complete path is provided, search $PATH.
9250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9251$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9252          # Extract the first word of "$tool_basename", so it can be a program name with args.
9253set dummy $tool_basename; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_PRINTF+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $PRINTF in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282PRINTF=$ac_cv_path_PRINTF
9283if test -n "$PRINTF"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9285$as_echo "$PRINTF" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292          if test "x$PRINTF" = x; then
9293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9294          fi
9295        else
9296          # Otherwise we believe it is a complete path. Use it as it is.
9297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9298$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9300$as_echo_n "checking for PRINTF... " >&6; }
9301          if test ! -x "$tool_specified"; then
9302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9303$as_echo "not found" >&6; }
9304            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9305          fi
9306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9307$as_echo "$tool_specified" >&6; }
9308        fi
9309      fi
9310    fi
9311  fi
9312
9313
9314
9315  if test "x$PRINTF" = x; then
9316    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9317  fi
9318
9319
9320
9321
9322
9323  # Publish this variable in the help.
9324
9325
9326  if [ -z "${RM+x}" ]; then
9327    # The variable is not set by user, try to locate tool using the code snippet
9328    for ac_prog in rm
9329do
9330  # Extract the first word of "$ac_prog", so it can be a program name with args.
9331set dummy $ac_prog; ac_word=$2
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9333$as_echo_n "checking for $ac_word... " >&6; }
9334if ${ac_cv_path_RM+:} false; then :
9335  $as_echo_n "(cached) " >&6
9336else
9337  case $RM in
9338  [\\/]* | ?:[\\/]*)
9339  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9340  ;;
9341  *)
9342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9343for as_dir in $PATH
9344do
9345  IFS=$as_save_IFS
9346  test -z "$as_dir" && as_dir=.
9347    for ac_exec_ext in '' $ac_executable_extensions; do
9348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9349    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9351    break 2
9352  fi
9353done
9354  done
9355IFS=$as_save_IFS
9356
9357  ;;
9358esac
9359fi
9360RM=$ac_cv_path_RM
9361if test -n "$RM"; then
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9363$as_echo "$RM" >&6; }
9364else
9365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
9367fi
9368
9369
9370  test -n "$RM" && break
9371done
9372
9373  else
9374    # The variable is set, but is it from the command line or the environment?
9375
9376    # Try to remove the string !RM! from our list.
9377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9379      # If it failed, the variable was not from the command line. Ignore it,
9380      # but warn the user (except for BASH, which is always set by the calling BASH).
9381      if test "xRM" != xBASH; then
9382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9383$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9384      fi
9385      # Try to locate tool using the code snippet
9386      for ac_prog in rm
9387do
9388  # Extract the first word of "$ac_prog", so it can be a program name with args.
9389set dummy $ac_prog; ac_word=$2
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9391$as_echo_n "checking for $ac_word... " >&6; }
9392if ${ac_cv_path_RM+:} false; then :
9393  $as_echo_n "(cached) " >&6
9394else
9395  case $RM in
9396  [\\/]* | ?:[\\/]*)
9397  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9398  ;;
9399  *)
9400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9401for as_dir in $PATH
9402do
9403  IFS=$as_save_IFS
9404  test -z "$as_dir" && as_dir=.
9405    for ac_exec_ext in '' $ac_executable_extensions; do
9406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9407    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9409    break 2
9410  fi
9411done
9412  done
9413IFS=$as_save_IFS
9414
9415  ;;
9416esac
9417fi
9418RM=$ac_cv_path_RM
9419if test -n "$RM"; then
9420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9421$as_echo "$RM" >&6; }
9422else
9423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9424$as_echo "no" >&6; }
9425fi
9426
9427
9428  test -n "$RM" && break
9429done
9430
9431    else
9432      # If it succeeded, then it was overridden by the user. We will use it
9433      # for the tool.
9434
9435      # First remove it from the list of overridden variables, so we can test
9436      # for unknown variables in the end.
9437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9438
9439      # Check if we try to supply an empty value
9440      if test "x$RM" = x; then
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9442$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9444$as_echo_n "checking for RM... " >&6; }
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9446$as_echo "disabled" >&6; }
9447      else
9448        # Check if the provided tool contains a complete path.
9449        tool_specified="$RM"
9450        tool_basename="${tool_specified##*/}"
9451        if test "x$tool_basename" = "x$tool_specified"; then
9452          # A command without a complete path is provided, search $PATH.
9453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9454$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9455          # Extract the first word of "$tool_basename", so it can be a program name with args.
9456set dummy $tool_basename; ac_word=$2
9457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9458$as_echo_n "checking for $ac_word... " >&6; }
9459if ${ac_cv_path_RM+:} false; then :
9460  $as_echo_n "(cached) " >&6
9461else
9462  case $RM in
9463  [\\/]* | ?:[\\/]*)
9464  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9465  ;;
9466  *)
9467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9468for as_dir in $PATH
9469do
9470  IFS=$as_save_IFS
9471  test -z "$as_dir" && as_dir=.
9472    for ac_exec_ext in '' $ac_executable_extensions; do
9473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9474    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9476    break 2
9477  fi
9478done
9479  done
9480IFS=$as_save_IFS
9481
9482  ;;
9483esac
9484fi
9485RM=$ac_cv_path_RM
9486if test -n "$RM"; then
9487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9488$as_echo "$RM" >&6; }
9489else
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9491$as_echo "no" >&6; }
9492fi
9493
9494
9495          if test "x$RM" = x; then
9496            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9497          fi
9498        else
9499          # Otherwise we believe it is a complete path. Use it as it is.
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9501$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9502          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9503$as_echo_n "checking for RM... " >&6; }
9504          if test ! -x "$tool_specified"; then
9505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9506$as_echo "not found" >&6; }
9507            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9508          fi
9509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9510$as_echo "$tool_specified" >&6; }
9511        fi
9512      fi
9513    fi
9514  fi
9515
9516
9517
9518  if test "x$RM" = x; then
9519    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9520  fi
9521
9522
9523
9524
9525
9526  # Publish this variable in the help.
9527
9528
9529  if [ -z "${SH+x}" ]; then
9530    # The variable is not set by user, try to locate tool using the code snippet
9531    for ac_prog in sh
9532do
9533  # Extract the first word of "$ac_prog", so it can be a program name with args.
9534set dummy $ac_prog; ac_word=$2
9535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9536$as_echo_n "checking for $ac_word... " >&6; }
9537if ${ac_cv_path_SH+:} false; then :
9538  $as_echo_n "(cached) " >&6
9539else
9540  case $SH in
9541  [\\/]* | ?:[\\/]*)
9542  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9543  ;;
9544  *)
9545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9546for as_dir in $PATH
9547do
9548  IFS=$as_save_IFS
9549  test -z "$as_dir" && as_dir=.
9550    for ac_exec_ext in '' $ac_executable_extensions; do
9551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9552    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9554    break 2
9555  fi
9556done
9557  done
9558IFS=$as_save_IFS
9559
9560  ;;
9561esac
9562fi
9563SH=$ac_cv_path_SH
9564if test -n "$SH"; then
9565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9566$as_echo "$SH" >&6; }
9567else
9568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
9570fi
9571
9572
9573  test -n "$SH" && break
9574done
9575
9576  else
9577    # The variable is set, but is it from the command line or the environment?
9578
9579    # Try to remove the string !SH! from our list.
9580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9582      # If it failed, the variable was not from the command line. Ignore it,
9583      # but warn the user (except for BASH, which is always set by the calling BASH).
9584      if test "xSH" != xBASH; then
9585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9586$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9587      fi
9588      # Try to locate tool using the code snippet
9589      for ac_prog in sh
9590do
9591  # Extract the first word of "$ac_prog", so it can be a program name with args.
9592set dummy $ac_prog; ac_word=$2
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594$as_echo_n "checking for $ac_word... " >&6; }
9595if ${ac_cv_path_SH+:} false; then :
9596  $as_echo_n "(cached) " >&6
9597else
9598  case $SH in
9599  [\\/]* | ?:[\\/]*)
9600  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9601  ;;
9602  *)
9603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604for as_dir in $PATH
9605do
9606  IFS=$as_save_IFS
9607  test -z "$as_dir" && as_dir=.
9608    for ac_exec_ext in '' $ac_executable_extensions; do
9609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9610    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612    break 2
9613  fi
9614done
9615  done
9616IFS=$as_save_IFS
9617
9618  ;;
9619esac
9620fi
9621SH=$ac_cv_path_SH
9622if test -n "$SH"; then
9623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9624$as_echo "$SH" >&6; }
9625else
9626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627$as_echo "no" >&6; }
9628fi
9629
9630
9631  test -n "$SH" && break
9632done
9633
9634    else
9635      # If it succeeded, then it was overridden by the user. We will use it
9636      # for the tool.
9637
9638      # First remove it from the list of overridden variables, so we can test
9639      # for unknown variables in the end.
9640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9641
9642      # Check if we try to supply an empty value
9643      if test "x$SH" = x; then
9644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9645$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9647$as_echo_n "checking for SH... " >&6; }
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9649$as_echo "disabled" >&6; }
9650      else
9651        # Check if the provided tool contains a complete path.
9652        tool_specified="$SH"
9653        tool_basename="${tool_specified##*/}"
9654        if test "x$tool_basename" = "x$tool_specified"; then
9655          # A command without a complete path is provided, search $PATH.
9656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9657$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9658          # Extract the first word of "$tool_basename", so it can be a program name with args.
9659set dummy $tool_basename; ac_word=$2
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9661$as_echo_n "checking for $ac_word... " >&6; }
9662if ${ac_cv_path_SH+:} false; then :
9663  $as_echo_n "(cached) " >&6
9664else
9665  case $SH in
9666  [\\/]* | ?:[\\/]*)
9667  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9668  ;;
9669  *)
9670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9671for as_dir in $PATH
9672do
9673  IFS=$as_save_IFS
9674  test -z "$as_dir" && as_dir=.
9675    for ac_exec_ext in '' $ac_executable_extensions; do
9676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9677    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9679    break 2
9680  fi
9681done
9682  done
9683IFS=$as_save_IFS
9684
9685  ;;
9686esac
9687fi
9688SH=$ac_cv_path_SH
9689if test -n "$SH"; then
9690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9691$as_echo "$SH" >&6; }
9692else
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
9695fi
9696
9697
9698          if test "x$SH" = x; then
9699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9700          fi
9701        else
9702          # Otherwise we believe it is a complete path. Use it as it is.
9703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9704$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9706$as_echo_n "checking for SH... " >&6; }
9707          if test ! -x "$tool_specified"; then
9708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9709$as_echo "not found" >&6; }
9710            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9711          fi
9712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9713$as_echo "$tool_specified" >&6; }
9714        fi
9715      fi
9716    fi
9717  fi
9718
9719
9720
9721  if test "x$SH" = x; then
9722    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9723  fi
9724
9725
9726
9727
9728
9729  # Publish this variable in the help.
9730
9731
9732  if [ -z "${SORT+x}" ]; then
9733    # The variable is not set by user, try to locate tool using the code snippet
9734    for ac_prog in sort
9735do
9736  # Extract the first word of "$ac_prog", so it can be a program name with args.
9737set dummy $ac_prog; ac_word=$2
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9739$as_echo_n "checking for $ac_word... " >&6; }
9740if ${ac_cv_path_SORT+:} false; then :
9741  $as_echo_n "(cached) " >&6
9742else
9743  case $SORT in
9744  [\\/]* | ?:[\\/]*)
9745  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9746  ;;
9747  *)
9748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9749for as_dir in $PATH
9750do
9751  IFS=$as_save_IFS
9752  test -z "$as_dir" && as_dir=.
9753    for ac_exec_ext in '' $ac_executable_extensions; do
9754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9755    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9757    break 2
9758  fi
9759done
9760  done
9761IFS=$as_save_IFS
9762
9763  ;;
9764esac
9765fi
9766SORT=$ac_cv_path_SORT
9767if test -n "$SORT"; then
9768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9769$as_echo "$SORT" >&6; }
9770else
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
9773fi
9774
9775
9776  test -n "$SORT" && break
9777done
9778
9779  else
9780    # The variable is set, but is it from the command line or the environment?
9781
9782    # Try to remove the string !SORT! from our list.
9783    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9784    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9785      # If it failed, the variable was not from the command line. Ignore it,
9786      # but warn the user (except for BASH, which is always set by the calling BASH).
9787      if test "xSORT" != xBASH; then
9788        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9789$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9790      fi
9791      # Try to locate tool using the code snippet
9792      for ac_prog in sort
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_SORT+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $SORT in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824SORT=$ac_cv_path_SORT
9825if test -n "$SORT"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9827$as_echo "$SORT" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$SORT" && break
9835done
9836
9837    else
9838      # If it succeeded, then it was overridden by the user. We will use it
9839      # for the tool.
9840
9841      # First remove it from the list of overridden variables, so we can test
9842      # for unknown variables in the end.
9843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9844
9845      # Check if we try to supply an empty value
9846      if test "x$SORT" = x; then
9847        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
9848$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9850$as_echo_n "checking for SORT... " >&6; }
9851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9852$as_echo "disabled" >&6; }
9853      else
9854        # Check if the provided tool contains a complete path.
9855        tool_specified="$SORT"
9856        tool_basename="${tool_specified##*/}"
9857        if test "x$tool_basename" = "x$tool_specified"; then
9858          # A command without a complete path is provided, search $PATH.
9859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9860$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9861          # Extract the first word of "$tool_basename", so it can be a program name with args.
9862set dummy $tool_basename; ac_word=$2
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864$as_echo_n "checking for $ac_word... " >&6; }
9865if ${ac_cv_path_SORT+:} false; then :
9866  $as_echo_n "(cached) " >&6
9867else
9868  case $SORT in
9869  [\\/]* | ?:[\\/]*)
9870  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9871  ;;
9872  *)
9873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874for as_dir in $PATH
9875do
9876  IFS=$as_save_IFS
9877  test -z "$as_dir" && as_dir=.
9878    for ac_exec_ext in '' $ac_executable_extensions; do
9879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882    break 2
9883  fi
9884done
9885  done
9886IFS=$as_save_IFS
9887
9888  ;;
9889esac
9890fi
9891SORT=$ac_cv_path_SORT
9892if test -n "$SORT"; then
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9894$as_echo "$SORT" >&6; }
9895else
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
9898fi
9899
9900
9901          if test "x$SORT" = x; then
9902            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9903          fi
9904        else
9905          # Otherwise we believe it is a complete path. Use it as it is.
9906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9907$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9909$as_echo_n "checking for SORT... " >&6; }
9910          if test ! -x "$tool_specified"; then
9911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9912$as_echo "not found" >&6; }
9913            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9914          fi
9915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9916$as_echo "$tool_specified" >&6; }
9917        fi
9918      fi
9919    fi
9920  fi
9921
9922
9923
9924  if test "x$SORT" = x; then
9925    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9926  fi
9927
9928
9929
9930
9931
9932  # Publish this variable in the help.
9933
9934
9935  if [ -z "${TAIL+x}" ]; then
9936    # The variable is not set by user, try to locate tool using the code snippet
9937    for ac_prog in tail
9938do
9939  # Extract the first word of "$ac_prog", so it can be a program name with args.
9940set dummy $ac_prog; ac_word=$2
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942$as_echo_n "checking for $ac_word... " >&6; }
9943if ${ac_cv_path_TAIL+:} false; then :
9944  $as_echo_n "(cached) " >&6
9945else
9946  case $TAIL in
9947  [\\/]* | ?:[\\/]*)
9948  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9949  ;;
9950  *)
9951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9952for as_dir in $PATH
9953do
9954  IFS=$as_save_IFS
9955  test -z "$as_dir" && as_dir=.
9956    for ac_exec_ext in '' $ac_executable_extensions; do
9957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9958    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9960    break 2
9961  fi
9962done
9963  done
9964IFS=$as_save_IFS
9965
9966  ;;
9967esac
9968fi
9969TAIL=$ac_cv_path_TAIL
9970if test -n "$TAIL"; then
9971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9972$as_echo "$TAIL" >&6; }
9973else
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975$as_echo "no" >&6; }
9976fi
9977
9978
9979  test -n "$TAIL" && break
9980done
9981
9982  else
9983    # The variable is set, but is it from the command line or the environment?
9984
9985    # Try to remove the string !TAIL! from our list.
9986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9988      # If it failed, the variable was not from the command line. Ignore it,
9989      # but warn the user (except for BASH, which is always set by the calling BASH).
9990      if test "xTAIL" != xBASH; then
9991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9992$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9993      fi
9994      # Try to locate tool using the code snippet
9995      for ac_prog in tail
9996do
9997  # Extract the first word of "$ac_prog", so it can be a program name with args.
9998set dummy $ac_prog; ac_word=$2
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10000$as_echo_n "checking for $ac_word... " >&6; }
10001if ${ac_cv_path_TAIL+:} false; then :
10002  $as_echo_n "(cached) " >&6
10003else
10004  case $TAIL in
10005  [\\/]* | ?:[\\/]*)
10006  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10007  ;;
10008  *)
10009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10010for as_dir in $PATH
10011do
10012  IFS=$as_save_IFS
10013  test -z "$as_dir" && as_dir=.
10014    for ac_exec_ext in '' $ac_executable_extensions; do
10015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10016    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10018    break 2
10019  fi
10020done
10021  done
10022IFS=$as_save_IFS
10023
10024  ;;
10025esac
10026fi
10027TAIL=$ac_cv_path_TAIL
10028if test -n "$TAIL"; then
10029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10030$as_echo "$TAIL" >&6; }
10031else
10032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033$as_echo "no" >&6; }
10034fi
10035
10036
10037  test -n "$TAIL" && break
10038done
10039
10040    else
10041      # If it succeeded, then it was overridden by the user. We will use it
10042      # for the tool.
10043
10044      # First remove it from the list of overridden variables, so we can test
10045      # for unknown variables in the end.
10046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10047
10048      # Check if we try to supply an empty value
10049      if test "x$TAIL" = x; then
10050        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10051$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10053$as_echo_n "checking for TAIL... " >&6; }
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10055$as_echo "disabled" >&6; }
10056      else
10057        # Check if the provided tool contains a complete path.
10058        tool_specified="$TAIL"
10059        tool_basename="${tool_specified##*/}"
10060        if test "x$tool_basename" = "x$tool_specified"; then
10061          # A command without a complete path is provided, search $PATH.
10062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10063$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10064          # Extract the first word of "$tool_basename", so it can be a program name with args.
10065set dummy $tool_basename; ac_word=$2
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10067$as_echo_n "checking for $ac_word... " >&6; }
10068if ${ac_cv_path_TAIL+:} false; then :
10069  $as_echo_n "(cached) " >&6
10070else
10071  case $TAIL in
10072  [\\/]* | ?:[\\/]*)
10073  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10074  ;;
10075  *)
10076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10077for as_dir in $PATH
10078do
10079  IFS=$as_save_IFS
10080  test -z "$as_dir" && as_dir=.
10081    for ac_exec_ext in '' $ac_executable_extensions; do
10082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10083    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10085    break 2
10086  fi
10087done
10088  done
10089IFS=$as_save_IFS
10090
10091  ;;
10092esac
10093fi
10094TAIL=$ac_cv_path_TAIL
10095if test -n "$TAIL"; then
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10097$as_echo "$TAIL" >&6; }
10098else
10099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
10101fi
10102
10103
10104          if test "x$TAIL" = x; then
10105            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10106          fi
10107        else
10108          # Otherwise we believe it is a complete path. Use it as it is.
10109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10110$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10111          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10112$as_echo_n "checking for TAIL... " >&6; }
10113          if test ! -x "$tool_specified"; then
10114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10115$as_echo "not found" >&6; }
10116            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10117          fi
10118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10119$as_echo "$tool_specified" >&6; }
10120        fi
10121      fi
10122    fi
10123  fi
10124
10125
10126
10127  if test "x$TAIL" = x; then
10128    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10129  fi
10130
10131
10132
10133
10134
10135  # Publish this variable in the help.
10136
10137
10138  if [ -z "${TAR+x}" ]; then
10139    # The variable is not set by user, try to locate tool using the code snippet
10140    for ac_prog in tar
10141do
10142  # Extract the first word of "$ac_prog", so it can be a program name with args.
10143set dummy $ac_prog; ac_word=$2
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145$as_echo_n "checking for $ac_word... " >&6; }
10146if ${ac_cv_path_TAR+:} false; then :
10147  $as_echo_n "(cached) " >&6
10148else
10149  case $TAR in
10150  [\\/]* | ?:[\\/]*)
10151  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10152  ;;
10153  *)
10154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155for as_dir in $PATH
10156do
10157  IFS=$as_save_IFS
10158  test -z "$as_dir" && as_dir=.
10159    for ac_exec_ext in '' $ac_executable_extensions; do
10160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163    break 2
10164  fi
10165done
10166  done
10167IFS=$as_save_IFS
10168
10169  ;;
10170esac
10171fi
10172TAR=$ac_cv_path_TAR
10173if test -n "$TAR"; then
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10175$as_echo "$TAR" >&6; }
10176else
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
10179fi
10180
10181
10182  test -n "$TAR" && break
10183done
10184
10185  else
10186    # The variable is set, but is it from the command line or the environment?
10187
10188    # Try to remove the string !TAR! from our list.
10189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10191      # If it failed, the variable was not from the command line. Ignore it,
10192      # but warn the user (except for BASH, which is always set by the calling BASH).
10193      if test "xTAR" != xBASH; then
10194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10195$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10196      fi
10197      # Try to locate tool using the code snippet
10198      for ac_prog in tar
10199do
10200  # Extract the first word of "$ac_prog", so it can be a program name with args.
10201set dummy $ac_prog; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_TAR+:} false; then :
10205  $as_echo_n "(cached) " >&6
10206else
10207  case $TAR in
10208  [\\/]* | ?:[\\/]*)
10209  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10210  ;;
10211  *)
10212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215  IFS=$as_save_IFS
10216  test -z "$as_dir" && as_dir=.
10217    for ac_exec_ext in '' $ac_executable_extensions; do
10218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221    break 2
10222  fi
10223done
10224  done
10225IFS=$as_save_IFS
10226
10227  ;;
10228esac
10229fi
10230TAR=$ac_cv_path_TAR
10231if test -n "$TAR"; then
10232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10233$as_echo "$TAR" >&6; }
10234else
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240  test -n "$TAR" && break
10241done
10242
10243    else
10244      # If it succeeded, then it was overridden by the user. We will use it
10245      # for the tool.
10246
10247      # First remove it from the list of overridden variables, so we can test
10248      # for unknown variables in the end.
10249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10250
10251      # Check if we try to supply an empty value
10252      if test "x$TAR" = x; then
10253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10254$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10256$as_echo_n "checking for TAR... " >&6; }
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10258$as_echo "disabled" >&6; }
10259      else
10260        # Check if the provided tool contains a complete path.
10261        tool_specified="$TAR"
10262        tool_basename="${tool_specified##*/}"
10263        if test "x$tool_basename" = "x$tool_specified"; then
10264          # A command without a complete path is provided, search $PATH.
10265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10266$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10267          # Extract the first word of "$tool_basename", so it can be a program name with args.
10268set dummy $tool_basename; ac_word=$2
10269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10270$as_echo_n "checking for $ac_word... " >&6; }
10271if ${ac_cv_path_TAR+:} false; then :
10272  $as_echo_n "(cached) " >&6
10273else
10274  case $TAR in
10275  [\\/]* | ?:[\\/]*)
10276  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10277  ;;
10278  *)
10279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10280for as_dir in $PATH
10281do
10282  IFS=$as_save_IFS
10283  test -z "$as_dir" && as_dir=.
10284    for ac_exec_ext in '' $ac_executable_extensions; do
10285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10286    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10288    break 2
10289  fi
10290done
10291  done
10292IFS=$as_save_IFS
10293
10294  ;;
10295esac
10296fi
10297TAR=$ac_cv_path_TAR
10298if test -n "$TAR"; then
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10300$as_echo "$TAR" >&6; }
10301else
10302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10303$as_echo "no" >&6; }
10304fi
10305
10306
10307          if test "x$TAR" = x; then
10308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10309          fi
10310        else
10311          # Otherwise we believe it is a complete path. Use it as it is.
10312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10313$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10315$as_echo_n "checking for TAR... " >&6; }
10316          if test ! -x "$tool_specified"; then
10317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10318$as_echo "not found" >&6; }
10319            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10320          fi
10321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10322$as_echo "$tool_specified" >&6; }
10323        fi
10324      fi
10325    fi
10326  fi
10327
10328
10329
10330  if test "x$TAR" = x; then
10331    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10332  fi
10333
10334
10335
10336
10337
10338  # Publish this variable in the help.
10339
10340
10341  if [ -z "${TEE+x}" ]; then
10342    # The variable is not set by user, try to locate tool using the code snippet
10343    for ac_prog in tee
10344do
10345  # Extract the first word of "$ac_prog", so it can be a program name with args.
10346set dummy $ac_prog; ac_word=$2
10347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348$as_echo_n "checking for $ac_word... " >&6; }
10349if ${ac_cv_path_TEE+:} false; then :
10350  $as_echo_n "(cached) " >&6
10351else
10352  case $TEE in
10353  [\\/]* | ?:[\\/]*)
10354  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10355  ;;
10356  *)
10357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358for as_dir in $PATH
10359do
10360  IFS=$as_save_IFS
10361  test -z "$as_dir" && as_dir=.
10362    for ac_exec_ext in '' $ac_executable_extensions; do
10363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366    break 2
10367  fi
10368done
10369  done
10370IFS=$as_save_IFS
10371
10372  ;;
10373esac
10374fi
10375TEE=$ac_cv_path_TEE
10376if test -n "$TEE"; then
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10378$as_echo "$TEE" >&6; }
10379else
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382fi
10383
10384
10385  test -n "$TEE" && break
10386done
10387
10388  else
10389    # The variable is set, but is it from the command line or the environment?
10390
10391    # Try to remove the string !TEE! from our list.
10392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10394      # If it failed, the variable was not from the command line. Ignore it,
10395      # but warn the user (except for BASH, which is always set by the calling BASH).
10396      if test "xTEE" != xBASH; then
10397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10398$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10399      fi
10400      # Try to locate tool using the code snippet
10401      for ac_prog in tee
10402do
10403  # Extract the first word of "$ac_prog", so it can be a program name with args.
10404set dummy $ac_prog; ac_word=$2
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10406$as_echo_n "checking for $ac_word... " >&6; }
10407if ${ac_cv_path_TEE+:} false; then :
10408  $as_echo_n "(cached) " >&6
10409else
10410  case $TEE in
10411  [\\/]* | ?:[\\/]*)
10412  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10413  ;;
10414  *)
10415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10416for as_dir in $PATH
10417do
10418  IFS=$as_save_IFS
10419  test -z "$as_dir" && as_dir=.
10420    for ac_exec_ext in '' $ac_executable_extensions; do
10421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10422    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10424    break 2
10425  fi
10426done
10427  done
10428IFS=$as_save_IFS
10429
10430  ;;
10431esac
10432fi
10433TEE=$ac_cv_path_TEE
10434if test -n "$TEE"; then
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10436$as_echo "$TEE" >&6; }
10437else
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440fi
10441
10442
10443  test -n "$TEE" && break
10444done
10445
10446    else
10447      # If it succeeded, then it was overridden by the user. We will use it
10448      # for the tool.
10449
10450      # First remove it from the list of overridden variables, so we can test
10451      # for unknown variables in the end.
10452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10453
10454      # Check if we try to supply an empty value
10455      if test "x$TEE" = x; then
10456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10457$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10459$as_echo_n "checking for TEE... " >&6; }
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10461$as_echo "disabled" >&6; }
10462      else
10463        # Check if the provided tool contains a complete path.
10464        tool_specified="$TEE"
10465        tool_basename="${tool_specified##*/}"
10466        if test "x$tool_basename" = "x$tool_specified"; then
10467          # A command without a complete path is provided, search $PATH.
10468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10469$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10470          # Extract the first word of "$tool_basename", so it can be a program name with args.
10471set dummy $tool_basename; ac_word=$2
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473$as_echo_n "checking for $ac_word... " >&6; }
10474if ${ac_cv_path_TEE+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $TEE in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10480  ;;
10481  *)
10482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485  IFS=$as_save_IFS
10486  test -z "$as_dir" && as_dir=.
10487    for ac_exec_ext in '' $ac_executable_extensions; do
10488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491    break 2
10492  fi
10493done
10494  done
10495IFS=$as_save_IFS
10496
10497  ;;
10498esac
10499fi
10500TEE=$ac_cv_path_TEE
10501if test -n "$TEE"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10503$as_echo "$TEE" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510          if test "x$TEE" = x; then
10511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10512          fi
10513        else
10514          # Otherwise we believe it is a complete path. Use it as it is.
10515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10516$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10518$as_echo_n "checking for TEE... " >&6; }
10519          if test ! -x "$tool_specified"; then
10520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10521$as_echo "not found" >&6; }
10522            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10523          fi
10524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10525$as_echo "$tool_specified" >&6; }
10526        fi
10527      fi
10528    fi
10529  fi
10530
10531
10532
10533  if test "x$TEE" = x; then
10534    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10535  fi
10536
10537
10538
10539
10540
10541  # Publish this variable in the help.
10542
10543
10544  if [ -z "${TOUCH+x}" ]; then
10545    # The variable is not set by user, try to locate tool using the code snippet
10546    for ac_prog in touch
10547do
10548  # Extract the first word of "$ac_prog", so it can be a program name with args.
10549set dummy $ac_prog; ac_word=$2
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10551$as_echo_n "checking for $ac_word... " >&6; }
10552if ${ac_cv_path_TOUCH+:} false; then :
10553  $as_echo_n "(cached) " >&6
10554else
10555  case $TOUCH in
10556  [\\/]* | ?:[\\/]*)
10557  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10558  ;;
10559  *)
10560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10561for as_dir in $PATH
10562do
10563  IFS=$as_save_IFS
10564  test -z "$as_dir" && as_dir=.
10565    for ac_exec_ext in '' $ac_executable_extensions; do
10566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10567    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10569    break 2
10570  fi
10571done
10572  done
10573IFS=$as_save_IFS
10574
10575  ;;
10576esac
10577fi
10578TOUCH=$ac_cv_path_TOUCH
10579if test -n "$TOUCH"; then
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10581$as_echo "$TOUCH" >&6; }
10582else
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
10585fi
10586
10587
10588  test -n "$TOUCH" && break
10589done
10590
10591  else
10592    # The variable is set, but is it from the command line or the environment?
10593
10594    # Try to remove the string !TOUCH! from our list.
10595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10597      # If it failed, the variable was not from the command line. Ignore it,
10598      # but warn the user (except for BASH, which is always set by the calling BASH).
10599      if test "xTOUCH" != xBASH; then
10600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10601$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10602      fi
10603      # Try to locate tool using the code snippet
10604      for ac_prog in touch
10605do
10606  # Extract the first word of "$ac_prog", so it can be a program name with args.
10607set dummy $ac_prog; ac_word=$2
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10609$as_echo_n "checking for $ac_word... " >&6; }
10610if ${ac_cv_path_TOUCH+:} false; then :
10611  $as_echo_n "(cached) " >&6
10612else
10613  case $TOUCH in
10614  [\\/]* | ?:[\\/]*)
10615  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10616  ;;
10617  *)
10618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10619for as_dir in $PATH
10620do
10621  IFS=$as_save_IFS
10622  test -z "$as_dir" && as_dir=.
10623    for ac_exec_ext in '' $ac_executable_extensions; do
10624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10625    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10627    break 2
10628  fi
10629done
10630  done
10631IFS=$as_save_IFS
10632
10633  ;;
10634esac
10635fi
10636TOUCH=$ac_cv_path_TOUCH
10637if test -n "$TOUCH"; then
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10639$as_echo "$TOUCH" >&6; }
10640else
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643fi
10644
10645
10646  test -n "$TOUCH" && break
10647done
10648
10649    else
10650      # If it succeeded, then it was overridden by the user. We will use it
10651      # for the tool.
10652
10653      # First remove it from the list of overridden variables, so we can test
10654      # for unknown variables in the end.
10655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10656
10657      # Check if we try to supply an empty value
10658      if test "x$TOUCH" = x; then
10659        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10660$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10661        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10662$as_echo_n "checking for TOUCH... " >&6; }
10663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10664$as_echo "disabled" >&6; }
10665      else
10666        # Check if the provided tool contains a complete path.
10667        tool_specified="$TOUCH"
10668        tool_basename="${tool_specified##*/}"
10669        if test "x$tool_basename" = "x$tool_specified"; then
10670          # A command without a complete path is provided, search $PATH.
10671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10672$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10673          # Extract the first word of "$tool_basename", so it can be a program name with args.
10674set dummy $tool_basename; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_TOUCH+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $TOUCH in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703TOUCH=$ac_cv_path_TOUCH
10704if test -n "$TOUCH"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10706$as_echo "$TOUCH" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713          if test "x$TOUCH" = x; then
10714            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10715          fi
10716        else
10717          # Otherwise we believe it is a complete path. Use it as it is.
10718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10719$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10720          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10721$as_echo_n "checking for TOUCH... " >&6; }
10722          if test ! -x "$tool_specified"; then
10723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10724$as_echo "not found" >&6; }
10725            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10726          fi
10727          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10728$as_echo "$tool_specified" >&6; }
10729        fi
10730      fi
10731    fi
10732  fi
10733
10734
10735
10736  if test "x$TOUCH" = x; then
10737    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10738  fi
10739
10740
10741
10742
10743
10744  # Publish this variable in the help.
10745
10746
10747  if [ -z "${TR+x}" ]; then
10748    # The variable is not set by user, try to locate tool using the code snippet
10749    for ac_prog in tr
10750do
10751  # Extract the first word of "$ac_prog", so it can be a program name with args.
10752set dummy $ac_prog; ac_word=$2
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754$as_echo_n "checking for $ac_word... " >&6; }
10755if ${ac_cv_path_TR+:} false; then :
10756  $as_echo_n "(cached) " >&6
10757else
10758  case $TR in
10759  [\\/]* | ?:[\\/]*)
10760  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10761  ;;
10762  *)
10763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10764for as_dir in $PATH
10765do
10766  IFS=$as_save_IFS
10767  test -z "$as_dir" && as_dir=.
10768    for ac_exec_ext in '' $ac_executable_extensions; do
10769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10770    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10772    break 2
10773  fi
10774done
10775  done
10776IFS=$as_save_IFS
10777
10778  ;;
10779esac
10780fi
10781TR=$ac_cv_path_TR
10782if test -n "$TR"; then
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10784$as_echo "$TR" >&6; }
10785else
10786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
10788fi
10789
10790
10791  test -n "$TR" && break
10792done
10793
10794  else
10795    # The variable is set, but is it from the command line or the environment?
10796
10797    # Try to remove the string !TR! from our list.
10798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10800      # If it failed, the variable was not from the command line. Ignore it,
10801      # but warn the user (except for BASH, which is always set by the calling BASH).
10802      if test "xTR" != xBASH; then
10803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10804$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10805      fi
10806      # Try to locate tool using the code snippet
10807      for ac_prog in tr
10808do
10809  # Extract the first word of "$ac_prog", so it can be a program name with args.
10810set dummy $ac_prog; ac_word=$2
10811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10812$as_echo_n "checking for $ac_word... " >&6; }
10813if ${ac_cv_path_TR+:} false; then :
10814  $as_echo_n "(cached) " >&6
10815else
10816  case $TR in
10817  [\\/]* | ?:[\\/]*)
10818  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10819  ;;
10820  *)
10821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10822for as_dir in $PATH
10823do
10824  IFS=$as_save_IFS
10825  test -z "$as_dir" && as_dir=.
10826    for ac_exec_ext in '' $ac_executable_extensions; do
10827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10828    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10830    break 2
10831  fi
10832done
10833  done
10834IFS=$as_save_IFS
10835
10836  ;;
10837esac
10838fi
10839TR=$ac_cv_path_TR
10840if test -n "$TR"; then
10841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10842$as_echo "$TR" >&6; }
10843else
10844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10845$as_echo "no" >&6; }
10846fi
10847
10848
10849  test -n "$TR" && break
10850done
10851
10852    else
10853      # If it succeeded, then it was overridden by the user. We will use it
10854      # for the tool.
10855
10856      # First remove it from the list of overridden variables, so we can test
10857      # for unknown variables in the end.
10858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10859
10860      # Check if we try to supply an empty value
10861      if test "x$TR" = x; then
10862        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
10863$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
10864        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10865$as_echo_n "checking for TR... " >&6; }
10866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10867$as_echo "disabled" >&6; }
10868      else
10869        # Check if the provided tool contains a complete path.
10870        tool_specified="$TR"
10871        tool_basename="${tool_specified##*/}"
10872        if test "x$tool_basename" = "x$tool_specified"; then
10873          # A command without a complete path is provided, search $PATH.
10874          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10875$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10876          # Extract the first word of "$tool_basename", so it can be a program name with args.
10877set dummy $tool_basename; ac_word=$2
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879$as_echo_n "checking for $ac_word... " >&6; }
10880if ${ac_cv_path_TR+:} false; then :
10881  $as_echo_n "(cached) " >&6
10882else
10883  case $TR in
10884  [\\/]* | ?:[\\/]*)
10885  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10886  ;;
10887  *)
10888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903  ;;
10904esac
10905fi
10906TR=$ac_cv_path_TR
10907if test -n "$TR"; then
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10909$as_echo "$TR" >&6; }
10910else
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913fi
10914
10915
10916          if test "x$TR" = x; then
10917            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10918          fi
10919        else
10920          # Otherwise we believe it is a complete path. Use it as it is.
10921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10922$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10923          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10924$as_echo_n "checking for TR... " >&6; }
10925          if test ! -x "$tool_specified"; then
10926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10927$as_echo "not found" >&6; }
10928            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10929          fi
10930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10931$as_echo "$tool_specified" >&6; }
10932        fi
10933      fi
10934    fi
10935  fi
10936
10937
10938
10939  if test "x$TR" = x; then
10940    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10941  fi
10942
10943
10944
10945
10946
10947  # Publish this variable in the help.
10948
10949
10950  if [ -z "${UNAME+x}" ]; then
10951    # The variable is not set by user, try to locate tool using the code snippet
10952    for ac_prog in uname
10953do
10954  # Extract the first word of "$ac_prog", so it can be a program name with args.
10955set dummy $ac_prog; ac_word=$2
10956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10957$as_echo_n "checking for $ac_word... " >&6; }
10958if ${ac_cv_path_UNAME+:} false; then :
10959  $as_echo_n "(cached) " >&6
10960else
10961  case $UNAME in
10962  [\\/]* | ?:[\\/]*)
10963  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10964  ;;
10965  *)
10966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10967for as_dir in $PATH
10968do
10969  IFS=$as_save_IFS
10970  test -z "$as_dir" && as_dir=.
10971    for ac_exec_ext in '' $ac_executable_extensions; do
10972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10973    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10975    break 2
10976  fi
10977done
10978  done
10979IFS=$as_save_IFS
10980
10981  ;;
10982esac
10983fi
10984UNAME=$ac_cv_path_UNAME
10985if test -n "$UNAME"; then
10986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10987$as_echo "$UNAME" >&6; }
10988else
10989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
10991fi
10992
10993
10994  test -n "$UNAME" && break
10995done
10996
10997  else
10998    # The variable is set, but is it from the command line or the environment?
10999
11000    # Try to remove the string !UNAME! from our list.
11001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11003      # If it failed, the variable was not from the command line. Ignore it,
11004      # but warn the user (except for BASH, which is always set by the calling BASH).
11005      if test "xUNAME" != xBASH; then
11006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11007$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11008      fi
11009      # Try to locate tool using the code snippet
11010      for ac_prog in uname
11011do
11012  # Extract the first word of "$ac_prog", so it can be a program name with args.
11013set dummy $ac_prog; ac_word=$2
11014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11015$as_echo_n "checking for $ac_word... " >&6; }
11016if ${ac_cv_path_UNAME+:} false; then :
11017  $as_echo_n "(cached) " >&6
11018else
11019  case $UNAME in
11020  [\\/]* | ?:[\\/]*)
11021  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11022  ;;
11023  *)
11024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11025for as_dir in $PATH
11026do
11027  IFS=$as_save_IFS
11028  test -z "$as_dir" && as_dir=.
11029    for ac_exec_ext in '' $ac_executable_extensions; do
11030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11031    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11033    break 2
11034  fi
11035done
11036  done
11037IFS=$as_save_IFS
11038
11039  ;;
11040esac
11041fi
11042UNAME=$ac_cv_path_UNAME
11043if test -n "$UNAME"; then
11044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11045$as_echo "$UNAME" >&6; }
11046else
11047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048$as_echo "no" >&6; }
11049fi
11050
11051
11052  test -n "$UNAME" && break
11053done
11054
11055    else
11056      # If it succeeded, then it was overridden by the user. We will use it
11057      # for the tool.
11058
11059      # First remove it from the list of overridden variables, so we can test
11060      # for unknown variables in the end.
11061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11062
11063      # Check if we try to supply an empty value
11064      if test "x$UNAME" = x; then
11065        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11066$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11068$as_echo_n "checking for UNAME... " >&6; }
11069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11070$as_echo "disabled" >&6; }
11071      else
11072        # Check if the provided tool contains a complete path.
11073        tool_specified="$UNAME"
11074        tool_basename="${tool_specified##*/}"
11075        if test "x$tool_basename" = "x$tool_specified"; then
11076          # A command without a complete path is provided, search $PATH.
11077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11078$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11079          # Extract the first word of "$tool_basename", so it can be a program name with args.
11080set dummy $tool_basename; ac_word=$2
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11082$as_echo_n "checking for $ac_word... " >&6; }
11083if ${ac_cv_path_UNAME+:} false; then :
11084  $as_echo_n "(cached) " >&6
11085else
11086  case $UNAME in
11087  [\\/]* | ?:[\\/]*)
11088  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11089  ;;
11090  *)
11091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092for as_dir in $PATH
11093do
11094  IFS=$as_save_IFS
11095  test -z "$as_dir" && as_dir=.
11096    for ac_exec_ext in '' $ac_executable_extensions; do
11097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11098    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11100    break 2
11101  fi
11102done
11103  done
11104IFS=$as_save_IFS
11105
11106  ;;
11107esac
11108fi
11109UNAME=$ac_cv_path_UNAME
11110if test -n "$UNAME"; then
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11112$as_echo "$UNAME" >&6; }
11113else
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11115$as_echo "no" >&6; }
11116fi
11117
11118
11119          if test "x$UNAME" = x; then
11120            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11121          fi
11122        else
11123          # Otherwise we believe it is a complete path. Use it as it is.
11124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11125$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11126          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11127$as_echo_n "checking for UNAME... " >&6; }
11128          if test ! -x "$tool_specified"; then
11129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11130$as_echo "not found" >&6; }
11131            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11132          fi
11133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11134$as_echo "$tool_specified" >&6; }
11135        fi
11136      fi
11137    fi
11138  fi
11139
11140
11141
11142  if test "x$UNAME" = x; then
11143    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11144  fi
11145
11146
11147
11148
11149
11150  # Publish this variable in the help.
11151
11152
11153  if [ -z "${UNIQ+x}" ]; then
11154    # The variable is not set by user, try to locate tool using the code snippet
11155    for ac_prog in uniq
11156do
11157  # Extract the first word of "$ac_prog", so it can be a program name with args.
11158set dummy $ac_prog; ac_word=$2
11159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11160$as_echo_n "checking for $ac_word... " >&6; }
11161if ${ac_cv_path_UNIQ+:} false; then :
11162  $as_echo_n "(cached) " >&6
11163else
11164  case $UNIQ in
11165  [\\/]* | ?:[\\/]*)
11166  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11167  ;;
11168  *)
11169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11170for as_dir in $PATH
11171do
11172  IFS=$as_save_IFS
11173  test -z "$as_dir" && as_dir=.
11174    for ac_exec_ext in '' $ac_executable_extensions; do
11175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11176    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11178    break 2
11179  fi
11180done
11181  done
11182IFS=$as_save_IFS
11183
11184  ;;
11185esac
11186fi
11187UNIQ=$ac_cv_path_UNIQ
11188if test -n "$UNIQ"; then
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11190$as_echo "$UNIQ" >&6; }
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195
11196
11197  test -n "$UNIQ" && break
11198done
11199
11200  else
11201    # The variable is set, but is it from the command line or the environment?
11202
11203    # Try to remove the string !UNIQ! from our list.
11204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11206      # If it failed, the variable was not from the command line. Ignore it,
11207      # but warn the user (except for BASH, which is always set by the calling BASH).
11208      if test "xUNIQ" != xBASH; then
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11210$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11211      fi
11212      # Try to locate tool using the code snippet
11213      for ac_prog in uniq
11214do
11215  # Extract the first word of "$ac_prog", so it can be a program name with args.
11216set dummy $ac_prog; ac_word=$2
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11218$as_echo_n "checking for $ac_word... " >&6; }
11219if ${ac_cv_path_UNIQ+:} false; then :
11220  $as_echo_n "(cached) " >&6
11221else
11222  case $UNIQ in
11223  [\\/]* | ?:[\\/]*)
11224  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11225  ;;
11226  *)
11227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11228for as_dir in $PATH
11229do
11230  IFS=$as_save_IFS
11231  test -z "$as_dir" && as_dir=.
11232    for ac_exec_ext in '' $ac_executable_extensions; do
11233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11234    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11236    break 2
11237  fi
11238done
11239  done
11240IFS=$as_save_IFS
11241
11242  ;;
11243esac
11244fi
11245UNIQ=$ac_cv_path_UNIQ
11246if test -n "$UNIQ"; then
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11248$as_echo "$UNIQ" >&6; }
11249else
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252fi
11253
11254
11255  test -n "$UNIQ" && break
11256done
11257
11258    else
11259      # If it succeeded, then it was overridden by the user. We will use it
11260      # for the tool.
11261
11262      # First remove it from the list of overridden variables, so we can test
11263      # for unknown variables in the end.
11264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11265
11266      # Check if we try to supply an empty value
11267      if test "x$UNIQ" = x; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11269$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11271$as_echo_n "checking for UNIQ... " >&6; }
11272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11273$as_echo "disabled" >&6; }
11274      else
11275        # Check if the provided tool contains a complete path.
11276        tool_specified="$UNIQ"
11277        tool_basename="${tool_specified##*/}"
11278        if test "x$tool_basename" = "x$tool_specified"; then
11279          # A command without a complete path is provided, search $PATH.
11280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11281$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11282          # Extract the first word of "$tool_basename", so it can be a program name with args.
11283set dummy $tool_basename; ac_word=$2
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285$as_echo_n "checking for $ac_word... " >&6; }
11286if ${ac_cv_path_UNIQ+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  case $UNIQ in
11290  [\\/]* | ?:[\\/]*)
11291  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11292  ;;
11293  *)
11294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295for as_dir in $PATH
11296do
11297  IFS=$as_save_IFS
11298  test -z "$as_dir" && as_dir=.
11299    for ac_exec_ext in '' $ac_executable_extensions; do
11300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303    break 2
11304  fi
11305done
11306  done
11307IFS=$as_save_IFS
11308
11309  ;;
11310esac
11311fi
11312UNIQ=$ac_cv_path_UNIQ
11313if test -n "$UNIQ"; then
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11315$as_echo "$UNIQ" >&6; }
11316else
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319fi
11320
11321
11322          if test "x$UNIQ" = x; then
11323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11324          fi
11325        else
11326          # Otherwise we believe it is a complete path. Use it as it is.
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11328$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11330$as_echo_n "checking for UNIQ... " >&6; }
11331          if test ! -x "$tool_specified"; then
11332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11333$as_echo "not found" >&6; }
11334            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11335          fi
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11337$as_echo "$tool_specified" >&6; }
11338        fi
11339      fi
11340    fi
11341  fi
11342
11343
11344
11345  if test "x$UNIQ" = x; then
11346    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11347  fi
11348
11349
11350
11351
11352
11353  # Publish this variable in the help.
11354
11355
11356  if [ -z "${WC+x}" ]; then
11357    # The variable is not set by user, try to locate tool using the code snippet
11358    for ac_prog in wc
11359do
11360  # Extract the first word of "$ac_prog", so it can be a program name with args.
11361set dummy $ac_prog; ac_word=$2
11362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11363$as_echo_n "checking for $ac_word... " >&6; }
11364if ${ac_cv_path_WC+:} false; then :
11365  $as_echo_n "(cached) " >&6
11366else
11367  case $WC in
11368  [\\/]* | ?:[\\/]*)
11369  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11370  ;;
11371  *)
11372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11373for as_dir in $PATH
11374do
11375  IFS=$as_save_IFS
11376  test -z "$as_dir" && as_dir=.
11377    for ac_exec_ext in '' $ac_executable_extensions; do
11378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11379    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11381    break 2
11382  fi
11383done
11384  done
11385IFS=$as_save_IFS
11386
11387  ;;
11388esac
11389fi
11390WC=$ac_cv_path_WC
11391if test -n "$WC"; then
11392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11393$as_echo "$WC" >&6; }
11394else
11395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
11397fi
11398
11399
11400  test -n "$WC" && break
11401done
11402
11403  else
11404    # The variable is set, but is it from the command line or the environment?
11405
11406    # Try to remove the string !WC! from our list.
11407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11409      # If it failed, the variable was not from the command line. Ignore it,
11410      # but warn the user (except for BASH, which is always set by the calling BASH).
11411      if test "xWC" != xBASH; then
11412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11413$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11414      fi
11415      # Try to locate tool using the code snippet
11416      for ac_prog in wc
11417do
11418  # Extract the first word of "$ac_prog", so it can be a program name with args.
11419set dummy $ac_prog; ac_word=$2
11420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11421$as_echo_n "checking for $ac_word... " >&6; }
11422if ${ac_cv_path_WC+:} false; then :
11423  $as_echo_n "(cached) " >&6
11424else
11425  case $WC in
11426  [\\/]* | ?:[\\/]*)
11427  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11428  ;;
11429  *)
11430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11431for as_dir in $PATH
11432do
11433  IFS=$as_save_IFS
11434  test -z "$as_dir" && as_dir=.
11435    for ac_exec_ext in '' $ac_executable_extensions; do
11436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11437    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11439    break 2
11440  fi
11441done
11442  done
11443IFS=$as_save_IFS
11444
11445  ;;
11446esac
11447fi
11448WC=$ac_cv_path_WC
11449if test -n "$WC"; then
11450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11451$as_echo "$WC" >&6; }
11452else
11453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11454$as_echo "no" >&6; }
11455fi
11456
11457
11458  test -n "$WC" && break
11459done
11460
11461    else
11462      # If it succeeded, then it was overridden by the user. We will use it
11463      # for the tool.
11464
11465      # First remove it from the list of overridden variables, so we can test
11466      # for unknown variables in the end.
11467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11468
11469      # Check if we try to supply an empty value
11470      if test "x$WC" = x; then
11471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11472$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11474$as_echo_n "checking for WC... " >&6; }
11475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11476$as_echo "disabled" >&6; }
11477      else
11478        # Check if the provided tool contains a complete path.
11479        tool_specified="$WC"
11480        tool_basename="${tool_specified##*/}"
11481        if test "x$tool_basename" = "x$tool_specified"; then
11482          # A command without a complete path is provided, search $PATH.
11483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11484$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11485          # Extract the first word of "$tool_basename", so it can be a program name with args.
11486set dummy $tool_basename; ac_word=$2
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11488$as_echo_n "checking for $ac_word... " >&6; }
11489if ${ac_cv_path_WC+:} false; then :
11490  $as_echo_n "(cached) " >&6
11491else
11492  case $WC in
11493  [\\/]* | ?:[\\/]*)
11494  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11495  ;;
11496  *)
11497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11498for as_dir in $PATH
11499do
11500  IFS=$as_save_IFS
11501  test -z "$as_dir" && as_dir=.
11502    for ac_exec_ext in '' $ac_executable_extensions; do
11503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11504    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11506    break 2
11507  fi
11508done
11509  done
11510IFS=$as_save_IFS
11511
11512  ;;
11513esac
11514fi
11515WC=$ac_cv_path_WC
11516if test -n "$WC"; then
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11518$as_echo "$WC" >&6; }
11519else
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11521$as_echo "no" >&6; }
11522fi
11523
11524
11525          if test "x$WC" = x; then
11526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11527          fi
11528        else
11529          # Otherwise we believe it is a complete path. Use it as it is.
11530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11531$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11533$as_echo_n "checking for WC... " >&6; }
11534          if test ! -x "$tool_specified"; then
11535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11536$as_echo "not found" >&6; }
11537            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11538          fi
11539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11540$as_echo "$tool_specified" >&6; }
11541        fi
11542      fi
11543    fi
11544  fi
11545
11546
11547
11548  if test "x$WC" = x; then
11549    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11550  fi
11551
11552
11553
11554
11555
11556  # Publish this variable in the help.
11557
11558
11559  if [ -z "${WHICH+x}" ]; then
11560    # The variable is not set by user, try to locate tool using the code snippet
11561    for ac_prog in which
11562do
11563  # Extract the first word of "$ac_prog", so it can be a program name with args.
11564set dummy $ac_prog; ac_word=$2
11565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11566$as_echo_n "checking for $ac_word... " >&6; }
11567if ${ac_cv_path_WHICH+:} false; then :
11568  $as_echo_n "(cached) " >&6
11569else
11570  case $WHICH in
11571  [\\/]* | ?:[\\/]*)
11572  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11573  ;;
11574  *)
11575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11576for as_dir in $PATH
11577do
11578  IFS=$as_save_IFS
11579  test -z "$as_dir" && as_dir=.
11580    for ac_exec_ext in '' $ac_executable_extensions; do
11581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11582    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11584    break 2
11585  fi
11586done
11587  done
11588IFS=$as_save_IFS
11589
11590  ;;
11591esac
11592fi
11593WHICH=$ac_cv_path_WHICH
11594if test -n "$WHICH"; then
11595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11596$as_echo "$WHICH" >&6; }
11597else
11598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
11600fi
11601
11602
11603  test -n "$WHICH" && break
11604done
11605
11606  else
11607    # The variable is set, but is it from the command line or the environment?
11608
11609    # Try to remove the string !WHICH! from our list.
11610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11612      # If it failed, the variable was not from the command line. Ignore it,
11613      # but warn the user (except for BASH, which is always set by the calling BASH).
11614      if test "xWHICH" != xBASH; then
11615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11616$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11617      fi
11618      # Try to locate tool using the code snippet
11619      for ac_prog in which
11620do
11621  # Extract the first word of "$ac_prog", so it can be a program name with args.
11622set dummy $ac_prog; ac_word=$2
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11624$as_echo_n "checking for $ac_word... " >&6; }
11625if ${ac_cv_path_WHICH+:} false; then :
11626  $as_echo_n "(cached) " >&6
11627else
11628  case $WHICH in
11629  [\\/]* | ?:[\\/]*)
11630  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11631  ;;
11632  *)
11633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636  IFS=$as_save_IFS
11637  test -z "$as_dir" && as_dir=.
11638    for ac_exec_ext in '' $ac_executable_extensions; do
11639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11640    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11642    break 2
11643  fi
11644done
11645  done
11646IFS=$as_save_IFS
11647
11648  ;;
11649esac
11650fi
11651WHICH=$ac_cv_path_WHICH
11652if test -n "$WHICH"; then
11653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11654$as_echo "$WHICH" >&6; }
11655else
11656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
11658fi
11659
11660
11661  test -n "$WHICH" && break
11662done
11663
11664    else
11665      # If it succeeded, then it was overridden by the user. We will use it
11666      # for the tool.
11667
11668      # First remove it from the list of overridden variables, so we can test
11669      # for unknown variables in the end.
11670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11671
11672      # Check if we try to supply an empty value
11673      if test "x$WHICH" = x; then
11674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11675$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11677$as_echo_n "checking for WHICH... " >&6; }
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11679$as_echo "disabled" >&6; }
11680      else
11681        # Check if the provided tool contains a complete path.
11682        tool_specified="$WHICH"
11683        tool_basename="${tool_specified##*/}"
11684        if test "x$tool_basename" = "x$tool_specified"; then
11685          # A command without a complete path is provided, search $PATH.
11686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11687$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11688          # Extract the first word of "$tool_basename", so it can be a program name with args.
11689set dummy $tool_basename; ac_word=$2
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11691$as_echo_n "checking for $ac_word... " >&6; }
11692if ${ac_cv_path_WHICH+:} false; then :
11693  $as_echo_n "(cached) " >&6
11694else
11695  case $WHICH in
11696  [\\/]* | ?:[\\/]*)
11697  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11698  ;;
11699  *)
11700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11701for as_dir in $PATH
11702do
11703  IFS=$as_save_IFS
11704  test -z "$as_dir" && as_dir=.
11705    for ac_exec_ext in '' $ac_executable_extensions; do
11706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11707    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11709    break 2
11710  fi
11711done
11712  done
11713IFS=$as_save_IFS
11714
11715  ;;
11716esac
11717fi
11718WHICH=$ac_cv_path_WHICH
11719if test -n "$WHICH"; then
11720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11721$as_echo "$WHICH" >&6; }
11722else
11723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11724$as_echo "no" >&6; }
11725fi
11726
11727
11728          if test "x$WHICH" = x; then
11729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11730          fi
11731        else
11732          # Otherwise we believe it is a complete path. Use it as it is.
11733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11734$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11736$as_echo_n "checking for WHICH... " >&6; }
11737          if test ! -x "$tool_specified"; then
11738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11739$as_echo "not found" >&6; }
11740            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11741          fi
11742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11743$as_echo "$tool_specified" >&6; }
11744        fi
11745      fi
11746    fi
11747  fi
11748
11749
11750
11751  if test "x$WHICH" = x; then
11752    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11753  fi
11754
11755
11756
11757
11758
11759  # Publish this variable in the help.
11760
11761
11762  if [ -z "${XARGS+x}" ]; then
11763    # The variable is not set by user, try to locate tool using the code snippet
11764    for ac_prog in xargs
11765do
11766  # Extract the first word of "$ac_prog", so it can be a program name with args.
11767set dummy $ac_prog; ac_word=$2
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11769$as_echo_n "checking for $ac_word... " >&6; }
11770if ${ac_cv_path_XARGS+:} false; then :
11771  $as_echo_n "(cached) " >&6
11772else
11773  case $XARGS in
11774  [\\/]* | ?:[\\/]*)
11775  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11776  ;;
11777  *)
11778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11779for as_dir in $PATH
11780do
11781  IFS=$as_save_IFS
11782  test -z "$as_dir" && as_dir=.
11783    for ac_exec_ext in '' $ac_executable_extensions; do
11784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11785    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11787    break 2
11788  fi
11789done
11790  done
11791IFS=$as_save_IFS
11792
11793  ;;
11794esac
11795fi
11796XARGS=$ac_cv_path_XARGS
11797if test -n "$XARGS"; then
11798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11799$as_echo "$XARGS" >&6; }
11800else
11801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11802$as_echo "no" >&6; }
11803fi
11804
11805
11806  test -n "$XARGS" && break
11807done
11808
11809  else
11810    # The variable is set, but is it from the command line or the environment?
11811
11812    # Try to remove the string !XARGS! from our list.
11813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11815      # If it failed, the variable was not from the command line. Ignore it,
11816      # but warn the user (except for BASH, which is always set by the calling BASH).
11817      if test "xXARGS" != xBASH; then
11818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11819$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11820      fi
11821      # Try to locate tool using the code snippet
11822      for ac_prog in xargs
11823do
11824  # Extract the first word of "$ac_prog", so it can be a program name with args.
11825set dummy $ac_prog; ac_word=$2
11826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11827$as_echo_n "checking for $ac_word... " >&6; }
11828if ${ac_cv_path_XARGS+:} false; then :
11829  $as_echo_n "(cached) " >&6
11830else
11831  case $XARGS in
11832  [\\/]* | ?:[\\/]*)
11833  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11834  ;;
11835  *)
11836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11837for as_dir in $PATH
11838do
11839  IFS=$as_save_IFS
11840  test -z "$as_dir" && as_dir=.
11841    for ac_exec_ext in '' $ac_executable_extensions; do
11842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11843    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11845    break 2
11846  fi
11847done
11848  done
11849IFS=$as_save_IFS
11850
11851  ;;
11852esac
11853fi
11854XARGS=$ac_cv_path_XARGS
11855if test -n "$XARGS"; then
11856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11857$as_echo "$XARGS" >&6; }
11858else
11859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11860$as_echo "no" >&6; }
11861fi
11862
11863
11864  test -n "$XARGS" && break
11865done
11866
11867    else
11868      # If it succeeded, then it was overridden by the user. We will use it
11869      # for the tool.
11870
11871      # First remove it from the list of overridden variables, so we can test
11872      # for unknown variables in the end.
11873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11874
11875      # Check if we try to supply an empty value
11876      if test "x$XARGS" = x; then
11877        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
11878$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
11879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11880$as_echo_n "checking for XARGS... " >&6; }
11881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11882$as_echo "disabled" >&6; }
11883      else
11884        # Check if the provided tool contains a complete path.
11885        tool_specified="$XARGS"
11886        tool_basename="${tool_specified##*/}"
11887        if test "x$tool_basename" = "x$tool_specified"; then
11888          # A command without a complete path is provided, search $PATH.
11889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11890$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11891          # Extract the first word of "$tool_basename", so it can be a program name with args.
11892set dummy $tool_basename; ac_word=$2
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11894$as_echo_n "checking for $ac_word... " >&6; }
11895if ${ac_cv_path_XARGS+:} false; then :
11896  $as_echo_n "(cached) " >&6
11897else
11898  case $XARGS in
11899  [\\/]* | ?:[\\/]*)
11900  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11901  ;;
11902  *)
11903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11904for as_dir in $PATH
11905do
11906  IFS=$as_save_IFS
11907  test -z "$as_dir" && as_dir=.
11908    for ac_exec_ext in '' $ac_executable_extensions; do
11909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11910    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11912    break 2
11913  fi
11914done
11915  done
11916IFS=$as_save_IFS
11917
11918  ;;
11919esac
11920fi
11921XARGS=$ac_cv_path_XARGS
11922if test -n "$XARGS"; then
11923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11924$as_echo "$XARGS" >&6; }
11925else
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927$as_echo "no" >&6; }
11928fi
11929
11930
11931          if test "x$XARGS" = x; then
11932            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11933          fi
11934        else
11935          # Otherwise we believe it is a complete path. Use it as it is.
11936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11937$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11938          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11939$as_echo_n "checking for XARGS... " >&6; }
11940          if test ! -x "$tool_specified"; then
11941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11942$as_echo "not found" >&6; }
11943            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11944          fi
11945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11946$as_echo "$tool_specified" >&6; }
11947        fi
11948      fi
11949    fi
11950  fi
11951
11952
11953
11954  if test "x$XARGS" = x; then
11955    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11956  fi
11957
11958
11959
11960  # Then required tools that require some special treatment.
11961
11962
11963  # Publish this variable in the help.
11964
11965
11966  if [ -z "${AWK+x}" ]; then
11967    # The variable is not set by user, try to locate tool using the code snippet
11968    for ac_prog in gawk mawk nawk awk
11969do
11970  # Extract the first word of "$ac_prog", so it can be a program name with args.
11971set dummy $ac_prog; ac_word=$2
11972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973$as_echo_n "checking for $ac_word... " >&6; }
11974if ${ac_cv_prog_AWK+:} false; then :
11975  $as_echo_n "(cached) " >&6
11976else
11977  if test -n "$AWK"; then
11978  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11979else
11980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11981for as_dir in $PATH
11982do
11983  IFS=$as_save_IFS
11984  test -z "$as_dir" && as_dir=.
11985    for ac_exec_ext in '' $ac_executable_extensions; do
11986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11987    ac_cv_prog_AWK="$ac_prog"
11988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11989    break 2
11990  fi
11991done
11992  done
11993IFS=$as_save_IFS
11994
11995fi
11996fi
11997AWK=$ac_cv_prog_AWK
11998if test -n "$AWK"; then
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12000$as_echo "$AWK" >&6; }
12001else
12002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12003$as_echo "no" >&6; }
12004fi
12005
12006
12007  test -n "$AWK" && break
12008done
12009
12010  else
12011    # The variable is set, but is it from the command line or the environment?
12012
12013    # Try to remove the string !AWK! from our list.
12014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12016      # If it failed, the variable was not from the command line. Ignore it,
12017      # but warn the user (except for BASH, which is always set by the calling BASH).
12018      if test "xAWK" != xBASH; then
12019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12020$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12021      fi
12022      # Try to locate tool using the code snippet
12023      for ac_prog in gawk mawk nawk awk
12024do
12025  # Extract the first word of "$ac_prog", so it can be a program name with args.
12026set dummy $ac_prog; ac_word=$2
12027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12028$as_echo_n "checking for $ac_word... " >&6; }
12029if ${ac_cv_prog_AWK+:} false; then :
12030  $as_echo_n "(cached) " >&6
12031else
12032  if test -n "$AWK"; then
12033  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12034else
12035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042    ac_cv_prog_AWK="$ac_prog"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050fi
12051fi
12052AWK=$ac_cv_prog_AWK
12053if test -n "$AWK"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12055$as_echo "$AWK" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062  test -n "$AWK" && break
12063done
12064
12065    else
12066      # If it succeeded, then it was overridden by the user. We will use it
12067      # for the tool.
12068
12069      # First remove it from the list of overridden variables, so we can test
12070      # for unknown variables in the end.
12071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12072
12073      # Check if we try to supply an empty value
12074      if test "x$AWK" = x; then
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12076$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12078$as_echo_n "checking for AWK... " >&6; }
12079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12080$as_echo "disabled" >&6; }
12081      else
12082        # Check if the provided tool contains a complete path.
12083        tool_specified="$AWK"
12084        tool_basename="${tool_specified##*/}"
12085        if test "x$tool_basename" = "x$tool_specified"; then
12086          # A command without a complete path is provided, search $PATH.
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12088$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12089          # Extract the first word of "$tool_basename", so it can be a program name with args.
12090set dummy $tool_basename; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_AWK+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $AWK in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119AWK=$ac_cv_path_AWK
12120if test -n "$AWK"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12122$as_echo "$AWK" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129          if test "x$AWK" = x; then
12130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12131          fi
12132        else
12133          # Otherwise we believe it is a complete path. Use it as it is.
12134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12135$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12137$as_echo_n "checking for AWK... " >&6; }
12138          if test ! -x "$tool_specified"; then
12139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12140$as_echo "not found" >&6; }
12141            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12142          fi
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12144$as_echo "$tool_specified" >&6; }
12145        fi
12146      fi
12147    fi
12148  fi
12149
12150
12151  if test "x$AWK" = x; then
12152    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12153  fi
12154
12155
12156
12157
12158  # Publish this variable in the help.
12159
12160
12161  if [ -z "${GREP+x}" ]; then
12162    # The variable is not set by user, try to locate tool using the code snippet
12163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12164$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12165if ${ac_cv_path_GREP+:} false; then :
12166  $as_echo_n "(cached) " >&6
12167else
12168  if test -z "$GREP"; then
12169  ac_path_GREP_found=false
12170  # Loop through the user's path and test for each of PROGNAME-LIST
12171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12173do
12174  IFS=$as_save_IFS
12175  test -z "$as_dir" && as_dir=.
12176    for ac_prog in grep ggrep; do
12177    for ac_exec_ext in '' $ac_executable_extensions; do
12178      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12179      as_fn_executable_p "$ac_path_GREP" || continue
12180# Check for GNU ac_path_GREP and select it if it is found.
12181  # Check for GNU $ac_path_GREP
12182case `"$ac_path_GREP" --version 2>&1` in
12183*GNU*)
12184  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12185*)
12186  ac_count=0
12187  $as_echo_n 0123456789 >"conftest.in"
12188  while :
12189  do
12190    cat "conftest.in" "conftest.in" >"conftest.tmp"
12191    mv "conftest.tmp" "conftest.in"
12192    cp "conftest.in" "conftest.nl"
12193    $as_echo 'GREP' >> "conftest.nl"
12194    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12195    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12196    as_fn_arith $ac_count + 1 && ac_count=$as_val
12197    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12198      # Best one so far, save it but keep looking for a better one
12199      ac_cv_path_GREP="$ac_path_GREP"
12200      ac_path_GREP_max=$ac_count
12201    fi
12202    # 10*(2^10) chars as input seems more than enough
12203    test $ac_count -gt 10 && break
12204  done
12205  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12206esac
12207
12208      $ac_path_GREP_found && break 3
12209    done
12210  done
12211  done
12212IFS=$as_save_IFS
12213  if test -z "$ac_cv_path_GREP"; then
12214    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12215  fi
12216else
12217  ac_cv_path_GREP=$GREP
12218fi
12219
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12222$as_echo "$ac_cv_path_GREP" >&6; }
12223 GREP="$ac_cv_path_GREP"
12224
12225
12226  else
12227    # The variable is set, but is it from the command line or the environment?
12228
12229    # Try to remove the string !GREP! from our list.
12230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12232      # If it failed, the variable was not from the command line. Ignore it,
12233      # but warn the user (except for BASH, which is always set by the calling BASH).
12234      if test "xGREP" != xBASH; then
12235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12236$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12237      fi
12238      # Try to locate tool using the code snippet
12239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12240$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12241if ${ac_cv_path_GREP+:} false; then :
12242  $as_echo_n "(cached) " >&6
12243else
12244  if test -z "$GREP"; then
12245  ac_path_GREP_found=false
12246  # Loop through the user's path and test for each of PROGNAME-LIST
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_prog in grep ggrep; do
12253    for ac_exec_ext in '' $ac_executable_extensions; do
12254      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12255      as_fn_executable_p "$ac_path_GREP" || continue
12256# Check for GNU ac_path_GREP and select it if it is found.
12257  # Check for GNU $ac_path_GREP
12258case `"$ac_path_GREP" --version 2>&1` in
12259*GNU*)
12260  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12261*)
12262  ac_count=0
12263  $as_echo_n 0123456789 >"conftest.in"
12264  while :
12265  do
12266    cat "conftest.in" "conftest.in" >"conftest.tmp"
12267    mv "conftest.tmp" "conftest.in"
12268    cp "conftest.in" "conftest.nl"
12269    $as_echo 'GREP' >> "conftest.nl"
12270    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12272    as_fn_arith $ac_count + 1 && ac_count=$as_val
12273    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12274      # Best one so far, save it but keep looking for a better one
12275      ac_cv_path_GREP="$ac_path_GREP"
12276      ac_path_GREP_max=$ac_count
12277    fi
12278    # 10*(2^10) chars as input seems more than enough
12279    test $ac_count -gt 10 && break
12280  done
12281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12282esac
12283
12284      $ac_path_GREP_found && break 3
12285    done
12286  done
12287  done
12288IFS=$as_save_IFS
12289  if test -z "$ac_cv_path_GREP"; then
12290    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12291  fi
12292else
12293  ac_cv_path_GREP=$GREP
12294fi
12295
12296fi
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12298$as_echo "$ac_cv_path_GREP" >&6; }
12299 GREP="$ac_cv_path_GREP"
12300
12301
12302    else
12303      # If it succeeded, then it was overridden by the user. We will use it
12304      # for the tool.
12305
12306      # First remove it from the list of overridden variables, so we can test
12307      # for unknown variables in the end.
12308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12309
12310      # Check if we try to supply an empty value
12311      if test "x$GREP" = x; then
12312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12313$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12315$as_echo_n "checking for GREP... " >&6; }
12316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12317$as_echo "disabled" >&6; }
12318      else
12319        # Check if the provided tool contains a complete path.
12320        tool_specified="$GREP"
12321        tool_basename="${tool_specified##*/}"
12322        if test "x$tool_basename" = "x$tool_specified"; then
12323          # A command without a complete path is provided, search $PATH.
12324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12325$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12326          # Extract the first word of "$tool_basename", so it can be a program name with args.
12327set dummy $tool_basename; ac_word=$2
12328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12329$as_echo_n "checking for $ac_word... " >&6; }
12330if ${ac_cv_path_GREP+:} false; then :
12331  $as_echo_n "(cached) " >&6
12332else
12333  case $GREP in
12334  [\\/]* | ?:[\\/]*)
12335  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12336  ;;
12337  *)
12338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12339for as_dir in $PATH
12340do
12341  IFS=$as_save_IFS
12342  test -z "$as_dir" && as_dir=.
12343    for ac_exec_ext in '' $ac_executable_extensions; do
12344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12345    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12347    break 2
12348  fi
12349done
12350  done
12351IFS=$as_save_IFS
12352
12353  ;;
12354esac
12355fi
12356GREP=$ac_cv_path_GREP
12357if test -n "$GREP"; then
12358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12359$as_echo "$GREP" >&6; }
12360else
12361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12362$as_echo "no" >&6; }
12363fi
12364
12365
12366          if test "x$GREP" = x; then
12367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12368          fi
12369        else
12370          # Otherwise we believe it is a complete path. Use it as it is.
12371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12372$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12374$as_echo_n "checking for GREP... " >&6; }
12375          if test ! -x "$tool_specified"; then
12376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12377$as_echo "not found" >&6; }
12378            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12379          fi
12380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12381$as_echo "$tool_specified" >&6; }
12382        fi
12383      fi
12384    fi
12385  fi
12386
12387
12388  if test "x$GREP" = x; then
12389    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12390  fi
12391
12392
12393
12394
12395  # Publish this variable in the help.
12396
12397
12398  if [ -z "${EGREP+x}" ]; then
12399    # The variable is not set by user, try to locate tool using the code snippet
12400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12401$as_echo_n "checking for egrep... " >&6; }
12402if ${ac_cv_path_EGREP+:} false; then :
12403  $as_echo_n "(cached) " >&6
12404else
12405  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12406   then ac_cv_path_EGREP="$GREP -E"
12407   else
12408     if test -z "$EGREP"; then
12409  ac_path_EGREP_found=false
12410  # Loop through the user's path and test for each of PROGNAME-LIST
12411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12412for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12413do
12414  IFS=$as_save_IFS
12415  test -z "$as_dir" && as_dir=.
12416    for ac_prog in egrep; do
12417    for ac_exec_ext in '' $ac_executable_extensions; do
12418      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12419      as_fn_executable_p "$ac_path_EGREP" || continue
12420# Check for GNU ac_path_EGREP and select it if it is found.
12421  # Check for GNU $ac_path_EGREP
12422case `"$ac_path_EGREP" --version 2>&1` in
12423*GNU*)
12424  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12425*)
12426  ac_count=0
12427  $as_echo_n 0123456789 >"conftest.in"
12428  while :
12429  do
12430    cat "conftest.in" "conftest.in" >"conftest.tmp"
12431    mv "conftest.tmp" "conftest.in"
12432    cp "conftest.in" "conftest.nl"
12433    $as_echo 'EGREP' >> "conftest.nl"
12434    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12435    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12436    as_fn_arith $ac_count + 1 && ac_count=$as_val
12437    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12438      # Best one so far, save it but keep looking for a better one
12439      ac_cv_path_EGREP="$ac_path_EGREP"
12440      ac_path_EGREP_max=$ac_count
12441    fi
12442    # 10*(2^10) chars as input seems more than enough
12443    test $ac_count -gt 10 && break
12444  done
12445  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12446esac
12447
12448      $ac_path_EGREP_found && break 3
12449    done
12450  done
12451  done
12452IFS=$as_save_IFS
12453  if test -z "$ac_cv_path_EGREP"; then
12454    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12455  fi
12456else
12457  ac_cv_path_EGREP=$EGREP
12458fi
12459
12460   fi
12461fi
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12463$as_echo "$ac_cv_path_EGREP" >&6; }
12464 EGREP="$ac_cv_path_EGREP"
12465
12466
12467  else
12468    # The variable is set, but is it from the command line or the environment?
12469
12470    # Try to remove the string !EGREP! from our list.
12471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12473      # If it failed, the variable was not from the command line. Ignore it,
12474      # but warn the user (except for BASH, which is always set by the calling BASH).
12475      if test "xEGREP" != xBASH; then
12476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12477$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12478      fi
12479      # Try to locate tool using the code snippet
12480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12481$as_echo_n "checking for egrep... " >&6; }
12482if ${ac_cv_path_EGREP+:} false; then :
12483  $as_echo_n "(cached) " >&6
12484else
12485  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12486   then ac_cv_path_EGREP="$GREP -E"
12487   else
12488     if test -z "$EGREP"; then
12489  ac_path_EGREP_found=false
12490  # Loop through the user's path and test for each of PROGNAME-LIST
12491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12492for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12493do
12494  IFS=$as_save_IFS
12495  test -z "$as_dir" && as_dir=.
12496    for ac_prog in egrep; do
12497    for ac_exec_ext in '' $ac_executable_extensions; do
12498      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12499      as_fn_executable_p "$ac_path_EGREP" || continue
12500# Check for GNU ac_path_EGREP and select it if it is found.
12501  # Check for GNU $ac_path_EGREP
12502case `"$ac_path_EGREP" --version 2>&1` in
12503*GNU*)
12504  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12505*)
12506  ac_count=0
12507  $as_echo_n 0123456789 >"conftest.in"
12508  while :
12509  do
12510    cat "conftest.in" "conftest.in" >"conftest.tmp"
12511    mv "conftest.tmp" "conftest.in"
12512    cp "conftest.in" "conftest.nl"
12513    $as_echo 'EGREP' >> "conftest.nl"
12514    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12515    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12516    as_fn_arith $ac_count + 1 && ac_count=$as_val
12517    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12518      # Best one so far, save it but keep looking for a better one
12519      ac_cv_path_EGREP="$ac_path_EGREP"
12520      ac_path_EGREP_max=$ac_count
12521    fi
12522    # 10*(2^10) chars as input seems more than enough
12523    test $ac_count -gt 10 && break
12524  done
12525  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12526esac
12527
12528      $ac_path_EGREP_found && break 3
12529    done
12530  done
12531  done
12532IFS=$as_save_IFS
12533  if test -z "$ac_cv_path_EGREP"; then
12534    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12535  fi
12536else
12537  ac_cv_path_EGREP=$EGREP
12538fi
12539
12540   fi
12541fi
12542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12543$as_echo "$ac_cv_path_EGREP" >&6; }
12544 EGREP="$ac_cv_path_EGREP"
12545
12546
12547    else
12548      # If it succeeded, then it was overridden by the user. We will use it
12549      # for the tool.
12550
12551      # First remove it from the list of overridden variables, so we can test
12552      # for unknown variables in the end.
12553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12554
12555      # Check if we try to supply an empty value
12556      if test "x$EGREP" = x; then
12557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12558$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12560$as_echo_n "checking for EGREP... " >&6; }
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12562$as_echo "disabled" >&6; }
12563      else
12564        # Check if the provided tool contains a complete path.
12565        tool_specified="$EGREP"
12566        tool_basename="${tool_specified##*/}"
12567        if test "x$tool_basename" = "x$tool_specified"; then
12568          # A command without a complete path is provided, search $PATH.
12569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12570$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12571          # Extract the first word of "$tool_basename", so it can be a program name with args.
12572set dummy $tool_basename; ac_word=$2
12573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12574$as_echo_n "checking for $ac_word... " >&6; }
12575if ${ac_cv_path_EGREP+:} false; then :
12576  $as_echo_n "(cached) " >&6
12577else
12578  case $EGREP in
12579  [\\/]* | ?:[\\/]*)
12580  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12581  ;;
12582  *)
12583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12584for as_dir in $PATH
12585do
12586  IFS=$as_save_IFS
12587  test -z "$as_dir" && as_dir=.
12588    for ac_exec_ext in '' $ac_executable_extensions; do
12589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12590    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12592    break 2
12593  fi
12594done
12595  done
12596IFS=$as_save_IFS
12597
12598  ;;
12599esac
12600fi
12601EGREP=$ac_cv_path_EGREP
12602if test -n "$EGREP"; then
12603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12604$as_echo "$EGREP" >&6; }
12605else
12606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12607$as_echo "no" >&6; }
12608fi
12609
12610
12611          if test "x$EGREP" = x; then
12612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12613          fi
12614        else
12615          # Otherwise we believe it is a complete path. Use it as it is.
12616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12617$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12619$as_echo_n "checking for EGREP... " >&6; }
12620          if test ! -x "$tool_specified"; then
12621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12622$as_echo "not found" >&6; }
12623            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12624          fi
12625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12626$as_echo "$tool_specified" >&6; }
12627        fi
12628      fi
12629    fi
12630  fi
12631
12632
12633  if test "x$EGREP" = x; then
12634    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12635  fi
12636
12637
12638
12639
12640  # Publish this variable in the help.
12641
12642
12643  if [ -z "${FGREP+x}" ]; then
12644    # The variable is not set by user, try to locate tool using the code snippet
12645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12646$as_echo_n "checking for fgrep... " >&6; }
12647if ${ac_cv_path_FGREP+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12651   then ac_cv_path_FGREP="$GREP -F"
12652   else
12653     if test -z "$FGREP"; then
12654  ac_path_FGREP_found=false
12655  # Loop through the user's path and test for each of PROGNAME-LIST
12656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12657for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12658do
12659  IFS=$as_save_IFS
12660  test -z "$as_dir" && as_dir=.
12661    for ac_prog in fgrep; do
12662    for ac_exec_ext in '' $ac_executable_extensions; do
12663      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12664      as_fn_executable_p "$ac_path_FGREP" || continue
12665# Check for GNU ac_path_FGREP and select it if it is found.
12666  # Check for GNU $ac_path_FGREP
12667case `"$ac_path_FGREP" --version 2>&1` in
12668*GNU*)
12669  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12670*)
12671  ac_count=0
12672  $as_echo_n 0123456789 >"conftest.in"
12673  while :
12674  do
12675    cat "conftest.in" "conftest.in" >"conftest.tmp"
12676    mv "conftest.tmp" "conftest.in"
12677    cp "conftest.in" "conftest.nl"
12678    $as_echo 'FGREP' >> "conftest.nl"
12679    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12680    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12681    as_fn_arith $ac_count + 1 && ac_count=$as_val
12682    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12683      # Best one so far, save it but keep looking for a better one
12684      ac_cv_path_FGREP="$ac_path_FGREP"
12685      ac_path_FGREP_max=$ac_count
12686    fi
12687    # 10*(2^10) chars as input seems more than enough
12688    test $ac_count -gt 10 && break
12689  done
12690  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12691esac
12692
12693      $ac_path_FGREP_found && break 3
12694    done
12695  done
12696  done
12697IFS=$as_save_IFS
12698  if test -z "$ac_cv_path_FGREP"; then
12699    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12700  fi
12701else
12702  ac_cv_path_FGREP=$FGREP
12703fi
12704
12705   fi
12706fi
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12708$as_echo "$ac_cv_path_FGREP" >&6; }
12709 FGREP="$ac_cv_path_FGREP"
12710
12711
12712  else
12713    # The variable is set, but is it from the command line or the environment?
12714
12715    # Try to remove the string !FGREP! from our list.
12716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12718      # If it failed, the variable was not from the command line. Ignore it,
12719      # but warn the user (except for BASH, which is always set by the calling BASH).
12720      if test "xFGREP" != xBASH; then
12721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12722$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12723      fi
12724      # Try to locate tool using the code snippet
12725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12726$as_echo_n "checking for fgrep... " >&6; }
12727if ${ac_cv_path_FGREP+:} false; then :
12728  $as_echo_n "(cached) " >&6
12729else
12730  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12731   then ac_cv_path_FGREP="$GREP -F"
12732   else
12733     if test -z "$FGREP"; then
12734  ac_path_FGREP_found=false
12735  # Loop through the user's path and test for each of PROGNAME-LIST
12736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12737for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12738do
12739  IFS=$as_save_IFS
12740  test -z "$as_dir" && as_dir=.
12741    for ac_prog in fgrep; do
12742    for ac_exec_ext in '' $ac_executable_extensions; do
12743      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12744      as_fn_executable_p "$ac_path_FGREP" || continue
12745# Check for GNU ac_path_FGREP and select it if it is found.
12746  # Check for GNU $ac_path_FGREP
12747case `"$ac_path_FGREP" --version 2>&1` in
12748*GNU*)
12749  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12750*)
12751  ac_count=0
12752  $as_echo_n 0123456789 >"conftest.in"
12753  while :
12754  do
12755    cat "conftest.in" "conftest.in" >"conftest.tmp"
12756    mv "conftest.tmp" "conftest.in"
12757    cp "conftest.in" "conftest.nl"
12758    $as_echo 'FGREP' >> "conftest.nl"
12759    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12760    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12761    as_fn_arith $ac_count + 1 && ac_count=$as_val
12762    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12763      # Best one so far, save it but keep looking for a better one
12764      ac_cv_path_FGREP="$ac_path_FGREP"
12765      ac_path_FGREP_max=$ac_count
12766    fi
12767    # 10*(2^10) chars as input seems more than enough
12768    test $ac_count -gt 10 && break
12769  done
12770  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12771esac
12772
12773      $ac_path_FGREP_found && break 3
12774    done
12775  done
12776  done
12777IFS=$as_save_IFS
12778  if test -z "$ac_cv_path_FGREP"; then
12779    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12780  fi
12781else
12782  ac_cv_path_FGREP=$FGREP
12783fi
12784
12785   fi
12786fi
12787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12788$as_echo "$ac_cv_path_FGREP" >&6; }
12789 FGREP="$ac_cv_path_FGREP"
12790
12791
12792    else
12793      # If it succeeded, then it was overridden by the user. We will use it
12794      # for the tool.
12795
12796      # First remove it from the list of overridden variables, so we can test
12797      # for unknown variables in the end.
12798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12799
12800      # Check if we try to supply an empty value
12801      if test "x$FGREP" = x; then
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
12803$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12805$as_echo_n "checking for FGREP... " >&6; }
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12807$as_echo "disabled" >&6; }
12808      else
12809        # Check if the provided tool contains a complete path.
12810        tool_specified="$FGREP"
12811        tool_basename="${tool_specified##*/}"
12812        if test "x$tool_basename" = "x$tool_specified"; then
12813          # A command without a complete path is provided, search $PATH.
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12815$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12816          # Extract the first word of "$tool_basename", so it can be a program name with args.
12817set dummy $tool_basename; 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_FGREP+:} false; then :
12821  $as_echo_n "(cached) " >&6
12822else
12823  case $FGREP in
12824  [\\/]* | ?:[\\/]*)
12825  ac_cv_path_FGREP="$FGREP" # 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_FGREP="$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
12846FGREP=$ac_cv_path_FGREP
12847if test -n "$FGREP"; then
12848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12849$as_echo "$FGREP" >&6; }
12850else
12851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12852$as_echo "no" >&6; }
12853fi
12854
12855
12856          if test "x$FGREP" = x; then
12857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12858          fi
12859        else
12860          # Otherwise we believe it is a complete path. Use it as it is.
12861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12862$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12864$as_echo_n "checking for FGREP... " >&6; }
12865          if test ! -x "$tool_specified"; then
12866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12867$as_echo "not found" >&6; }
12868            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12869          fi
12870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12871$as_echo "$tool_specified" >&6; }
12872        fi
12873      fi
12874    fi
12875  fi
12876
12877
12878  if test "x$FGREP" = x; then
12879    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12880  fi
12881
12882
12883
12884
12885  # Publish this variable in the help.
12886
12887
12888  if [ -z "${SED+x}" ]; then
12889    # The variable is not set by user, try to locate tool using the code snippet
12890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12891$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12892if ${ac_cv_path_SED+:} false; then :
12893  $as_echo_n "(cached) " >&6
12894else
12895            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12896     for ac_i in 1 2 3 4 5 6 7; do
12897       ac_script="$ac_script$as_nl$ac_script"
12898     done
12899     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12900     { ac_script=; unset ac_script;}
12901     if test -z "$SED"; then
12902  ac_path_SED_found=false
12903  # Loop through the user's path and test for each of PROGNAME-LIST
12904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12905for as_dir in $PATH
12906do
12907  IFS=$as_save_IFS
12908  test -z "$as_dir" && as_dir=.
12909    for ac_prog in sed gsed; do
12910    for ac_exec_ext in '' $ac_executable_extensions; do
12911      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12912      as_fn_executable_p "$ac_path_SED" || continue
12913# Check for GNU ac_path_SED and select it if it is found.
12914  # Check for GNU $ac_path_SED
12915case `"$ac_path_SED" --version 2>&1` in
12916*GNU*)
12917  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12918*)
12919  ac_count=0
12920  $as_echo_n 0123456789 >"conftest.in"
12921  while :
12922  do
12923    cat "conftest.in" "conftest.in" >"conftest.tmp"
12924    mv "conftest.tmp" "conftest.in"
12925    cp "conftest.in" "conftest.nl"
12926    $as_echo '' >> "conftest.nl"
12927    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12928    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12929    as_fn_arith $ac_count + 1 && ac_count=$as_val
12930    if test $ac_count -gt ${ac_path_SED_max-0}; then
12931      # Best one so far, save it but keep looking for a better one
12932      ac_cv_path_SED="$ac_path_SED"
12933      ac_path_SED_max=$ac_count
12934    fi
12935    # 10*(2^10) chars as input seems more than enough
12936    test $ac_count -gt 10 && break
12937  done
12938  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12939esac
12940
12941      $ac_path_SED_found && break 3
12942    done
12943  done
12944  done
12945IFS=$as_save_IFS
12946  if test -z "$ac_cv_path_SED"; then
12947    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12948  fi
12949else
12950  ac_cv_path_SED=$SED
12951fi
12952
12953fi
12954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12955$as_echo "$ac_cv_path_SED" >&6; }
12956 SED="$ac_cv_path_SED"
12957  rm -f conftest.sed
12958
12959  else
12960    # The variable is set, but is it from the command line or the environment?
12961
12962    # Try to remove the string !SED! from our list.
12963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965      # If it failed, the variable was not from the command line. Ignore it,
12966      # but warn the user (except for BASH, which is always set by the calling BASH).
12967      if test "xSED" != xBASH; then
12968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12969$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12970      fi
12971      # Try to locate tool using the code snippet
12972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12973$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12974if ${ac_cv_path_SED+:} false; then :
12975  $as_echo_n "(cached) " >&6
12976else
12977            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12978     for ac_i in 1 2 3 4 5 6 7; do
12979       ac_script="$ac_script$as_nl$ac_script"
12980     done
12981     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12982     { ac_script=; unset ac_script;}
12983     if test -z "$SED"; then
12984  ac_path_SED_found=false
12985  # Loop through the user's path and test for each of PROGNAME-LIST
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_prog in sed gsed; do
12992    for ac_exec_ext in '' $ac_executable_extensions; do
12993      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12994      as_fn_executable_p "$ac_path_SED" || continue
12995# Check for GNU ac_path_SED and select it if it is found.
12996  # Check for GNU $ac_path_SED
12997case `"$ac_path_SED" --version 2>&1` in
12998*GNU*)
12999  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13000*)
13001  ac_count=0
13002  $as_echo_n 0123456789 >"conftest.in"
13003  while :
13004  do
13005    cat "conftest.in" "conftest.in" >"conftest.tmp"
13006    mv "conftest.tmp" "conftest.in"
13007    cp "conftest.in" "conftest.nl"
13008    $as_echo '' >> "conftest.nl"
13009    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13010    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13011    as_fn_arith $ac_count + 1 && ac_count=$as_val
13012    if test $ac_count -gt ${ac_path_SED_max-0}; then
13013      # Best one so far, save it but keep looking for a better one
13014      ac_cv_path_SED="$ac_path_SED"
13015      ac_path_SED_max=$ac_count
13016    fi
13017    # 10*(2^10) chars as input seems more than enough
13018    test $ac_count -gt 10 && break
13019  done
13020  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13021esac
13022
13023      $ac_path_SED_found && break 3
13024    done
13025  done
13026  done
13027IFS=$as_save_IFS
13028  if test -z "$ac_cv_path_SED"; then
13029    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13030  fi
13031else
13032  ac_cv_path_SED=$SED
13033fi
13034
13035fi
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13037$as_echo "$ac_cv_path_SED" >&6; }
13038 SED="$ac_cv_path_SED"
13039  rm -f conftest.sed
13040
13041    else
13042      # If it succeeded, then it was overridden by the user. We will use it
13043      # for the tool.
13044
13045      # First remove it from the list of overridden variables, so we can test
13046      # for unknown variables in the end.
13047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13048
13049      # Check if we try to supply an empty value
13050      if test "x$SED" = x; then
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13052$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13054$as_echo_n "checking for SED... " >&6; }
13055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13056$as_echo "disabled" >&6; }
13057      else
13058        # Check if the provided tool contains a complete path.
13059        tool_specified="$SED"
13060        tool_basename="${tool_specified##*/}"
13061        if test "x$tool_basename" = "x$tool_specified"; then
13062          # A command without a complete path is provided, search $PATH.
13063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13064$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13065          # Extract the first word of "$tool_basename", so it can be a program name with args.
13066set dummy $tool_basename; ac_word=$2
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13068$as_echo_n "checking for $ac_word... " >&6; }
13069if ${ac_cv_path_SED+:} false; then :
13070  $as_echo_n "(cached) " >&6
13071else
13072  case $SED in
13073  [\\/]* | ?:[\\/]*)
13074  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13075  ;;
13076  *)
13077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078for as_dir in $PATH
13079do
13080  IFS=$as_save_IFS
13081  test -z "$as_dir" && as_dir=.
13082    for ac_exec_ext in '' $ac_executable_extensions; do
13083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13084    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13086    break 2
13087  fi
13088done
13089  done
13090IFS=$as_save_IFS
13091
13092  ;;
13093esac
13094fi
13095SED=$ac_cv_path_SED
13096if test -n "$SED"; then
13097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13098$as_echo "$SED" >&6; }
13099else
13100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101$as_echo "no" >&6; }
13102fi
13103
13104
13105          if test "x$SED" = x; then
13106            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13107          fi
13108        else
13109          # Otherwise we believe it is a complete path. Use it as it is.
13110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13111$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13112          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13113$as_echo_n "checking for SED... " >&6; }
13114          if test ! -x "$tool_specified"; then
13115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13116$as_echo "not found" >&6; }
13117            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13118          fi
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13120$as_echo "$tool_specified" >&6; }
13121        fi
13122      fi
13123    fi
13124  fi
13125
13126
13127  if test "x$SED" = x; then
13128    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13129  fi
13130
13131
13132
13133  # Always force rm.
13134  RM="$RM -f"
13135
13136  # pwd behaves differently on various platforms and some don't support the -L flag.
13137  # Always use the bash builtin pwd to get uniform behavior.
13138  THEPWDCMD=pwd
13139
13140  # These are not required on all platforms
13141
13142
13143  # Publish this variable in the help.
13144
13145
13146  if [ -z "${CYGPATH+x}" ]; then
13147    # The variable is not set by user, try to locate tool using the code snippet
13148    for ac_prog in cygpath
13149do
13150  # Extract the first word of "$ac_prog", so it can be a program name with args.
13151set dummy $ac_prog; ac_word=$2
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13153$as_echo_n "checking for $ac_word... " >&6; }
13154if ${ac_cv_path_CYGPATH+:} false; then :
13155  $as_echo_n "(cached) " >&6
13156else
13157  case $CYGPATH in
13158  [\\/]* | ?:[\\/]*)
13159  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13160  ;;
13161  *)
13162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13163for as_dir in $PATH
13164do
13165  IFS=$as_save_IFS
13166  test -z "$as_dir" && as_dir=.
13167    for ac_exec_ext in '' $ac_executable_extensions; do
13168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13169    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13171    break 2
13172  fi
13173done
13174  done
13175IFS=$as_save_IFS
13176
13177  ;;
13178esac
13179fi
13180CYGPATH=$ac_cv_path_CYGPATH
13181if test -n "$CYGPATH"; then
13182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13183$as_echo "$CYGPATH" >&6; }
13184else
13185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13186$as_echo "no" >&6; }
13187fi
13188
13189
13190  test -n "$CYGPATH" && break
13191done
13192
13193  else
13194    # The variable is set, but is it from the command line or the environment?
13195
13196    # Try to remove the string !CYGPATH! from our list.
13197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13199      # If it failed, the variable was not from the command line. Ignore it,
13200      # but warn the user (except for BASH, which is always set by the calling BASH).
13201      if test "xCYGPATH" != xBASH; then
13202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13203$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13204      fi
13205      # Try to locate tool using the code snippet
13206      for ac_prog in cygpath
13207do
13208  # Extract the first word of "$ac_prog", so it can be a program name with args.
13209set dummy $ac_prog; ac_word=$2
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13211$as_echo_n "checking for $ac_word... " >&6; }
13212if ${ac_cv_path_CYGPATH+:} false; then :
13213  $as_echo_n "(cached) " >&6
13214else
13215  case $CYGPATH in
13216  [\\/]* | ?:[\\/]*)
13217  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13218  ;;
13219  *)
13220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13221for as_dir in $PATH
13222do
13223  IFS=$as_save_IFS
13224  test -z "$as_dir" && as_dir=.
13225    for ac_exec_ext in '' $ac_executable_extensions; do
13226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13227    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13229    break 2
13230  fi
13231done
13232  done
13233IFS=$as_save_IFS
13234
13235  ;;
13236esac
13237fi
13238CYGPATH=$ac_cv_path_CYGPATH
13239if test -n "$CYGPATH"; then
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13241$as_echo "$CYGPATH" >&6; }
13242else
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13244$as_echo "no" >&6; }
13245fi
13246
13247
13248  test -n "$CYGPATH" && break
13249done
13250
13251    else
13252      # If it succeeded, then it was overridden by the user. We will use it
13253      # for the tool.
13254
13255      # First remove it from the list of overridden variables, so we can test
13256      # for unknown variables in the end.
13257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13258
13259      # Check if we try to supply an empty value
13260      if test "x$CYGPATH" = x; then
13261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13262$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13264$as_echo_n "checking for CYGPATH... " >&6; }
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13266$as_echo "disabled" >&6; }
13267      else
13268        # Check if the provided tool contains a complete path.
13269        tool_specified="$CYGPATH"
13270        tool_basename="${tool_specified##*/}"
13271        if test "x$tool_basename" = "x$tool_specified"; then
13272          # A command without a complete path is provided, search $PATH.
13273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13274$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13275          # Extract the first word of "$tool_basename", so it can be a program name with args.
13276set dummy $tool_basename; ac_word=$2
13277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13278$as_echo_n "checking for $ac_word... " >&6; }
13279if ${ac_cv_path_CYGPATH+:} false; then :
13280  $as_echo_n "(cached) " >&6
13281else
13282  case $CYGPATH in
13283  [\\/]* | ?:[\\/]*)
13284  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13285  ;;
13286  *)
13287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13288for as_dir in $PATH
13289do
13290  IFS=$as_save_IFS
13291  test -z "$as_dir" && as_dir=.
13292    for ac_exec_ext in '' $ac_executable_extensions; do
13293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13294    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13296    break 2
13297  fi
13298done
13299  done
13300IFS=$as_save_IFS
13301
13302  ;;
13303esac
13304fi
13305CYGPATH=$ac_cv_path_CYGPATH
13306if test -n "$CYGPATH"; then
13307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13308$as_echo "$CYGPATH" >&6; }
13309else
13310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
13312fi
13313
13314
13315          if test "x$CYGPATH" = x; then
13316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13317          fi
13318        else
13319          # Otherwise we believe it is a complete path. Use it as it is.
13320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13321$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13323$as_echo_n "checking for CYGPATH... " >&6; }
13324          if test ! -x "$tool_specified"; then
13325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13326$as_echo "not found" >&6; }
13327            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13328          fi
13329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13330$as_echo "$tool_specified" >&6; }
13331        fi
13332      fi
13333    fi
13334  fi
13335
13336
13337
13338
13339  # Publish this variable in the help.
13340
13341
13342  if [ -z "${READLINK+x}" ]; then
13343    # The variable is not set by user, try to locate tool using the code snippet
13344    for ac_prog in greadlink readlink
13345do
13346  # Extract the first word of "$ac_prog", so it can be a program name with args.
13347set dummy $ac_prog; ac_word=$2
13348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13349$as_echo_n "checking for $ac_word... " >&6; }
13350if ${ac_cv_path_READLINK+:} false; then :
13351  $as_echo_n "(cached) " >&6
13352else
13353  case $READLINK in
13354  [\\/]* | ?:[\\/]*)
13355  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13356  ;;
13357  *)
13358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13359for as_dir in $PATH
13360do
13361  IFS=$as_save_IFS
13362  test -z "$as_dir" && as_dir=.
13363    for ac_exec_ext in '' $ac_executable_extensions; do
13364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13365    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13367    break 2
13368  fi
13369done
13370  done
13371IFS=$as_save_IFS
13372
13373  ;;
13374esac
13375fi
13376READLINK=$ac_cv_path_READLINK
13377if test -n "$READLINK"; then
13378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13379$as_echo "$READLINK" >&6; }
13380else
13381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13382$as_echo "no" >&6; }
13383fi
13384
13385
13386  test -n "$READLINK" && break
13387done
13388
13389  else
13390    # The variable is set, but is it from the command line or the environment?
13391
13392    # Try to remove the string !READLINK! from our list.
13393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13395      # If it failed, the variable was not from the command line. Ignore it,
13396      # but warn the user (except for BASH, which is always set by the calling BASH).
13397      if test "xREADLINK" != xBASH; then
13398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13399$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13400      fi
13401      # Try to locate tool using the code snippet
13402      for ac_prog in greadlink readlink
13403do
13404  # Extract the first word of "$ac_prog", so it can be a program name with args.
13405set dummy $ac_prog; ac_word=$2
13406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13407$as_echo_n "checking for $ac_word... " >&6; }
13408if ${ac_cv_path_READLINK+:} false; then :
13409  $as_echo_n "(cached) " >&6
13410else
13411  case $READLINK in
13412  [\\/]* | ?:[\\/]*)
13413  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13414  ;;
13415  *)
13416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13417for as_dir in $PATH
13418do
13419  IFS=$as_save_IFS
13420  test -z "$as_dir" && as_dir=.
13421    for ac_exec_ext in '' $ac_executable_extensions; do
13422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13423    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13425    break 2
13426  fi
13427done
13428  done
13429IFS=$as_save_IFS
13430
13431  ;;
13432esac
13433fi
13434READLINK=$ac_cv_path_READLINK
13435if test -n "$READLINK"; then
13436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13437$as_echo "$READLINK" >&6; }
13438else
13439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13440$as_echo "no" >&6; }
13441fi
13442
13443
13444  test -n "$READLINK" && break
13445done
13446
13447    else
13448      # If it succeeded, then it was overridden by the user. We will use it
13449      # for the tool.
13450
13451      # First remove it from the list of overridden variables, so we can test
13452      # for unknown variables in the end.
13453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13454
13455      # Check if we try to supply an empty value
13456      if test "x$READLINK" = x; then
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13458$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13460$as_echo_n "checking for READLINK... " >&6; }
13461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13462$as_echo "disabled" >&6; }
13463      else
13464        # Check if the provided tool contains a complete path.
13465        tool_specified="$READLINK"
13466        tool_basename="${tool_specified##*/}"
13467        if test "x$tool_basename" = "x$tool_specified"; then
13468          # A command without a complete path is provided, search $PATH.
13469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13470$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13471          # Extract the first word of "$tool_basename", so it can be a program name with args.
13472set dummy $tool_basename; ac_word=$2
13473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13474$as_echo_n "checking for $ac_word... " >&6; }
13475if ${ac_cv_path_READLINK+:} false; then :
13476  $as_echo_n "(cached) " >&6
13477else
13478  case $READLINK in
13479  [\\/]* | ?:[\\/]*)
13480  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13481  ;;
13482  *)
13483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13484for as_dir in $PATH
13485do
13486  IFS=$as_save_IFS
13487  test -z "$as_dir" && as_dir=.
13488    for ac_exec_ext in '' $ac_executable_extensions; do
13489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13490    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13492    break 2
13493  fi
13494done
13495  done
13496IFS=$as_save_IFS
13497
13498  ;;
13499esac
13500fi
13501READLINK=$ac_cv_path_READLINK
13502if test -n "$READLINK"; then
13503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13504$as_echo "$READLINK" >&6; }
13505else
13506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507$as_echo "no" >&6; }
13508fi
13509
13510
13511          if test "x$READLINK" = x; then
13512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13513          fi
13514        else
13515          # Otherwise we believe it is a complete path. Use it as it is.
13516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13517$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13519$as_echo_n "checking for READLINK... " >&6; }
13520          if test ! -x "$tool_specified"; then
13521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13522$as_echo "not found" >&6; }
13523            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13524          fi
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13526$as_echo "$tool_specified" >&6; }
13527        fi
13528      fi
13529    fi
13530  fi
13531
13532
13533
13534
13535  # Publish this variable in the help.
13536
13537
13538  if [ -z "${DF+x}" ]; then
13539    # The variable is not set by user, try to locate tool using the code snippet
13540    for ac_prog in df
13541do
13542  # Extract the first word of "$ac_prog", so it can be a program name with args.
13543set dummy $ac_prog; ac_word=$2
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13545$as_echo_n "checking for $ac_word... " >&6; }
13546if ${ac_cv_path_DF+:} false; then :
13547  $as_echo_n "(cached) " >&6
13548else
13549  case $DF in
13550  [\\/]* | ?:[\\/]*)
13551  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13552  ;;
13553  *)
13554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13555for as_dir in $PATH
13556do
13557  IFS=$as_save_IFS
13558  test -z "$as_dir" && as_dir=.
13559    for ac_exec_ext in '' $ac_executable_extensions; do
13560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13561    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13563    break 2
13564  fi
13565done
13566  done
13567IFS=$as_save_IFS
13568
13569  ;;
13570esac
13571fi
13572DF=$ac_cv_path_DF
13573if test -n "$DF"; then
13574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13575$as_echo "$DF" >&6; }
13576else
13577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578$as_echo "no" >&6; }
13579fi
13580
13581
13582  test -n "$DF" && break
13583done
13584
13585  else
13586    # The variable is set, but is it from the command line or the environment?
13587
13588    # Try to remove the string !DF! from our list.
13589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13591      # If it failed, the variable was not from the command line. Ignore it,
13592      # but warn the user (except for BASH, which is always set by the calling BASH).
13593      if test "xDF" != xBASH; then
13594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13595$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13596      fi
13597      # Try to locate tool using the code snippet
13598      for ac_prog in df
13599do
13600  # Extract the first word of "$ac_prog", so it can be a program name with args.
13601set dummy $ac_prog; ac_word=$2
13602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13603$as_echo_n "checking for $ac_word... " >&6; }
13604if ${ac_cv_path_DF+:} false; then :
13605  $as_echo_n "(cached) " >&6
13606else
13607  case $DF in
13608  [\\/]* | ?:[\\/]*)
13609  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13610  ;;
13611  *)
13612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13613for as_dir in $PATH
13614do
13615  IFS=$as_save_IFS
13616  test -z "$as_dir" && as_dir=.
13617    for ac_exec_ext in '' $ac_executable_extensions; do
13618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13619    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13621    break 2
13622  fi
13623done
13624  done
13625IFS=$as_save_IFS
13626
13627  ;;
13628esac
13629fi
13630DF=$ac_cv_path_DF
13631if test -n "$DF"; then
13632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13633$as_echo "$DF" >&6; }
13634else
13635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13636$as_echo "no" >&6; }
13637fi
13638
13639
13640  test -n "$DF" && break
13641done
13642
13643    else
13644      # If it succeeded, then it was overridden by the user. We will use it
13645      # for the tool.
13646
13647      # First remove it from the list of overridden variables, so we can test
13648      # for unknown variables in the end.
13649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13650
13651      # Check if we try to supply an empty value
13652      if test "x$DF" = x; then
13653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13654$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13656$as_echo_n "checking for DF... " >&6; }
13657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13658$as_echo "disabled" >&6; }
13659      else
13660        # Check if the provided tool contains a complete path.
13661        tool_specified="$DF"
13662        tool_basename="${tool_specified##*/}"
13663        if test "x$tool_basename" = "x$tool_specified"; then
13664          # A command without a complete path is provided, search $PATH.
13665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13666$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13667          # Extract the first word of "$tool_basename", so it can be a program name with args.
13668set dummy $tool_basename; ac_word=$2
13669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13670$as_echo_n "checking for $ac_word... " >&6; }
13671if ${ac_cv_path_DF+:} false; then :
13672  $as_echo_n "(cached) " >&6
13673else
13674  case $DF in
13675  [\\/]* | ?:[\\/]*)
13676  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13677  ;;
13678  *)
13679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13680for as_dir in $PATH
13681do
13682  IFS=$as_save_IFS
13683  test -z "$as_dir" && as_dir=.
13684    for ac_exec_ext in '' $ac_executable_extensions; do
13685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13686    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13688    break 2
13689  fi
13690done
13691  done
13692IFS=$as_save_IFS
13693
13694  ;;
13695esac
13696fi
13697DF=$ac_cv_path_DF
13698if test -n "$DF"; then
13699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13700$as_echo "$DF" >&6; }
13701else
13702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13703$as_echo "no" >&6; }
13704fi
13705
13706
13707          if test "x$DF" = x; then
13708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13709          fi
13710        else
13711          # Otherwise we believe it is a complete path. Use it as it is.
13712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13713$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13715$as_echo_n "checking for DF... " >&6; }
13716          if test ! -x "$tool_specified"; then
13717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13718$as_echo "not found" >&6; }
13719            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13720          fi
13721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13722$as_echo "$tool_specified" >&6; }
13723        fi
13724      fi
13725    fi
13726  fi
13727
13728
13729
13730
13731  # Publish this variable in the help.
13732
13733
13734  if [ -z "${CPIO+x}" ]; then
13735    # The variable is not set by user, try to locate tool using the code snippet
13736    for ac_prog in cpio bsdcpio
13737do
13738  # Extract the first word of "$ac_prog", so it can be a program name with args.
13739set dummy $ac_prog; ac_word=$2
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13741$as_echo_n "checking for $ac_word... " >&6; }
13742if ${ac_cv_path_CPIO+:} false; then :
13743  $as_echo_n "(cached) " >&6
13744else
13745  case $CPIO in
13746  [\\/]* | ?:[\\/]*)
13747  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13748  ;;
13749  *)
13750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13751for as_dir in $PATH
13752do
13753  IFS=$as_save_IFS
13754  test -z "$as_dir" && as_dir=.
13755    for ac_exec_ext in '' $ac_executable_extensions; do
13756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13757    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13759    break 2
13760  fi
13761done
13762  done
13763IFS=$as_save_IFS
13764
13765  ;;
13766esac
13767fi
13768CPIO=$ac_cv_path_CPIO
13769if test -n "$CPIO"; then
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13771$as_echo "$CPIO" >&6; }
13772else
13773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13774$as_echo "no" >&6; }
13775fi
13776
13777
13778  test -n "$CPIO" && break
13779done
13780
13781  else
13782    # The variable is set, but is it from the command line or the environment?
13783
13784    # Try to remove the string !CPIO! from our list.
13785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13787      # If it failed, the variable was not from the command line. Ignore it,
13788      # but warn the user (except for BASH, which is always set by the calling BASH).
13789      if test "xCPIO" != xBASH; then
13790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13791$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13792      fi
13793      # Try to locate tool using the code snippet
13794      for ac_prog in cpio bsdcpio
13795do
13796  # Extract the first word of "$ac_prog", so it can be a program name with args.
13797set dummy $ac_prog; ac_word=$2
13798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13799$as_echo_n "checking for $ac_word... " >&6; }
13800if ${ac_cv_path_CPIO+:} false; then :
13801  $as_echo_n "(cached) " >&6
13802else
13803  case $CPIO in
13804  [\\/]* | ?:[\\/]*)
13805  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13806  ;;
13807  *)
13808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13809for as_dir in $PATH
13810do
13811  IFS=$as_save_IFS
13812  test -z "$as_dir" && as_dir=.
13813    for ac_exec_ext in '' $ac_executable_extensions; do
13814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13815    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13817    break 2
13818  fi
13819done
13820  done
13821IFS=$as_save_IFS
13822
13823  ;;
13824esac
13825fi
13826CPIO=$ac_cv_path_CPIO
13827if test -n "$CPIO"; then
13828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13829$as_echo "$CPIO" >&6; }
13830else
13831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13832$as_echo "no" >&6; }
13833fi
13834
13835
13836  test -n "$CPIO" && break
13837done
13838
13839    else
13840      # If it succeeded, then it was overridden by the user. We will use it
13841      # for the tool.
13842
13843      # First remove it from the list of overridden variables, so we can test
13844      # for unknown variables in the end.
13845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13846
13847      # Check if we try to supply an empty value
13848      if test "x$CPIO" = x; then
13849        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
13850$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
13851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13852$as_echo_n "checking for CPIO... " >&6; }
13853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13854$as_echo "disabled" >&6; }
13855      else
13856        # Check if the provided tool contains a complete path.
13857        tool_specified="$CPIO"
13858        tool_basename="${tool_specified##*/}"
13859        if test "x$tool_basename" = "x$tool_specified"; then
13860          # A command without a complete path is provided, search $PATH.
13861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13862$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13863          # Extract the first word of "$tool_basename", so it can be a program name with args.
13864set dummy $tool_basename; ac_word=$2
13865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13866$as_echo_n "checking for $ac_word... " >&6; }
13867if ${ac_cv_path_CPIO+:} false; then :
13868  $as_echo_n "(cached) " >&6
13869else
13870  case $CPIO in
13871  [\\/]* | ?:[\\/]*)
13872  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13873  ;;
13874  *)
13875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13876for as_dir in $PATH
13877do
13878  IFS=$as_save_IFS
13879  test -z "$as_dir" && as_dir=.
13880    for ac_exec_ext in '' $ac_executable_extensions; do
13881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13882    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13884    break 2
13885  fi
13886done
13887  done
13888IFS=$as_save_IFS
13889
13890  ;;
13891esac
13892fi
13893CPIO=$ac_cv_path_CPIO
13894if test -n "$CPIO"; then
13895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13896$as_echo "$CPIO" >&6; }
13897else
13898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13899$as_echo "no" >&6; }
13900fi
13901
13902
13903          if test "x$CPIO" = x; then
13904            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13905          fi
13906        else
13907          # Otherwise we believe it is a complete path. Use it as it is.
13908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13909$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13910          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13911$as_echo_n "checking for CPIO... " >&6; }
13912          if test ! -x "$tool_specified"; then
13913            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13914$as_echo "not found" >&6; }
13915            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13916          fi
13917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13918$as_echo "$tool_specified" >&6; }
13919        fi
13920      fi
13921    fi
13922  fi
13923
13924
13925
13926
13927  # Publish this variable in the help.
13928
13929
13930  if [ -z "${NICE+x}" ]; then
13931    # The variable is not set by user, try to locate tool using the code snippet
13932    for ac_prog in nice
13933do
13934  # Extract the first word of "$ac_prog", so it can be a program name with args.
13935set dummy $ac_prog; ac_word=$2
13936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13937$as_echo_n "checking for $ac_word... " >&6; }
13938if ${ac_cv_path_NICE+:} false; then :
13939  $as_echo_n "(cached) " >&6
13940else
13941  case $NICE in
13942  [\\/]* | ?:[\\/]*)
13943  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
13944  ;;
13945  *)
13946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13947for as_dir in $PATH
13948do
13949  IFS=$as_save_IFS
13950  test -z "$as_dir" && as_dir=.
13951    for ac_exec_ext in '' $ac_executable_extensions; do
13952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13953    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
13954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13955    break 2
13956  fi
13957done
13958  done
13959IFS=$as_save_IFS
13960
13961  ;;
13962esac
13963fi
13964NICE=$ac_cv_path_NICE
13965if test -n "$NICE"; then
13966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
13967$as_echo "$NICE" >&6; }
13968else
13969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13970$as_echo "no" >&6; }
13971fi
13972
13973
13974  test -n "$NICE" && break
13975done
13976
13977  else
13978    # The variable is set, but is it from the command line or the environment?
13979
13980    # Try to remove the string !NICE! from our list.
13981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
13982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13983      # If it failed, the variable was not from the command line. Ignore it,
13984      # but warn the user (except for BASH, which is always set by the calling BASH).
13985      if test "xNICE" != xBASH; then
13986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
13987$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
13988      fi
13989      # Try to locate tool using the code snippet
13990      for ac_prog in nice
13991do
13992  # Extract the first word of "$ac_prog", so it can be a program name with args.
13993set dummy $ac_prog; ac_word=$2
13994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13995$as_echo_n "checking for $ac_word... " >&6; }
13996if ${ac_cv_path_NICE+:} false; then :
13997  $as_echo_n "(cached) " >&6
13998else
13999  case $NICE in
14000  [\\/]* | ?:[\\/]*)
14001  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14002  ;;
14003  *)
14004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14005for as_dir in $PATH
14006do
14007  IFS=$as_save_IFS
14008  test -z "$as_dir" && as_dir=.
14009    for ac_exec_ext in '' $ac_executable_extensions; do
14010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14011    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14013    break 2
14014  fi
14015done
14016  done
14017IFS=$as_save_IFS
14018
14019  ;;
14020esac
14021fi
14022NICE=$ac_cv_path_NICE
14023if test -n "$NICE"; then
14024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14025$as_echo "$NICE" >&6; }
14026else
14027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14028$as_echo "no" >&6; }
14029fi
14030
14031
14032  test -n "$NICE" && break
14033done
14034
14035    else
14036      # If it succeeded, then it was overridden by the user. We will use it
14037      # for the tool.
14038
14039      # First remove it from the list of overridden variables, so we can test
14040      # for unknown variables in the end.
14041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14042
14043      # Check if we try to supply an empty value
14044      if test "x$NICE" = x; then
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14046$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14048$as_echo_n "checking for NICE... " >&6; }
14049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14050$as_echo "disabled" >&6; }
14051      else
14052        # Check if the provided tool contains a complete path.
14053        tool_specified="$NICE"
14054        tool_basename="${tool_specified##*/}"
14055        if test "x$tool_basename" = "x$tool_specified"; then
14056          # A command without a complete path is provided, search $PATH.
14057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14058$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14059          # Extract the first word of "$tool_basename", so it can be a program name with args.
14060set dummy $tool_basename; ac_word=$2
14061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14062$as_echo_n "checking for $ac_word... " >&6; }
14063if ${ac_cv_path_NICE+:} false; then :
14064  $as_echo_n "(cached) " >&6
14065else
14066  case $NICE in
14067  [\\/]* | ?:[\\/]*)
14068  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14069  ;;
14070  *)
14071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14072for as_dir in $PATH
14073do
14074  IFS=$as_save_IFS
14075  test -z "$as_dir" && as_dir=.
14076    for ac_exec_ext in '' $ac_executable_extensions; do
14077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14078    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14080    break 2
14081  fi
14082done
14083  done
14084IFS=$as_save_IFS
14085
14086  ;;
14087esac
14088fi
14089NICE=$ac_cv_path_NICE
14090if test -n "$NICE"; then
14091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14092$as_echo "$NICE" >&6; }
14093else
14094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14095$as_echo "no" >&6; }
14096fi
14097
14098
14099          if test "x$NICE" = x; then
14100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14101          fi
14102        else
14103          # Otherwise we believe it is a complete path. Use it as it is.
14104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14105$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14107$as_echo_n "checking for NICE... " >&6; }
14108          if test ! -x "$tool_specified"; then
14109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14110$as_echo "not found" >&6; }
14111            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14112          fi
14113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14114$as_echo "$tool_specified" >&6; }
14115        fi
14116      fi
14117    fi
14118  fi
14119
14120
14121
14122
14123# Now we can determine OpenJDK build and target platforms. This is required to
14124# have early on.
14125# Make sure we can run config.sub.
14126$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14127  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14128
14129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14130$as_echo_n "checking build system type... " >&6; }
14131if ${ac_cv_build+:} false; then :
14132  $as_echo_n "(cached) " >&6
14133else
14134  ac_build_alias=$build_alias
14135test "x$ac_build_alias" = x &&
14136  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14137test "x$ac_build_alias" = x &&
14138  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14139ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14140  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14141
14142fi
14143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14144$as_echo "$ac_cv_build" >&6; }
14145case $ac_cv_build in
14146*-*-*) ;;
14147*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14148esac
14149build=$ac_cv_build
14150ac_save_IFS=$IFS; IFS='-'
14151set x $ac_cv_build
14152shift
14153build_cpu=$1
14154build_vendor=$2
14155shift; shift
14156# Remember, the first character of IFS is used to create $*,
14157# except with old shells:
14158build_os=$*
14159IFS=$ac_save_IFS
14160case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14161
14162
14163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14164$as_echo_n "checking host system type... " >&6; }
14165if ${ac_cv_host+:} false; then :
14166  $as_echo_n "(cached) " >&6
14167else
14168  if test "x$host_alias" = x; then
14169  ac_cv_host=$ac_cv_build
14170else
14171  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14172    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14173fi
14174
14175fi
14176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14177$as_echo "$ac_cv_host" >&6; }
14178case $ac_cv_host in
14179*-*-*) ;;
14180*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14181esac
14182host=$ac_cv_host
14183ac_save_IFS=$IFS; IFS='-'
14184set x $ac_cv_host
14185shift
14186host_cpu=$1
14187host_vendor=$2
14188shift; shift
14189# Remember, the first character of IFS is used to create $*,
14190# except with old shells:
14191host_os=$*
14192IFS=$ac_save_IFS
14193case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14194
14195
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14197$as_echo_n "checking target system type... " >&6; }
14198if ${ac_cv_target+:} false; then :
14199  $as_echo_n "(cached) " >&6
14200else
14201  if test "x$target_alias" = x; then
14202  ac_cv_target=$ac_cv_host
14203else
14204  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14205    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14206fi
14207
14208fi
14209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14210$as_echo "$ac_cv_target" >&6; }
14211case $ac_cv_target in
14212*-*-*) ;;
14213*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14214esac
14215target=$ac_cv_target
14216ac_save_IFS=$IFS; IFS='-'
14217set x $ac_cv_target
14218shift
14219target_cpu=$1
14220target_vendor=$2
14221shift; shift
14222# Remember, the first character of IFS is used to create $*,
14223# except with old shells:
14224target_os=$*
14225IFS=$ac_save_IFS
14226case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14227
14228
14229# The aliases save the names the user supplied, while $host etc.
14230# will get canonicalized.
14231test -n "$target_alias" &&
14232  test "$program_prefix$program_suffix$program_transform_name" = \
14233    NONENONEs,x,x, &&
14234  program_prefix=${target_alias}-
14235
14236  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14237  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14238  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14239  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14240  # to use the configure naming style.
14241
14242
14243
14244
14245
14246  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14247  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14248  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14249  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14250  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14251  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14252
14253
14254
14255  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14256
14257  case "$build_os" in
14258    *linux*)
14259      VAR_OS=linux
14260      VAR_OS_TYPE=unix
14261      ;;
14262    *solaris*)
14263      VAR_OS=solaris
14264      VAR_OS_TYPE=unix
14265      ;;
14266    *darwin*)
14267      VAR_OS=macosx
14268      VAR_OS_TYPE=unix
14269      ;;
14270    *bsd*)
14271      VAR_OS=bsd
14272      VAR_OS_TYPE=unix
14273      ;;
14274    *cygwin*)
14275      VAR_OS=windows
14276      VAR_OS_ENV=windows.cygwin
14277      ;;
14278    *mingw*)
14279      VAR_OS=windows
14280      VAR_OS_ENV=windows.msys
14281      ;;
14282    *aix*)
14283      VAR_OS=aix
14284      VAR_OS_TYPE=unix
14285      ;;
14286    *)
14287      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14288      ;;
14289  esac
14290
14291
14292  # First argument is the cpu name from the trip/quad
14293  case "$build_cpu" in
14294    x86_64)
14295      VAR_CPU=x86_64
14296      VAR_CPU_ARCH=x86
14297      VAR_CPU_BITS=64
14298      VAR_CPU_ENDIAN=little
14299      ;;
14300    i?86)
14301      VAR_CPU=x86
14302      VAR_CPU_ARCH=x86
14303      VAR_CPU_BITS=32
14304      VAR_CPU_ENDIAN=little
14305      ;;
14306    arm*)
14307      VAR_CPU=arm
14308      VAR_CPU_ARCH=arm
14309      VAR_CPU_BITS=32
14310      VAR_CPU_ENDIAN=little
14311      ;;
14312    aarch64)
14313      VAR_CPU=aarch64
14314      VAR_CPU_ARCH=aarch64
14315      VAR_CPU_BITS=64
14316      VAR_CPU_ENDIAN=little
14317      ;;
14318    powerpc)
14319      VAR_CPU=ppc
14320      VAR_CPU_ARCH=ppc
14321      VAR_CPU_BITS=32
14322      VAR_CPU_ENDIAN=big
14323      ;;
14324    powerpc64)
14325      VAR_CPU=ppc64
14326      VAR_CPU_ARCH=ppc
14327      VAR_CPU_BITS=64
14328      VAR_CPU_ENDIAN=big
14329      ;;
14330    powerpc64le)
14331      VAR_CPU=ppc64
14332      VAR_CPU_ARCH=ppc
14333      VAR_CPU_BITS=64
14334      VAR_CPU_ENDIAN=little
14335      ;;
14336    s390)
14337      VAR_CPU=s390
14338      VAR_CPU_ARCH=s390
14339      VAR_CPU_BITS=32
14340      VAR_CPU_ENDIAN=big
14341      ;;
14342    s390x)
14343      VAR_CPU=s390x
14344      VAR_CPU_ARCH=s390
14345      VAR_CPU_BITS=64
14346      VAR_CPU_ENDIAN=big
14347      ;;
14348    sparc)
14349      VAR_CPU=sparc
14350      VAR_CPU_ARCH=sparc
14351      VAR_CPU_BITS=32
14352      VAR_CPU_ENDIAN=big
14353      ;;
14354    sparcv9|sparc64)
14355      VAR_CPU=sparcv9
14356      VAR_CPU_ARCH=sparc
14357      VAR_CPU_BITS=64
14358      VAR_CPU_ENDIAN=big
14359      ;;
14360    *)
14361      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14362      ;;
14363  esac
14364
14365  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14366  OPENJDK_BUILD_OS="$VAR_OS"
14367  if test "x$VAR_OS_TYPE" != x; then
14368    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14369  else
14370    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14371  fi
14372  if test "x$VAR_OS_ENV" != x; then
14373    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14374  else
14375    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14376  fi
14377  OPENJDK_BUILD_CPU="$VAR_CPU"
14378  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14379  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14380  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14381
14382
14383
14384
14385
14386
14387
14388
14389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14390$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14392$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14393
14394  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14395
14396  case "$host_os" in
14397    *linux*)
14398      VAR_OS=linux
14399      VAR_OS_TYPE=unix
14400      ;;
14401    *solaris*)
14402      VAR_OS=solaris
14403      VAR_OS_TYPE=unix
14404      ;;
14405    *darwin*)
14406      VAR_OS=macosx
14407      VAR_OS_TYPE=unix
14408      ;;
14409    *bsd*)
14410      VAR_OS=bsd
14411      VAR_OS_TYPE=unix
14412      ;;
14413    *cygwin*)
14414      VAR_OS=windows
14415      VAR_OS_ENV=windows.cygwin
14416      ;;
14417    *mingw*)
14418      VAR_OS=windows
14419      VAR_OS_ENV=windows.msys
14420      ;;
14421    *aix*)
14422      VAR_OS=aix
14423      VAR_OS_TYPE=unix
14424      ;;
14425    *)
14426      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14427      ;;
14428  esac
14429
14430
14431  # First argument is the cpu name from the trip/quad
14432  case "$host_cpu" in
14433    x86_64)
14434      VAR_CPU=x86_64
14435      VAR_CPU_ARCH=x86
14436      VAR_CPU_BITS=64
14437      VAR_CPU_ENDIAN=little
14438      ;;
14439    i?86)
14440      VAR_CPU=x86
14441      VAR_CPU_ARCH=x86
14442      VAR_CPU_BITS=32
14443      VAR_CPU_ENDIAN=little
14444      ;;
14445    arm*)
14446      VAR_CPU=arm
14447      VAR_CPU_ARCH=arm
14448      VAR_CPU_BITS=32
14449      VAR_CPU_ENDIAN=little
14450      ;;
14451    aarch64)
14452      VAR_CPU=aarch64
14453      VAR_CPU_ARCH=aarch64
14454      VAR_CPU_BITS=64
14455      VAR_CPU_ENDIAN=little
14456      ;;
14457    powerpc)
14458      VAR_CPU=ppc
14459      VAR_CPU_ARCH=ppc
14460      VAR_CPU_BITS=32
14461      VAR_CPU_ENDIAN=big
14462      ;;
14463    powerpc64)
14464      VAR_CPU=ppc64
14465      VAR_CPU_ARCH=ppc
14466      VAR_CPU_BITS=64
14467      VAR_CPU_ENDIAN=big
14468      ;;
14469    powerpc64le)
14470      VAR_CPU=ppc64
14471      VAR_CPU_ARCH=ppc
14472      VAR_CPU_BITS=64
14473      VAR_CPU_ENDIAN=little
14474      ;;
14475    s390)
14476      VAR_CPU=s390
14477      VAR_CPU_ARCH=s390
14478      VAR_CPU_BITS=32
14479      VAR_CPU_ENDIAN=big
14480      ;;
14481    s390x)
14482      VAR_CPU=s390x
14483      VAR_CPU_ARCH=s390
14484      VAR_CPU_BITS=64
14485      VAR_CPU_ENDIAN=big
14486      ;;
14487    sparc)
14488      VAR_CPU=sparc
14489      VAR_CPU_ARCH=sparc
14490      VAR_CPU_BITS=32
14491      VAR_CPU_ENDIAN=big
14492      ;;
14493    sparcv9|sparc64)
14494      VAR_CPU=sparcv9
14495      VAR_CPU_ARCH=sparc
14496      VAR_CPU_BITS=64
14497      VAR_CPU_ENDIAN=big
14498      ;;
14499    *)
14500      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14501      ;;
14502  esac
14503
14504  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14505  OPENJDK_TARGET_OS="$VAR_OS"
14506  if test "x$VAR_OS_TYPE" != x; then
14507    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14508  else
14509    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14510  fi
14511  if test "x$VAR_OS_ENV" != x; then
14512    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14513  else
14514    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14515  fi
14516  OPENJDK_TARGET_CPU="$VAR_CPU"
14517  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14518  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14519  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14520
14521
14522
14523
14524
14525
14526
14527
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14529$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14531$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14532
14533
14534
14535# Check whether --with-target-bits was given.
14536if test "${with_target_bits+set}" = set; then :
14537  withval=$with_target_bits;
14538fi
14539
14540
14541  # We have three types of compiles:
14542  # native  == normal compilation, target system == build system
14543  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14544  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14545  #
14546  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14547    # We're doing a proper cross-compilation
14548    COMPILE_TYPE="cross"
14549  else
14550    COMPILE_TYPE="native"
14551  fi
14552
14553  if test "x$with_target_bits" != x; then
14554    if test "x$COMPILE_TYPE" = "xcross"; then
14555      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14556    fi
14557
14558    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14559      # A reduced build is requested
14560      COMPILE_TYPE="reduced"
14561      OPENJDK_TARGET_CPU_BITS=32
14562      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14563        OPENJDK_TARGET_CPU=x86
14564      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14565        OPENJDK_TARGET_CPU=sparc
14566      else
14567        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14568      fi
14569    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14570      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
14571    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14572      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14573$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14574    else
14575      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14576    fi
14577  fi
14578
14579
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14581$as_echo_n "checking compilation type... " >&6; }
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14583$as_echo "$COMPILE_TYPE" >&6; }
14584
14585
14586  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14587    REQUIRED_OS_NAME=SunOS
14588    REQUIRED_OS_VERSION=5.10
14589  fi
14590  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14591    REQUIRED_OS_NAME=Linux
14592    REQUIRED_OS_VERSION=2.6
14593  fi
14594  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14595    REQUIRED_OS_NAME=Windows
14596    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14597      REQUIRED_OS_VERSION=5.2
14598    else
14599      REQUIRED_OS_VERSION=5.1
14600    fi
14601  fi
14602  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14603    REQUIRED_OS_NAME=Darwin
14604    REQUIRED_OS_VERSION=11.2
14605  fi
14606
14607
14608
14609
14610
14611  # Also store the legacy naming of the cpu.
14612  # Ie i586 and amd64 instead of x86 and x86_64
14613  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14614  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14615    OPENJDK_TARGET_CPU_LEGACY="i586"
14616  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14617    # On all platforms except MacOSX replace x86_64 with amd64.
14618    OPENJDK_TARGET_CPU_LEGACY="amd64"
14619  fi
14620
14621
14622  # And the second legacy naming of the cpu.
14623  # Ie i386 and amd64 instead of x86 and x86_64.
14624  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14625  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14626    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14627  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14628    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14629  fi
14630
14631
14632  # This is the name of the cpu (but using i386 and amd64 instead of
14633  # x86 and x86_64, respectively), preceeded by a /, to be used when
14634  # locating libraries. On macosx, it's empty, though.
14635  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14636  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14637    OPENJDK_TARGET_CPU_LIBDIR=""
14638  fi
14639
14640
14641  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14642  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14643  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14644  OPENJDK_TARGET_CPU_ISADIR=""
14645  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14646    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14647      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14648    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14649      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14650    fi
14651  fi
14652
14653
14654  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14655  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14656  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14657    # On linux only, we replace x86 with i386.
14658    OPENJDK_TARGET_CPU_OSARCH="i386"
14659  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14660    # On all platforms except macosx, we replace x86_64 with amd64.
14661    OPENJDK_TARGET_CPU_OSARCH="amd64"
14662  fi
14663
14664
14665  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14666  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14667    OPENJDK_TARGET_CPU_JLI="i386"
14668  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14669    # On all platforms except macosx, we replace x86_64 with amd64.
14670    OPENJDK_TARGET_CPU_JLI="amd64"
14671  fi
14672  # Now setup the -D flags for building libjli.
14673  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14674  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14675    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14676      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14677    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14678      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14679    fi
14680  fi
14681
14682
14683  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14684      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14685  else
14686      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14687  fi
14688
14689
14690  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14691    A_LP64="LP64:="
14692    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14693    # unpack200.exe
14694    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14695      ADD_LP64="-D_LP64=1"
14696    fi
14697  fi
14698  LP64=$A_LP64
14699
14700
14701  if test "x$COMPILE_TYPE" = "xcross"; then
14702    # FIXME: ... or should this include reduced builds..?
14703    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14704  else
14705    DEFINE_CROSS_COMPILE_ARCH=""
14706  fi
14707
14708
14709  # ZERO_ARCHDEF is used to enable architecture-specific code
14710  case "${OPENJDK_TARGET_CPU}" in
14711    ppc)     ZERO_ARCHDEF=PPC32 ;;
14712    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14713    s390*)   ZERO_ARCHDEF=S390  ;;
14714    sparc*)  ZERO_ARCHDEF=SPARC ;;
14715    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14716    x86)     ZERO_ARCHDEF=IA32  ;;
14717    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14718  esac
14719
14720
14721
14722
14723# Continue setting up basic stuff. Most remaining code require fundamental tools.
14724
14725  # Save the current directory this script was started from
14726  CURDIR="$PWD"
14727
14728  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14729  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14730  # was not available at that time.
14731  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14732  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14733    ORIGINAL_PATH="$REWRITTEN_PATH"
14734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14735$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14736  fi
14737
14738  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14739    PATH_SEP=";"
14740
14741  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14742  if test $SRC_ROOT_LENGTH -gt 100; then
14743    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14744  fi
14745
14746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14748$as_echo_n "checking cygwin release... " >&6; }
14749    CYGWIN_VERSION=`$UNAME -r`
14750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14751$as_echo "$CYGWIN_VERSION" >&6; }
14752    WINDOWS_ENV_VENDOR='cygwin'
14753    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14754
14755    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14756    if test "x$CYGWIN_VERSION_OLD" != x; then
14757      { $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
14758$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;}
14759      as_fn_error $? "Cannot continue" "$LINENO" 5
14760    fi
14761    if test "x$CYGPATH" = x; then
14762      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14763    fi
14764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14765$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14766    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14767    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14768    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14769    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14771$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14772    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14773    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14774    if test "x$test_cygdrive_prefix" = x; then
14775      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14776    fi
14777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14779$as_echo_n "checking msys release... " >&6; }
14780    MSYS_VERSION=`$UNAME -r`
14781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14782$as_echo "$MSYS_VERSION" >&6; }
14783
14784    WINDOWS_ENV_VENDOR='msys'
14785    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14786
14787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14788$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14789    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14790    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14791
14792  windows_path="$MSYS_ROOT_PATH"
14793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14794    unix_path=`$CYGPATH -u "$windows_path"`
14795    MSYS_ROOT_PATH="$unix_path"
14796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14798    MSYS_ROOT_PATH="$unix_path"
14799  fi
14800
14801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14802$as_echo "$MSYS_ROOT_PATH" >&6; }
14803    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14804  else
14805    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14806  fi
14807
14808  # Test if windows or unix (cygwin/msys) find is first in path.
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14810$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14811  FIND_BINARY_OUTPUT=`find --version 2>&1`
14812  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14814$as_echo "unix style" >&6; }
14815  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14817$as_echo "Windows" >&6; }
14818    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14819$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14820    { $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
14821$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14822    as_fn_error $? "Cannot continue" "$LINENO" 5
14823  else
14824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14825$as_echo "unknown" >&6; }
14826    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14827$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14828  fi
14829
14830  else
14831    PATH_SEP=":"
14832  fi
14833
14834
14835  # We get the top-level directory from the supporting wrappers.
14836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14837$as_echo_n "checking for top-level directory... " >&6; }
14838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14839$as_echo "$TOPDIR" >&6; }
14840
14841
14842  # Save the original version of TOPDIR for string comparisons
14843  ORIGINAL_TOPDIR="$TOPDIR"
14844
14845
14846  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14847
14848  # Only process if variable expands to non-empty
14849
14850  if test "x$CURDIR" != x; then
14851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14852
14853  # Input might be given as Windows format, start by converting to
14854  # unix format.
14855  path="$CURDIR"
14856  new_path=`$CYGPATH -u "$path"`
14857
14858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14861  # "foo.exe" is OK but "foo" is an error.
14862  #
14863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14864  # It is also a way to make sure we got the proper file name for the real test later on.
14865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14866  if test "x$test_shortpath" = x; then
14867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14868$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14869    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14870  fi
14871
14872  # Call helper function which possibly converts this using DOS-style short mode.
14873  # If so, the updated path is stored in $new_path.
14874
14875  input_path="$new_path"
14876  # Check if we need to convert this using DOS-style short mode. If the path
14877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14878  # take no chances and rewrite it.
14879  # Note: m4 eats our [], so we need to use [ and ] instead.
14880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14881  if test "x$has_forbidden_chars" != x; then
14882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14886      # Going to short mode and back again did indeed matter. Since short mode is
14887      # case insensitive, let's make it lowercase to improve readability.
14888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14889      # Now convert it back to Unix-style (cygpath)
14890      input_path=`$CYGPATH -u "$shortmode_path"`
14891      new_path="$input_path"
14892    fi
14893  fi
14894
14895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14896  if test "x$test_cygdrive_prefix" = x; then
14897    # As a simple fix, exclude /usr/bin since it's not a real path.
14898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14900      # a path prefixed by /cygdrive for fixpath to work.
14901      new_path="$CYGWIN_ROOT_PATH$input_path"
14902    fi
14903  fi
14904
14905
14906  if test "x$path" != "x$new_path"; then
14907    CURDIR="$new_path"
14908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14909$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14910  fi
14911
14912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14913
14914  path="$CURDIR"
14915  has_colon=`$ECHO $path | $GREP ^.:`
14916  new_path="$path"
14917  if test "x$has_colon" = x; then
14918    # Not in mixed or Windows style, start by that.
14919    new_path=`cmd //c echo $path`
14920  fi
14921
14922
14923  input_path="$new_path"
14924  # Check if we need to convert this using DOS-style short mode. If the path
14925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14926  # take no chances and rewrite it.
14927  # Note: m4 eats our [], so we need to use [ and ] instead.
14928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14929  if test "x$has_forbidden_chars" != x; then
14930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14932  fi
14933
14934
14935  windows_path="$new_path"
14936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14937    unix_path=`$CYGPATH -u "$windows_path"`
14938    new_path="$unix_path"
14939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14941    new_path="$unix_path"
14942  fi
14943
14944  if test "x$path" != "x$new_path"; then
14945    CURDIR="$new_path"
14946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14947$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14948  fi
14949
14950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14952
14953    else
14954      # We're on a unix platform. Hooray! :)
14955      path="$CURDIR"
14956      has_space=`$ECHO "$path" | $GREP " "`
14957      if test "x$has_space" != x; then
14958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14959$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14961      fi
14962
14963      # Use eval to expand a potential ~
14964      eval path="$path"
14965      if test ! -f "$path" && test ! -d "$path"; then
14966        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14967      fi
14968
14969      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14970    fi
14971  fi
14972
14973
14974  # Only process if variable expands to non-empty
14975
14976  if test "x$TOPDIR" != x; then
14977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14978
14979  # Input might be given as Windows format, start by converting to
14980  # unix format.
14981  path="$TOPDIR"
14982  new_path=`$CYGPATH -u "$path"`
14983
14984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14987  # "foo.exe" is OK but "foo" is an error.
14988  #
14989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14990  # It is also a way to make sure we got the proper file name for the real test later on.
14991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14992  if test "x$test_shortpath" = x; then
14993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14994$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14995    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14996  fi
14997
14998  # Call helper function which possibly converts this using DOS-style short mode.
14999  # If so, the updated path is stored in $new_path.
15000
15001  input_path="$new_path"
15002  # Check if we need to convert this using DOS-style short mode. If the path
15003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15004  # take no chances and rewrite it.
15005  # Note: m4 eats our [], so we need to use [ and ] instead.
15006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15007  if test "x$has_forbidden_chars" != x; then
15008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15012      # Going to short mode and back again did indeed matter. Since short mode is
15013      # case insensitive, let's make it lowercase to improve readability.
15014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15015      # Now convert it back to Unix-style (cygpath)
15016      input_path=`$CYGPATH -u "$shortmode_path"`
15017      new_path="$input_path"
15018    fi
15019  fi
15020
15021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15022  if test "x$test_cygdrive_prefix" = x; then
15023    # As a simple fix, exclude /usr/bin since it's not a real path.
15024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15026      # a path prefixed by /cygdrive for fixpath to work.
15027      new_path="$CYGWIN_ROOT_PATH$input_path"
15028    fi
15029  fi
15030
15031
15032  if test "x$path" != "x$new_path"; then
15033    TOPDIR="$new_path"
15034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15035$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15036  fi
15037
15038    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15039
15040  path="$TOPDIR"
15041  has_colon=`$ECHO $path | $GREP ^.:`
15042  new_path="$path"
15043  if test "x$has_colon" = x; then
15044    # Not in mixed or Windows style, start by that.
15045    new_path=`cmd //c echo $path`
15046  fi
15047
15048
15049  input_path="$new_path"
15050  # Check if we need to convert this using DOS-style short mode. If the path
15051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15052  # take no chances and rewrite it.
15053  # Note: m4 eats our [], so we need to use [ and ] instead.
15054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15055  if test "x$has_forbidden_chars" != x; then
15056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15058  fi
15059
15060
15061  windows_path="$new_path"
15062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15063    unix_path=`$CYGPATH -u "$windows_path"`
15064    new_path="$unix_path"
15065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15067    new_path="$unix_path"
15068  fi
15069
15070  if test "x$path" != "x$new_path"; then
15071    TOPDIR="$new_path"
15072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15073$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15074  fi
15075
15076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15078
15079    else
15080      # We're on a unix platform. Hooray! :)
15081      path="$TOPDIR"
15082      has_space=`$ECHO "$path" | $GREP " "`
15083      if test "x$has_space" != x; then
15084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15085$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15086        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15087      fi
15088
15089      # Use eval to expand a potential ~
15090      eval path="$path"
15091      if test ! -f "$path" && test ! -d "$path"; then
15092        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15093      fi
15094
15095      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15096    fi
15097  fi
15098
15099  # SRC_ROOT is a traditional alias for TOPDIR.
15100  SRC_ROOT=$TOPDIR
15101
15102  # Calculate a canonical version of TOPDIR for string comparisons
15103  CANONICAL_TOPDIR=$TOPDIR
15104
15105  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15106    # Follow a chain of symbolic links. Use readlink
15107    # where it exists, else fall back to horribly
15108    # complicated shell code.
15109    if test "x$READLINK_TESTED" != yes; then
15110      # On MacOSX there is a readlink tool with a different
15111      # purpose than the GNU readlink tool. Check the found readlink.
15112      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15113      if test "x$ISGNU" = x; then
15114        # A readlink that we do not know how to use.
15115        # Are there other non-GNU readlinks out there?
15116        READLINK_TESTED=yes
15117        READLINK=
15118      fi
15119    fi
15120
15121    if test "x$READLINK" != x; then
15122      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15123    else
15124      # Save the current directory for restoring afterwards
15125      STARTDIR=$PWD
15126      COUNTER=0
15127      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15128      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15129      cd $sym_link_dir
15130      # Use -P flag to resolve symlinks in directories.
15131      cd `$THEPWDCMD -P`
15132      sym_link_dir=`$THEPWDCMD -P`
15133      # Resolve file symlinks
15134      while test $COUNTER -lt 20; do
15135        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15136        if test "x$ISLINK" == x; then
15137          # This is not a symbolic link! We are done!
15138          break
15139        fi
15140        # Again resolve directory symlinks since the target of the just found
15141        # link could be in a different directory
15142        cd `$DIRNAME $ISLINK`
15143        sym_link_dir=`$THEPWDCMD -P`
15144        sym_link_file=`$BASENAME $ISLINK`
15145        let COUNTER=COUNTER+1
15146      done
15147      cd $STARTDIR
15148      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15149    fi
15150  fi
15151
15152
15153
15154  # Locate the directory of this script.
15155  AUTOCONF_DIR=$TOPDIR/common/autoconf
15156
15157
15158# Check if it's a pure open build or if custom sources are to be used.
15159
15160  # Check whether --enable-openjdk-only was given.
15161if test "${enable_openjdk_only+set}" = set; then :
15162  enableval=$enable_openjdk_only;
15163else
15164  enable_openjdk_only="no"
15165fi
15166
15167
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15169$as_echo_n "checking for presence of closed sources... " >&6; }
15170  if test -d "$SRC_ROOT/jdk/src/closed"; then
15171    CLOSED_SOURCE_PRESENT=yes
15172  else
15173    CLOSED_SOURCE_PRESENT=no
15174  fi
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15176$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15177
15178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15179$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15180  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15182$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15183
15184  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15185    OPENJDK=true
15186    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15187      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15188$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15189    fi
15190  else
15191    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15192      OPENJDK=true
15193    else
15194      OPENJDK=false
15195    fi
15196  fi
15197
15198  if test "x$OPENJDK" = "xtrue"; then
15199    SET_OPENJDK="OPENJDK=true"
15200  fi
15201
15202
15203
15204  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15205  # the IncludeCustomExtension macro.
15206
15207
15208# Check whether --with-custom-make-dir was given.
15209if test "${with_custom_make_dir+set}" = set; then :
15210  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
15211$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15212fi
15213
15214
15215
15216
15217# These are needed to be able to create a configuration name (and thus the output directory)
15218
15219  ###############################################################################
15220  #
15221  # Check which variant of the JDK that we want to build.
15222  # Currently we have:
15223  #    normal:   standard edition
15224  # but the custom make system may add other variants
15225  #
15226  # Effectively the JDK variant gives a name to a specific set of
15227  # modules to compile into the JDK. In the future, these modules
15228  # might even be Jigsaw modules.
15229  #
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15231$as_echo_n "checking which variant of the JDK to build... " >&6; }
15232
15233# Check whether --with-jdk-variant was given.
15234if test "${with_jdk_variant+set}" = set; then :
15235  withval=$with_jdk_variant;
15236fi
15237
15238
15239  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15240    JDK_VARIANT="normal"
15241  else
15242    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15243  fi
15244
15245
15246
15247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15248$as_echo "$JDK_VARIANT" >&6; }
15249
15250
15251###############################################################################
15252#
15253# Check which interpreter of the JVM we want to build.
15254# Currently we have:
15255#    template: Template interpreter (the default)
15256#    cpp     : C++ interpreter
15257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15258$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15259
15260# Check whether --with-jvm-interpreter was given.
15261if test "${with_jvm_interpreter+set}" = set; then :
15262  withval=$with_jvm_interpreter;
15263fi
15264
15265
15266if test "x$with_jvm_interpreter" = x; then
15267     with_jvm_interpreter="template"
15268fi
15269
15270JVM_INTERPRETER="$with_jvm_interpreter"
15271
15272if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15273   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15274fi
15275
15276
15277
15278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15279$as_echo "$with_jvm_interpreter" >&6; }
15280
15281
15282
15283  ###############################################################################
15284  #
15285  # Check which variants of the JVM that we want to build.
15286  # Currently we have:
15287  #    server: normal interpreter and a tiered C1/C2 compiler
15288  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15289  #    minimal1: reduced form of client with optional VM services and features stripped out
15290  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15291  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15292  #    zero: no machine code interpreter, no compiler
15293  #    zeroshark: zero interpreter and shark/llvm compiler backend
15294#    core: interpreter only, no compiler (only works on some platforms)
15295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15296$as_echo_n "checking which variants of the JVM to build... " >&6; }
15297
15298# Check whether --with-jvm-variants was given.
15299if test "${with_jvm_variants+set}" = set; then :
15300  withval=$with_jvm_variants;
15301fi
15302
15303
15304  if test "x$with_jvm_variants" = x; then
15305    with_jvm_variants="server"
15306  fi
15307
15308  JVM_VARIANTS=",$with_jvm_variants,"
15309  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15310
15311  if test "x$TEST_VARIANTS" != "x,"; then
15312     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15313  fi
15314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15315$as_echo "$with_jvm_variants" >&6; }
15316
15317  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15318  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15319  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15320  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15321  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15322  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15323  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15324
15325  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15326    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15327      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15328    fi
15329  fi
15330  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15331    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15332      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15333    fi
15334  fi
15335  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15336    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15337      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15338    fi
15339  fi
15340
15341  # Replace the commas with AND for use in the build directory name.
15342  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15343  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15344  if test "x$COUNT_VARIANTS" != "x,1"; then
15345    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15346  else
15347    BUILDING_MULTIPLE_JVM_VARIANTS=no
15348  fi
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359  INCLUDE_SA=true
15360  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15361    INCLUDE_SA=false
15362  fi
15363  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15364    INCLUDE_SA=false
15365  fi
15366  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15367    INCLUDE_SA=false
15368  fi
15369  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15370    INCLUDE_SA=false
15371  fi
15372
15373
15374  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15375    MACOSX_UNIVERSAL="true"
15376  fi
15377
15378
15379
15380
15381  ###############################################################################
15382  #
15383  # Set the debug level
15384  #    release: no debug information, all optimizations, no asserts.
15385  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15386  #    fastdebug: debug information (-g), all optimizations, all asserts
15387  #    slowdebug: debug information (-g), no optimizations, all asserts
15388  #
15389  DEBUG_LEVEL="release"
15390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15391$as_echo_n "checking which debug level to use... " >&6; }
15392  # Check whether --enable-debug was given.
15393if test "${enable_debug+set}" = set; then :
15394  enableval=$enable_debug;
15395        ENABLE_DEBUG="${enableval}"
15396        DEBUG_LEVEL="fastdebug"
15397
15398else
15399  ENABLE_DEBUG="no"
15400fi
15401
15402
15403
15404# Check whether --with-debug-level was given.
15405if test "${with_debug_level+set}" = set; then :
15406  withval=$with_debug_level;
15407        DEBUG_LEVEL="${withval}"
15408        if test "x$ENABLE_DEBUG" = xyes; then
15409          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15410        fi
15411
15412fi
15413
15414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15415$as_echo "$DEBUG_LEVEL" >&6; }
15416
15417  if test "x$DEBUG_LEVEL" != xrelease && \
15418      test "x$DEBUG_LEVEL" != xoptimized && \
15419      test "x$DEBUG_LEVEL" != xfastdebug && \
15420      test "x$DEBUG_LEVEL" != xslowdebug; then
15421    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15422  fi
15423
15424
15425  ###############################################################################
15426  #
15427  # Setup legacy vars/targets and new vars to deal with different debug levels.
15428  #
15429
15430  case $DEBUG_LEVEL in
15431    release )
15432      VARIANT="OPT"
15433      FASTDEBUG="false"
15434      DEBUG_CLASSFILES="false"
15435      BUILD_VARIANT_RELEASE=""
15436      HOTSPOT_DEBUG_LEVEL="product"
15437      HOTSPOT_EXPORT="product"
15438      ;;
15439    fastdebug )
15440      VARIANT="DBG"
15441      FASTDEBUG="true"
15442      DEBUG_CLASSFILES="true"
15443      BUILD_VARIANT_RELEASE="-fastdebug"
15444      HOTSPOT_DEBUG_LEVEL="fastdebug"
15445      HOTSPOT_EXPORT="fastdebug"
15446      ;;
15447    slowdebug )
15448      VARIANT="DBG"
15449      FASTDEBUG="false"
15450      DEBUG_CLASSFILES="true"
15451      BUILD_VARIANT_RELEASE="-debug"
15452      HOTSPOT_DEBUG_LEVEL="debug"
15453      HOTSPOT_EXPORT="debug"
15454      ;;
15455    optimized )
15456      VARIANT="OPT"
15457      FASTDEBUG="false"
15458      DEBUG_CLASSFILES="false"
15459      BUILD_VARIANT_RELEASE="-optimized"
15460      HOTSPOT_DEBUG_LEVEL="optimized"
15461      HOTSPOT_EXPORT="optimized"
15462      ;;
15463  esac
15464
15465  # The debug level 'optimized' is a little special because it is currently only
15466  # applicable to the HotSpot build where it means to build a completely
15467  # optimized version of the VM without any debugging code (like for the
15468  # 'release' debug level which is called 'product' in the HotSpot build) but
15469  # with the exception that it can contain additional code which is otherwise
15470  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15471  # test new and/or experimental features which are not intended for customer
15472  # shipment. Because these new features need to be tested and benchmarked in
15473  # real world scenarios, we want to build the containing JDK at the 'release'
15474  # debug level.
15475  if test "x$DEBUG_LEVEL" = xoptimized; then
15476    DEBUG_LEVEL="release"
15477  fi
15478
15479  #####
15480  # Generate the legacy makefile targets for hotspot.
15481  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15482  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15483  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15484  # But until then ...
15485  HOTSPOT_TARGET=""
15486
15487  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15488    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15489  fi
15490
15491  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15492    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15493  fi
15494
15495  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15496    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15497  fi
15498
15499  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15500    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15501  fi
15502
15503  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15504    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15505  fi
15506
15507  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15508    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15509  fi
15510
15511  if test "x$JVM_VARIANT_CORE" = xtrue; then
15512    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15513  fi
15514
15515  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15516
15517  # On Macosx universal binaries are produced, but they only contain
15518  # 64 bit intel. This invalidates control of which jvms are built
15519  # from configure, but only server is valid anyway. Fix this
15520  # when hotspot makefiles are rewritten.
15521  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15522    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15523  fi
15524
15525  #####
15526
15527
15528
15529
15530
15531
15532
15533
15534# With basic setup done, call the custom early hook.
15535
15536
15537# Check if we have devkits, extra paths or sysroot set.
15538
15539
15540# Check whether --with-devkit was given.
15541if test "${with_devkit+set}" = set; then :
15542  withval=$with_devkit;
15543
15544  # Only process if variable expands to non-empty
15545
15546  if test "x$with_devkit" != x; then
15547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15548
15549  # Input might be given as Windows format, start by converting to
15550  # unix format.
15551  path="$with_devkit"
15552  new_path=`$CYGPATH -u "$path"`
15553
15554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15557  # "foo.exe" is OK but "foo" is an error.
15558  #
15559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15560  # It is also a way to make sure we got the proper file name for the real test later on.
15561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15562  if test "x$test_shortpath" = x; then
15563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15564$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15565    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15566  fi
15567
15568  # Call helper function which possibly converts this using DOS-style short mode.
15569  # If so, the updated path is stored in $new_path.
15570
15571  input_path="$new_path"
15572  # Check if we need to convert this using DOS-style short mode. If the path
15573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15574  # take no chances and rewrite it.
15575  # Note: m4 eats our [], so we need to use [ and ] instead.
15576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15577  if test "x$has_forbidden_chars" != x; then
15578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15582      # Going to short mode and back again did indeed matter. Since short mode is
15583      # case insensitive, let's make it lowercase to improve readability.
15584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15585      # Now convert it back to Unix-style (cygpath)
15586      input_path=`$CYGPATH -u "$shortmode_path"`
15587      new_path="$input_path"
15588    fi
15589  fi
15590
15591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15592  if test "x$test_cygdrive_prefix" = x; then
15593    # As a simple fix, exclude /usr/bin since it's not a real path.
15594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15596      # a path prefixed by /cygdrive for fixpath to work.
15597      new_path="$CYGWIN_ROOT_PATH$input_path"
15598    fi
15599  fi
15600
15601
15602  if test "x$path" != "x$new_path"; then
15603    with_devkit="$new_path"
15604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15605$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15606  fi
15607
15608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15609
15610  path="$with_devkit"
15611  has_colon=`$ECHO $path | $GREP ^.:`
15612  new_path="$path"
15613  if test "x$has_colon" = x; then
15614    # Not in mixed or Windows style, start by that.
15615    new_path=`cmd //c echo $path`
15616  fi
15617
15618
15619  input_path="$new_path"
15620  # Check if we need to convert this using DOS-style short mode. If the path
15621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15622  # take no chances and rewrite it.
15623  # Note: m4 eats our [], so we need to use [ and ] instead.
15624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15625  if test "x$has_forbidden_chars" != x; then
15626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15628  fi
15629
15630
15631  windows_path="$new_path"
15632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15633    unix_path=`$CYGPATH -u "$windows_path"`
15634    new_path="$unix_path"
15635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15637    new_path="$unix_path"
15638  fi
15639
15640  if test "x$path" != "x$new_path"; then
15641    with_devkit="$new_path"
15642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15643$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15644  fi
15645
15646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15648
15649    else
15650      # We're on a unix platform. Hooray! :)
15651      path="$with_devkit"
15652      has_space=`$ECHO "$path" | $GREP " "`
15653      if test "x$has_space" != x; then
15654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15655$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15657      fi
15658
15659      # Use eval to expand a potential ~
15660      eval path="$path"
15661      if test ! -f "$path" && test ! -d "$path"; then
15662        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15663      fi
15664
15665      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15666    fi
15667  fi
15668
15669        DEVKIT_ROOT="$with_devkit"
15670        # Check for a meta data info file in the root of the devkit
15671        if test -f "$DEVKIT_ROOT/devkit.info"; then
15672          . $DEVKIT_ROOT/devkit.info
15673          # This potentially sets the following:
15674          # A descriptive name of the devkit
15675
15676  if test "x$DEVKIT_NAME" = x; then
15677    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15678  fi
15679
15680          # Corresponds to --with-extra-path
15681
15682  if test "x$DEVKIT_EXTRA_PATH" = x; then
15683    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15684  fi
15685
15686          # Corresponds to --with-toolchain-path
15687
15688  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15689    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15690  fi
15691
15692          # Corresponds to --with-sysroot
15693
15694  if test "x$DEVKIT_SYSROOT" = x; then
15695    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15696  fi
15697
15698
15699          # Identifies the Visual Studio version in the devkit
15700
15701  if test "x$DEVKIT_VS_VERSION" = x; then
15702    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15703  fi
15704
15705          # The Visual Studio include environment variable
15706
15707  if test "x$DEVKIT_VS_INCLUDE" = x; then
15708    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15709  fi
15710
15711          # The Visual Studio lib environment variable
15712
15713  if test "x$DEVKIT_VS_LIB" = x; then
15714    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15715  fi
15716
15717          # Corresponds to --with-msvcr-dll
15718
15719  if test "x$DEVKIT_MSVCR_DLL" = x; then
15720    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15721  fi
15722
15723          # Corresponds to --with-msvcp-dll
15724
15725  if test "x$DEVKIT_MSVCP_DLL" = x; then
15726    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15727  fi
15728
15729        fi
15730
15731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15732$as_echo_n "checking for devkit... " >&6; }
15733        if test "x$DEVKIT_NAME" != x; then
15734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15735$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15736        else
15737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15738$as_echo "$DEVKIT_ROOT" >&6; }
15739        fi
15740
15741
15742  if test "x$DEVKIT_EXTRA_PATH" != x; then
15743    if test "x$EXTRA_PATH" = x; then
15744      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15745    else
15746      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15747    fi
15748  fi
15749
15750
15751        # Fallback default of just /bin if DEVKIT_PATH is not defined
15752        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15753          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15754        fi
15755
15756  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15757    if test "x$TOOLCHAIN_PATH" = x; then
15758      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15759    else
15760      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15761    fi
15762  fi
15763
15764
15765        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15766        # places for backwards compatiblity.
15767        if test "x$DEVKIT_SYSROOT" != x; then
15768          SYSROOT="$DEVKIT_SYSROOT"
15769        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15770          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15771        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15772          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15773        fi
15774
15775
15776fi
15777
15778
15779  # You can force the sysroot if the sysroot encoded into the compiler tools
15780  # is not correct.
15781
15782# Check whether --with-sys-root was given.
15783if test "${with_sys_root+set}" = set; then :
15784  withval=$with_sys_root; SYSROOT=$with_sys_root
15785
15786fi
15787
15788
15789
15790# Check whether --with-sysroot was given.
15791if test "${with_sysroot+set}" = set; then :
15792  withval=$with_sysroot; SYSROOT=$with_sysroot
15793
15794fi
15795
15796
15797
15798# Check whether --with-tools-dir was given.
15799if test "${with_tools_dir+set}" = set; then :
15800  withval=$with_tools_dir;
15801  if test "x$with_tools_dir" != x; then
15802    if test "x$TOOLCHAIN_PATH" = x; then
15803      TOOLCHAIN_PATH="$with_tools_dir"
15804    else
15805      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15806    fi
15807  fi
15808
15809
15810fi
15811
15812
15813
15814# Check whether --with-toolchain-path was given.
15815if test "${with_toolchain_path+set}" = set; then :
15816  withval=$with_toolchain_path;
15817  if test "x$with_toolchain_path" != x; then
15818    if test "x$TOOLCHAIN_PATH" = x; then
15819      TOOLCHAIN_PATH="$with_toolchain_path"
15820    else
15821      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15822    fi
15823  fi
15824
15825
15826fi
15827
15828
15829
15830# Check whether --with-extra-path was given.
15831if test "${with_extra_path+set}" = set; then :
15832  withval=$with_extra_path;
15833  if test "x$with_extra_path" != x; then
15834    if test "x$EXTRA_PATH" = x; then
15835      EXTRA_PATH="$with_extra_path"
15836    else
15837      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15838    fi
15839  fi
15840
15841
15842fi
15843
15844
15845  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15846    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
15847    # If not, detect if Xcode is installed by running xcodebuild -version
15848    # if no Xcode installed, xcodebuild exits with 1
15849    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15850    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15851      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15852      # fall back on the stub binary in /usr/bin/xcodebuild
15853      # Extract the first word of "xcodebuild", so it can be a program name with args.
15854set dummy xcodebuild; ac_word=$2
15855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15856$as_echo_n "checking for $ac_word... " >&6; }
15857if ${ac_cv_path_XCODEBUILD+:} false; then :
15858  $as_echo_n "(cached) " >&6
15859else
15860  case $XCODEBUILD in
15861  [\\/]* | ?:[\\/]*)
15862  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15863  ;;
15864  *)
15865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15866for as_dir in $TOOLCHAIN_PATH
15867do
15868  IFS=$as_save_IFS
15869  test -z "$as_dir" && as_dir=.
15870    for ac_exec_ext in '' $ac_executable_extensions; do
15871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15872    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15874    break 2
15875  fi
15876done
15877  done
15878IFS=$as_save_IFS
15879
15880  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15881  ;;
15882esac
15883fi
15884XCODEBUILD=$ac_cv_path_XCODEBUILD
15885if test -n "$XCODEBUILD"; then
15886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15887$as_echo "$XCODEBUILD" >&6; }
15888else
15889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15890$as_echo "no" >&6; }
15891fi
15892
15893
15894    else
15895      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15896      # when only the command line tools are installed there are no SDKs, so headers
15897      # are copied into the system frameworks
15898      XCODEBUILD=
15899
15900    fi
15901
15902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15903$as_echo_n "checking for sdk name... " >&6; }
15904
15905# Check whether --with-sdk-name was given.
15906if test "${with_sdk_name+set}" = set; then :
15907  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15908
15909fi
15910
15911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15912$as_echo "$SDKNAME" >&6; }
15913
15914    # if toolchain path is specified then don't rely on system headers, they may not compile
15915    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15916    test -z "$TOOLCHAIN_PATH" && \
15917      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15918
15919    if test -z "$SYSROOT"; then
15920      if test -n "$XCODEBUILD"; then
15921        # if we don't have system headers, use default SDK name (last resort)
15922        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15923          SDKNAME=${SDKNAME:-macosx}
15924        fi
15925
15926        if test -n "$SDKNAME"; then
15927          # Call xcodebuild to determine SYSROOT
15928          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15929        fi
15930      else
15931        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15932          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
15933        fi
15934      fi
15935    else
15936      # warn user if --with-sdk-name was also set
15937      if test -n "$with_sdk_name"; then
15938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15939$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15940      fi
15941    fi
15942
15943    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15944      # If no system framework headers, then SYSROOT must be set, or we won't build
15945      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
15946    fi
15947
15948    # Perform a basic sanity test
15949    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15950      if test -z "$SYSROOT"; then
15951        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
15952      else
15953        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15954      fi
15955    fi
15956
15957    # set SDKROOT too, Xcode tools will pick it up
15958    SDKROOT=$SYSROOT
15959
15960  fi
15961
15962  # Prepend the extra path to the global path
15963
15964  if test "x$EXTRA_PATH" != x; then
15965    if test "x$PATH" = x; then
15966      PATH="$EXTRA_PATH"
15967    else
15968      PATH="$EXTRA_PATH:$PATH"
15969    fi
15970  fi
15971
15972
15973  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15974    # Add extra search paths on solaris for utilities like ar and as etc...
15975    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15976  fi
15977
15978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15979$as_echo_n "checking for sysroot... " >&6; }
15980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15981$as_echo "$SYSROOT" >&6; }
15982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15983$as_echo_n "checking for toolchain path... " >&6; }
15984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15985$as_echo "$TOOLCHAIN_PATH" >&6; }
15986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15987$as_echo_n "checking for extra path... " >&6; }
15988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15989$as_echo "$EXTRA_PATH" >&6; }
15990
15991
15992# To properly create a configuration name, we need to have the OpenJDK target
15993# and options (variants and debug level) parsed.
15994
15995
15996
15997# Check whether --with-conf-name was given.
15998if test "${with_conf_name+set}" = set; then :
15999  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16000fi
16001
16002
16003  # Test from where we are running configure, in or outside of src root.
16004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16005$as_echo_n "checking where to store configuration... " >&6; }
16006  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16007      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16008      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16009    # We are running configure from the src root.
16010    # Create a default ./build/target-variant-debuglevel output root.
16011    if test "x${CONF_NAME}" = x; then
16012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16013$as_echo "in default location" >&6; }
16014      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16015    else
16016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16017$as_echo "in build directory with custom name" >&6; }
16018    fi
16019    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16020    $MKDIR -p "$OUTPUT_ROOT"
16021    if test ! -d "$OUTPUT_ROOT"; then
16022      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16023    fi
16024  else
16025    # We are running configure from outside of the src dir.
16026    # Then use the current directory as output dir!
16027    # If configuration is situated in normal build directory, just use the build
16028    # directory name as configuration name, otherwise use the complete path.
16029    if test "x${CONF_NAME}" = x; then
16030      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16031    fi
16032    OUTPUT_ROOT="$CURDIR"
16033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16034$as_echo "in current directory" >&6; }
16035
16036    # WARNING: This might be a bad thing to do. You need to be sure you want to
16037    # have a configuration in this directory. Do some sanity checks!
16038
16039    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16040      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16041      # other files
16042      files_present=`$LS $OUTPUT_ROOT`
16043      # Configure has already touched config.log and confdefs.h in the current dir when this check
16044      # is performed.
16045      filtered_files=`$ECHO "$files_present" \
16046          | $SED -e 's/config.log//g' \
16047              -e 's/configure.log//g' \
16048              -e 's/confdefs.h//g' \
16049              -e 's/ //g' \
16050          | $TR -d '\n'`
16051      if test "x$filtered_files" != x; then
16052        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16053$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16054        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16055$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16056        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16057$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16058        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16059$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16060        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16061$as_echo "$as_me: seriously mess up just about everything." >&6;}
16062        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16063$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16064        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16065$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16066        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16067      fi
16068    fi
16069  fi
16070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16071$as_echo_n "checking what configuration name to use... " >&6; }
16072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16073$as_echo "$CONF_NAME" >&6; }
16074
16075
16076  # Only process if variable expands to non-empty
16077
16078  if test "x$OUTPUT_ROOT" != x; then
16079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16080
16081  # Input might be given as Windows format, start by converting to
16082  # unix format.
16083  path="$OUTPUT_ROOT"
16084  new_path=`$CYGPATH -u "$path"`
16085
16086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16089  # "foo.exe" is OK but "foo" is an error.
16090  #
16091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16092  # It is also a way to make sure we got the proper file name for the real test later on.
16093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16094  if test "x$test_shortpath" = x; then
16095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16096$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16097    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16098  fi
16099
16100  # Call helper function which possibly converts this using DOS-style short mode.
16101  # If so, the updated path is stored in $new_path.
16102
16103  input_path="$new_path"
16104  # Check if we need to convert this using DOS-style short mode. If the path
16105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16106  # take no chances and rewrite it.
16107  # Note: m4 eats our [], so we need to use [ and ] instead.
16108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16109  if test "x$has_forbidden_chars" != x; then
16110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16114      # Going to short mode and back again did indeed matter. Since short mode is
16115      # case insensitive, let's make it lowercase to improve readability.
16116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16117      # Now convert it back to Unix-style (cygpath)
16118      input_path=`$CYGPATH -u "$shortmode_path"`
16119      new_path="$input_path"
16120    fi
16121  fi
16122
16123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16124  if test "x$test_cygdrive_prefix" = x; then
16125    # As a simple fix, exclude /usr/bin since it's not a real path.
16126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16128      # a path prefixed by /cygdrive for fixpath to work.
16129      new_path="$CYGWIN_ROOT_PATH$input_path"
16130    fi
16131  fi
16132
16133
16134  if test "x$path" != "x$new_path"; then
16135    OUTPUT_ROOT="$new_path"
16136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16137$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16138  fi
16139
16140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16141
16142  path="$OUTPUT_ROOT"
16143  has_colon=`$ECHO $path | $GREP ^.:`
16144  new_path="$path"
16145  if test "x$has_colon" = x; then
16146    # Not in mixed or Windows style, start by that.
16147    new_path=`cmd //c echo $path`
16148  fi
16149
16150
16151  input_path="$new_path"
16152  # Check if we need to convert this using DOS-style short mode. If the path
16153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16154  # take no chances and rewrite it.
16155  # Note: m4 eats our [], so we need to use [ and ] instead.
16156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16157  if test "x$has_forbidden_chars" != x; then
16158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16160  fi
16161
16162
16163  windows_path="$new_path"
16164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16165    unix_path=`$CYGPATH -u "$windows_path"`
16166    new_path="$unix_path"
16167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16169    new_path="$unix_path"
16170  fi
16171
16172  if test "x$path" != "x$new_path"; then
16173    OUTPUT_ROOT="$new_path"
16174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16175$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16176  fi
16177
16178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16180
16181    else
16182      # We're on a unix platform. Hooray! :)
16183      path="$OUTPUT_ROOT"
16184      has_space=`$ECHO "$path" | $GREP " "`
16185      if test "x$has_space" != x; then
16186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16187$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16189      fi
16190
16191      # Use eval to expand a potential ~
16192      eval path="$path"
16193      if test ! -f "$path" && test ! -d "$path"; then
16194        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16195      fi
16196
16197      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16198    fi
16199  fi
16200
16201
16202  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16203  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16204
16205  SPEC=$OUTPUT_ROOT/spec.gmk
16206
16207  CONF_NAME=$CONF_NAME
16208
16209  OUTPUT_ROOT=$OUTPUT_ROOT
16210
16211
16212
16213  # The spec.gmk file contains all variables for the make system.
16214  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16215
16216  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16217  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16218
16219  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16220  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16221
16222  # The compare.sh is used to compare the build output to other builds.
16223  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16224
16225  # The generated Makefile knows where the spec.gmk is and where the source is.
16226  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16227  # which will look for generated configurations
16228  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16229
16230
16231
16232# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16233
16234  for ac_prog in apt-get yum port pkgutil pkgadd
16235do
16236  # Extract the first word of "$ac_prog", so it can be a program name with args.
16237set dummy $ac_prog; ac_word=$2
16238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16239$as_echo_n "checking for $ac_word... " >&6; }
16240if ${ac_cv_prog_PKGHANDLER+:} false; then :
16241  $as_echo_n "(cached) " >&6
16242else
16243  if test -n "$PKGHANDLER"; then
16244  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16245else
16246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16247for as_dir in $PATH
16248do
16249  IFS=$as_save_IFS
16250  test -z "$as_dir" && as_dir=.
16251    for ac_exec_ext in '' $ac_executable_extensions; do
16252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16253    ac_cv_prog_PKGHANDLER="$ac_prog"
16254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16255    break 2
16256  fi
16257done
16258  done
16259IFS=$as_save_IFS
16260
16261fi
16262fi
16263PKGHANDLER=$ac_cv_prog_PKGHANDLER
16264if test -n "$PKGHANDLER"; then
16265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16266$as_echo "$PKGHANDLER" >&6; }
16267else
16268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16269$as_echo "no" >&6; }
16270fi
16271
16272
16273  test -n "$PKGHANDLER" && break
16274done
16275
16276
16277
16278# Setup tools that requires more complex handling, or that is not needed by the configure script.
16279
16280
16281  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
16282  if test "x$MAKE" != x; then
16283    # User has supplied a make, test it.
16284    if test ! -f "$MAKE"; then
16285      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
16286    fi
16287
16288  MAKE_CANDIDATE=""$MAKE""
16289  DESCRIPTION="user supplied MAKE=$MAKE"
16290
16291  # On Cygwin, we require a newer version of make than on other platforms
16292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16293    MAKE_VERSION_EXPR="-e 4\."
16294    MAKE_REQUIRED_VERSION="4.0"
16295   else
16296    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16297    MAKE_REQUIRED_VERSION="3.81"
16298  fi
16299
16300  if test "x$MAKE_CANDIDATE" != x; then
16301    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16302$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16303    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16304    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16305    if test "x$IS_GNU_MAKE" = x; then
16306      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16307$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16308    else
16309      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16310      if test "x$IS_MODERN_MAKE" = x; then
16311        { $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
16312$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;}
16313      else
16314        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16315          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16316            MAKE_EXPECTED_ENV='cygwin'
16317          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16318            MAKE_EXPECTED_ENV='msys'
16319          else
16320            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16321          fi
16322          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16323          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16324        else
16325          # Not relevant for non-Windows
16326          IS_MAKE_CORRECT_ENV=true
16327        fi
16328        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16329          { $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
16330$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;}
16331        else
16332          FOUND_MAKE=$MAKE_CANDIDATE
16333
16334  # Only process if variable expands to non-empty
16335
16336  if test "x$FOUND_MAKE" != x; then
16337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338
16339  # First separate the path from the arguments. This will split at the first
16340  # space.
16341  complete="$FOUND_MAKE"
16342  path="${complete%% *}"
16343  tmp="$complete EOL"
16344  arguments="${tmp#* }"
16345
16346  # Input might be given as Windows format, start by converting to
16347  # unix format.
16348  new_path=`$CYGPATH -u "$path"`
16349
16350  # Now try to locate executable using which
16351  new_path=`$WHICH "$new_path" 2> /dev/null`
16352  # bat and cmd files are not always considered executable in cygwin causing which
16353  # to not find them
16354  if test "x$new_path" = x \
16355      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16356      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16357    new_path=`$CYGPATH -u "$path"`
16358  fi
16359  if test "x$new_path" = x; then
16360    # Oops. Which didn't find the executable.
16361    # The splitting of arguments from the executable at a space might have been incorrect,
16362    # since paths with space are more likely in Windows. Give it another try with the whole
16363    # argument.
16364    path="$complete"
16365    arguments="EOL"
16366    new_path=`$CYGPATH -u "$path"`
16367    new_path=`$WHICH "$new_path" 2> /dev/null`
16368    # bat and cmd files are not always considered executable in cygwin causing which
16369    # to not find them
16370    if test "x$new_path" = x \
16371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16373      new_path=`$CYGPATH -u "$path"`
16374    fi
16375    if test "x$new_path" = x; then
16376      # It's still not found. Now this is an unrecoverable error.
16377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16378$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16379      has_space=`$ECHO "$complete" | $GREP " "`
16380      if test "x$has_space" != x; then
16381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16383      fi
16384      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16385    fi
16386  fi
16387
16388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16391  # "foo.exe" is OK but "foo" is an error.
16392  #
16393  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16394  # It is also a way to make sure we got the proper file name for the real test later on.
16395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16396  if test "x$test_shortpath" = x; then
16397    # Short path failed, file does not exist as specified.
16398    # Try adding .exe or .cmd
16399    if test -f "${new_path}.exe"; then
16400      input_to_shortpath="${new_path}.exe"
16401    elif test -f "${new_path}.cmd"; then
16402      input_to_shortpath="${new_path}.cmd"
16403    else
16404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16405$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16408      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16409    fi
16410  else
16411    input_to_shortpath="$new_path"
16412  fi
16413
16414  # Call helper function which possibly converts this using DOS-style short mode.
16415  # If so, the updated path is stored in $new_path.
16416  new_path="$input_to_shortpath"
16417
16418  input_path="$input_to_shortpath"
16419  # Check if we need to convert this using DOS-style short mode. If the path
16420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16421  # take no chances and rewrite it.
16422  # Note: m4 eats our [], so we need to use [ and ] instead.
16423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16424  if test "x$has_forbidden_chars" != x; then
16425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16429      # Going to short mode and back again did indeed matter. Since short mode is
16430      # case insensitive, let's make it lowercase to improve readability.
16431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16432      # Now convert it back to Unix-style (cygpath)
16433      input_path=`$CYGPATH -u "$shortmode_path"`
16434      new_path="$input_path"
16435    fi
16436  fi
16437
16438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16439  if test "x$test_cygdrive_prefix" = x; then
16440    # As a simple fix, exclude /usr/bin since it's not a real path.
16441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16443      # a path prefixed by /cygdrive for fixpath to work.
16444      new_path="$CYGWIN_ROOT_PATH$input_path"
16445    fi
16446  fi
16447
16448  # remove trailing .exe if any
16449  new_path="${new_path/%.exe/}"
16450
16451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16452
16453  # First separate the path from the arguments. This will split at the first
16454  # space.
16455  complete="$FOUND_MAKE"
16456  path="${complete%% *}"
16457  tmp="$complete EOL"
16458  arguments="${tmp#* }"
16459
16460  # Input might be given as Windows format, start by converting to
16461  # unix format.
16462  new_path="$path"
16463
16464  windows_path="$new_path"
16465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16466    unix_path=`$CYGPATH -u "$windows_path"`
16467    new_path="$unix_path"
16468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16470    new_path="$unix_path"
16471  fi
16472
16473
16474  # Now try to locate executable using which
16475  new_path=`$WHICH "$new_path" 2> /dev/null`
16476
16477  if test "x$new_path" = x; then
16478    # Oops. Which didn't find the executable.
16479    # The splitting of arguments from the executable at a space might have been incorrect,
16480    # since paths with space are more likely in Windows. Give it another try with the whole
16481    # argument.
16482    path="$complete"
16483    arguments="EOL"
16484    new_path="$path"
16485
16486  windows_path="$new_path"
16487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16488    unix_path=`$CYGPATH -u "$windows_path"`
16489    new_path="$unix_path"
16490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16492    new_path="$unix_path"
16493  fi
16494
16495
16496    new_path=`$WHICH "$new_path" 2> /dev/null`
16497    # bat and cmd files are not always considered executable in MSYS causing which
16498    # to not find them
16499    if test "x$new_path" = x \
16500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16502      new_path="$path"
16503
16504  windows_path="$new_path"
16505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16506    unix_path=`$CYGPATH -u "$windows_path"`
16507    new_path="$unix_path"
16508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16510    new_path="$unix_path"
16511  fi
16512
16513    fi
16514
16515    if test "x$new_path" = x; then
16516      # It's still not found. Now this is an unrecoverable error.
16517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16518$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16519      has_space=`$ECHO "$complete" | $GREP " "`
16520      if test "x$has_space" != x; then
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16523      fi
16524      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16525    fi
16526  fi
16527
16528  # Now new_path has a complete unix path to the binary
16529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16530    # Keep paths in /bin as-is, but remove trailing .exe if any
16531    new_path="${new_path/%.exe/}"
16532    # Do not save /bin paths to all_fixpath_prefixes!
16533  else
16534    # Not in mixed or Windows style, start by that.
16535    new_path=`cmd //c echo $new_path`
16536
16537  input_path="$new_path"
16538  # Check if we need to convert this using DOS-style short mode. If the path
16539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16540  # take no chances and rewrite it.
16541  # Note: m4 eats our [], so we need to use [ and ] instead.
16542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16543  if test "x$has_forbidden_chars" != x; then
16544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16546  fi
16547
16548    # Output is in $new_path
16549
16550  windows_path="$new_path"
16551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16552    unix_path=`$CYGPATH -u "$windows_path"`
16553    new_path="$unix_path"
16554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16556    new_path="$unix_path"
16557  fi
16558
16559    # remove trailing .exe if any
16560    new_path="${new_path/%.exe/}"
16561
16562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16564  fi
16565
16566    else
16567      # We're on a unix platform. Hooray! :)
16568      # First separate the path from the arguments. This will split at the first
16569      # space.
16570      complete="$FOUND_MAKE"
16571      path="${complete%% *}"
16572      tmp="$complete EOL"
16573      arguments="${tmp#* }"
16574
16575      # Cannot rely on the command "which" here since it doesn't always work.
16576      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16577      if test -z "$is_absolute_path"; then
16578        # Path to executable is not absolute. Find it.
16579        IFS_save="$IFS"
16580        IFS=:
16581        for p in $PATH; do
16582          if test -f "$p/$path" && test -x "$p/$path"; then
16583            new_path="$p/$path"
16584            break
16585          fi
16586        done
16587        IFS="$IFS_save"
16588      else
16589        # This is an absolute path, we can use it without further modifications.
16590        new_path="$path"
16591      fi
16592
16593      if test "x$new_path" = x; then
16594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16596        has_space=`$ECHO "$complete" | $GREP " "`
16597        if test "x$has_space" != x; then
16598          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16599$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16600        fi
16601        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16602      fi
16603    fi
16604
16605    # Now join together the path and the arguments once again
16606    if test "x$arguments" != xEOL; then
16607      new_complete="$new_path ${arguments% *}"
16608    else
16609      new_complete="$new_path"
16610    fi
16611
16612    if test "x$complete" != "x$new_complete"; then
16613      FOUND_MAKE="$new_complete"
16614      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16615$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16616    fi
16617  fi
16618
16619        fi
16620      fi
16621    fi
16622  fi
16623
16624    if test "x$FOUND_MAKE" = x; then
16625      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
16626    fi
16627  else
16628    # Try our hardest to locate a correct version of GNU make
16629    for ac_prog in gmake
16630do
16631  # Extract the first word of "$ac_prog", so it can be a program name with args.
16632set dummy $ac_prog; ac_word=$2
16633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16634$as_echo_n "checking for $ac_word... " >&6; }
16635if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16636  $as_echo_n "(cached) " >&6
16637else
16638  case $CHECK_GMAKE in
16639  [\\/]* | ?:[\\/]*)
16640  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16641  ;;
16642  *)
16643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16644for as_dir in $PATH
16645do
16646  IFS=$as_save_IFS
16647  test -z "$as_dir" && as_dir=.
16648    for ac_exec_ext in '' $ac_executable_extensions; do
16649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16650    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16652    break 2
16653  fi
16654done
16655  done
16656IFS=$as_save_IFS
16657
16658  ;;
16659esac
16660fi
16661CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16662if test -n "$CHECK_GMAKE"; then
16663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16664$as_echo "$CHECK_GMAKE" >&6; }
16665else
16666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16667$as_echo "no" >&6; }
16668fi
16669
16670
16671  test -n "$CHECK_GMAKE" && break
16672done
16673
16674
16675  MAKE_CANDIDATE=""$CHECK_GMAKE""
16676  DESCRIPTION="gmake in PATH"
16677
16678  # On Cygwin, we require a newer version of make than on other platforms
16679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680    MAKE_VERSION_EXPR="-e 4\."
16681    MAKE_REQUIRED_VERSION="4.0"
16682   else
16683    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16684    MAKE_REQUIRED_VERSION="3.81"
16685  fi
16686
16687  if test "x$MAKE_CANDIDATE" != x; then
16688    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16689$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16690    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16691    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16692    if test "x$IS_GNU_MAKE" = x; then
16693      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16694$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16695    else
16696      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16697      if test "x$IS_MODERN_MAKE" = x; then
16698        { $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
16699$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;}
16700      else
16701        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16702          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16703            MAKE_EXPECTED_ENV='cygwin'
16704          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16705            MAKE_EXPECTED_ENV='msys'
16706          else
16707            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16708          fi
16709          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16710          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16711        else
16712          # Not relevant for non-Windows
16713          IS_MAKE_CORRECT_ENV=true
16714        fi
16715        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16716          { $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
16717$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;}
16718        else
16719          FOUND_MAKE=$MAKE_CANDIDATE
16720
16721  # Only process if variable expands to non-empty
16722
16723  if test "x$FOUND_MAKE" != x; then
16724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16725
16726  # First separate the path from the arguments. This will split at the first
16727  # space.
16728  complete="$FOUND_MAKE"
16729  path="${complete%% *}"
16730  tmp="$complete EOL"
16731  arguments="${tmp#* }"
16732
16733  # Input might be given as Windows format, start by converting to
16734  # unix format.
16735  new_path=`$CYGPATH -u "$path"`
16736
16737  # Now try to locate executable using which
16738  new_path=`$WHICH "$new_path" 2> /dev/null`
16739  # bat and cmd files are not always considered executable in cygwin causing which
16740  # to not find them
16741  if test "x$new_path" = x \
16742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16744    new_path=`$CYGPATH -u "$path"`
16745  fi
16746  if test "x$new_path" = x; then
16747    # Oops. Which didn't find the executable.
16748    # The splitting of arguments from the executable at a space might have been incorrect,
16749    # since paths with space are more likely in Windows. Give it another try with the whole
16750    # argument.
16751    path="$complete"
16752    arguments="EOL"
16753    new_path=`$CYGPATH -u "$path"`
16754    new_path=`$WHICH "$new_path" 2> /dev/null`
16755    # bat and cmd files are not always considered executable in cygwin causing which
16756    # to not find them
16757    if test "x$new_path" = x \
16758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16760      new_path=`$CYGPATH -u "$path"`
16761    fi
16762    if test "x$new_path" = x; then
16763      # It's still not found. Now this is an unrecoverable error.
16764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16766      has_space=`$ECHO "$complete" | $GREP " "`
16767      if test "x$has_space" != x; then
16768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16770      fi
16771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16772    fi
16773  fi
16774
16775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16778  # "foo.exe" is OK but "foo" is an error.
16779  #
16780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16781  # It is also a way to make sure we got the proper file name for the real test later on.
16782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16783  if test "x$test_shortpath" = x; then
16784    # Short path failed, file does not exist as specified.
16785    # Try adding .exe or .cmd
16786    if test -f "${new_path}.exe"; then
16787      input_to_shortpath="${new_path}.exe"
16788    elif test -f "${new_path}.cmd"; then
16789      input_to_shortpath="${new_path}.cmd"
16790    else
16791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16796    fi
16797  else
16798    input_to_shortpath="$new_path"
16799  fi
16800
16801  # Call helper function which possibly converts this using DOS-style short mode.
16802  # If so, the updated path is stored in $new_path.
16803  new_path="$input_to_shortpath"
16804
16805  input_path="$input_to_shortpath"
16806  # Check if we need to convert this using DOS-style short mode. If the path
16807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16808  # take no chances and rewrite it.
16809  # Note: m4 eats our [], so we need to use [ and ] instead.
16810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16811  if test "x$has_forbidden_chars" != x; then
16812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16816      # Going to short mode and back again did indeed matter. Since short mode is
16817      # case insensitive, let's make it lowercase to improve readability.
16818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16819      # Now convert it back to Unix-style (cygpath)
16820      input_path=`$CYGPATH -u "$shortmode_path"`
16821      new_path="$input_path"
16822    fi
16823  fi
16824
16825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16826  if test "x$test_cygdrive_prefix" = x; then
16827    # As a simple fix, exclude /usr/bin since it's not a real path.
16828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16830      # a path prefixed by /cygdrive for fixpath to work.
16831      new_path="$CYGWIN_ROOT_PATH$input_path"
16832    fi
16833  fi
16834
16835  # remove trailing .exe if any
16836  new_path="${new_path/%.exe/}"
16837
16838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16839
16840  # First separate the path from the arguments. This will split at the first
16841  # space.
16842  complete="$FOUND_MAKE"
16843  path="${complete%% *}"
16844  tmp="$complete EOL"
16845  arguments="${tmp#* }"
16846
16847  # Input might be given as Windows format, start by converting to
16848  # unix format.
16849  new_path="$path"
16850
16851  windows_path="$new_path"
16852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16853    unix_path=`$CYGPATH -u "$windows_path"`
16854    new_path="$unix_path"
16855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16857    new_path="$unix_path"
16858  fi
16859
16860
16861  # Now try to locate executable using which
16862  new_path=`$WHICH "$new_path" 2> /dev/null`
16863
16864  if test "x$new_path" = x; then
16865    # Oops. Which didn't find the executable.
16866    # The splitting of arguments from the executable at a space might have been incorrect,
16867    # since paths with space are more likely in Windows. Give it another try with the whole
16868    # argument.
16869    path="$complete"
16870    arguments="EOL"
16871    new_path="$path"
16872
16873  windows_path="$new_path"
16874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16875    unix_path=`$CYGPATH -u "$windows_path"`
16876    new_path="$unix_path"
16877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16879    new_path="$unix_path"
16880  fi
16881
16882
16883    new_path=`$WHICH "$new_path" 2> /dev/null`
16884    # bat and cmd files are not always considered executable in MSYS causing which
16885    # to not find them
16886    if test "x$new_path" = x \
16887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16889      new_path="$path"
16890
16891  windows_path="$new_path"
16892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16893    unix_path=`$CYGPATH -u "$windows_path"`
16894    new_path="$unix_path"
16895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16897    new_path="$unix_path"
16898  fi
16899
16900    fi
16901
16902    if test "x$new_path" = x; then
16903      # It's still not found. Now this is an unrecoverable error.
16904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16906      has_space=`$ECHO "$complete" | $GREP " "`
16907      if test "x$has_space" != x; then
16908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16910      fi
16911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16912    fi
16913  fi
16914
16915  # Now new_path has a complete unix path to the binary
16916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16917    # Keep paths in /bin as-is, but remove trailing .exe if any
16918    new_path="${new_path/%.exe/}"
16919    # Do not save /bin paths to all_fixpath_prefixes!
16920  else
16921    # Not in mixed or Windows style, start by that.
16922    new_path=`cmd //c echo $new_path`
16923
16924  input_path="$new_path"
16925  # Check if we need to convert this using DOS-style short mode. If the path
16926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16927  # take no chances and rewrite it.
16928  # Note: m4 eats our [], so we need to use [ and ] instead.
16929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16930  if test "x$has_forbidden_chars" != x; then
16931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16933  fi
16934
16935    # Output is in $new_path
16936
16937  windows_path="$new_path"
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939    unix_path=`$CYGPATH -u "$windows_path"`
16940    new_path="$unix_path"
16941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16943    new_path="$unix_path"
16944  fi
16945
16946    # remove trailing .exe if any
16947    new_path="${new_path/%.exe/}"
16948
16949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16951  fi
16952
16953    else
16954      # We're on a unix platform. Hooray! :)
16955      # First separate the path from the arguments. This will split at the first
16956      # space.
16957      complete="$FOUND_MAKE"
16958      path="${complete%% *}"
16959      tmp="$complete EOL"
16960      arguments="${tmp#* }"
16961
16962      # Cannot rely on the command "which" here since it doesn't always work.
16963      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16964      if test -z "$is_absolute_path"; then
16965        # Path to executable is not absolute. Find it.
16966        IFS_save="$IFS"
16967        IFS=:
16968        for p in $PATH; do
16969          if test -f "$p/$path" && test -x "$p/$path"; then
16970            new_path="$p/$path"
16971            break
16972          fi
16973        done
16974        IFS="$IFS_save"
16975      else
16976        # This is an absolute path, we can use it without further modifications.
16977        new_path="$path"
16978      fi
16979
16980      if test "x$new_path" = x; then
16981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16982$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16983        has_space=`$ECHO "$complete" | $GREP " "`
16984        if test "x$has_space" != x; then
16985          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16987        fi
16988        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16989      fi
16990    fi
16991
16992    # Now join together the path and the arguments once again
16993    if test "x$arguments" != xEOL; then
16994      new_complete="$new_path ${arguments% *}"
16995    else
16996      new_complete="$new_path"
16997    fi
16998
16999    if test "x$complete" != "x$new_complete"; then
17000      FOUND_MAKE="$new_complete"
17001      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17002$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17003    fi
17004  fi
17005
17006        fi
17007      fi
17008    fi
17009  fi
17010
17011
17012    if test "x$FOUND_MAKE" = x; then
17013      for ac_prog in make
17014do
17015  # Extract the first word of "$ac_prog", so it can be a program name with args.
17016set dummy $ac_prog; ac_word=$2
17017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17018$as_echo_n "checking for $ac_word... " >&6; }
17019if ${ac_cv_path_CHECK_MAKE+:} false; then :
17020  $as_echo_n "(cached) " >&6
17021else
17022  case $CHECK_MAKE in
17023  [\\/]* | ?:[\\/]*)
17024  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17025  ;;
17026  *)
17027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17028for as_dir in $PATH
17029do
17030  IFS=$as_save_IFS
17031  test -z "$as_dir" && as_dir=.
17032    for ac_exec_ext in '' $ac_executable_extensions; do
17033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17034    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17036    break 2
17037  fi
17038done
17039  done
17040IFS=$as_save_IFS
17041
17042  ;;
17043esac
17044fi
17045CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17046if test -n "$CHECK_MAKE"; then
17047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17048$as_echo "$CHECK_MAKE" >&6; }
17049else
17050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17051$as_echo "no" >&6; }
17052fi
17053
17054
17055  test -n "$CHECK_MAKE" && break
17056done
17057
17058
17059  MAKE_CANDIDATE=""$CHECK_MAKE""
17060  DESCRIPTION="make in PATH"
17061
17062  # On Cygwin, we require a newer version of make than on other platforms
17063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064    MAKE_VERSION_EXPR="-e 4\."
17065    MAKE_REQUIRED_VERSION="4.0"
17066   else
17067    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17068    MAKE_REQUIRED_VERSION="3.81"
17069  fi
17070
17071  if test "x$MAKE_CANDIDATE" != x; then
17072    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17073$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17074    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17075    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17076    if test "x$IS_GNU_MAKE" = x; then
17077      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17078$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17079    else
17080      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17081      if test "x$IS_MODERN_MAKE" = x; then
17082        { $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
17083$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;}
17084      else
17085        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17086          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17087            MAKE_EXPECTED_ENV='cygwin'
17088          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17089            MAKE_EXPECTED_ENV='msys'
17090          else
17091            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17092          fi
17093          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17094          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17095        else
17096          # Not relevant for non-Windows
17097          IS_MAKE_CORRECT_ENV=true
17098        fi
17099        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17100          { $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
17101$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;}
17102        else
17103          FOUND_MAKE=$MAKE_CANDIDATE
17104
17105  # Only process if variable expands to non-empty
17106
17107  if test "x$FOUND_MAKE" != x; then
17108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17109
17110  # First separate the path from the arguments. This will split at the first
17111  # space.
17112  complete="$FOUND_MAKE"
17113  path="${complete%% *}"
17114  tmp="$complete EOL"
17115  arguments="${tmp#* }"
17116
17117  # Input might be given as Windows format, start by converting to
17118  # unix format.
17119  new_path=`$CYGPATH -u "$path"`
17120
17121  # Now try to locate executable using which
17122  new_path=`$WHICH "$new_path" 2> /dev/null`
17123  # bat and cmd files are not always considered executable in cygwin causing which
17124  # to not find them
17125  if test "x$new_path" = x \
17126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17128    new_path=`$CYGPATH -u "$path"`
17129  fi
17130  if test "x$new_path" = x; then
17131    # Oops. Which didn't find the executable.
17132    # The splitting of arguments from the executable at a space might have been incorrect,
17133    # since paths with space are more likely in Windows. Give it another try with the whole
17134    # argument.
17135    path="$complete"
17136    arguments="EOL"
17137    new_path=`$CYGPATH -u "$path"`
17138    new_path=`$WHICH "$new_path" 2> /dev/null`
17139    # bat and cmd files are not always considered executable in cygwin causing which
17140    # to not find them
17141    if test "x$new_path" = x \
17142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17144      new_path=`$CYGPATH -u "$path"`
17145    fi
17146    if test "x$new_path" = x; then
17147      # It's still not found. Now this is an unrecoverable error.
17148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17149$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17150      has_space=`$ECHO "$complete" | $GREP " "`
17151      if test "x$has_space" != x; then
17152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17154      fi
17155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17156    fi
17157  fi
17158
17159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17162  # "foo.exe" is OK but "foo" is an error.
17163  #
17164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17165  # It is also a way to make sure we got the proper file name for the real test later on.
17166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17167  if test "x$test_shortpath" = x; then
17168    # Short path failed, file does not exist as specified.
17169    # Try adding .exe or .cmd
17170    if test -f "${new_path}.exe"; then
17171      input_to_shortpath="${new_path}.exe"
17172    elif test -f "${new_path}.cmd"; then
17173      input_to_shortpath="${new_path}.cmd"
17174    else
17175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17180    fi
17181  else
17182    input_to_shortpath="$new_path"
17183  fi
17184
17185  # Call helper function which possibly converts this using DOS-style short mode.
17186  # If so, the updated path is stored in $new_path.
17187  new_path="$input_to_shortpath"
17188
17189  input_path="$input_to_shortpath"
17190  # Check if we need to convert this using DOS-style short mode. If the path
17191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17192  # take no chances and rewrite it.
17193  # Note: m4 eats our [], so we need to use [ and ] instead.
17194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17195  if test "x$has_forbidden_chars" != x; then
17196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17200      # Going to short mode and back again did indeed matter. Since short mode is
17201      # case insensitive, let's make it lowercase to improve readability.
17202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17203      # Now convert it back to Unix-style (cygpath)
17204      input_path=`$CYGPATH -u "$shortmode_path"`
17205      new_path="$input_path"
17206    fi
17207  fi
17208
17209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17210  if test "x$test_cygdrive_prefix" = x; then
17211    # As a simple fix, exclude /usr/bin since it's not a real path.
17212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17214      # a path prefixed by /cygdrive for fixpath to work.
17215      new_path="$CYGWIN_ROOT_PATH$input_path"
17216    fi
17217  fi
17218
17219  # remove trailing .exe if any
17220  new_path="${new_path/%.exe/}"
17221
17222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17223
17224  # First separate the path from the arguments. This will split at the first
17225  # space.
17226  complete="$FOUND_MAKE"
17227  path="${complete%% *}"
17228  tmp="$complete EOL"
17229  arguments="${tmp#* }"
17230
17231  # Input might be given as Windows format, start by converting to
17232  # unix format.
17233  new_path="$path"
17234
17235  windows_path="$new_path"
17236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17237    unix_path=`$CYGPATH -u "$windows_path"`
17238    new_path="$unix_path"
17239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17241    new_path="$unix_path"
17242  fi
17243
17244
17245  # Now try to locate executable using which
17246  new_path=`$WHICH "$new_path" 2> /dev/null`
17247
17248  if test "x$new_path" = x; then
17249    # Oops. Which didn't find the executable.
17250    # The splitting of arguments from the executable at a space might have been incorrect,
17251    # since paths with space are more likely in Windows. Give it another try with the whole
17252    # argument.
17253    path="$complete"
17254    arguments="EOL"
17255    new_path="$path"
17256
17257  windows_path="$new_path"
17258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17259    unix_path=`$CYGPATH -u "$windows_path"`
17260    new_path="$unix_path"
17261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17263    new_path="$unix_path"
17264  fi
17265
17266
17267    new_path=`$WHICH "$new_path" 2> /dev/null`
17268    # bat and cmd files are not always considered executable in MSYS causing which
17269    # to not find them
17270    if test "x$new_path" = x \
17271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17273      new_path="$path"
17274
17275  windows_path="$new_path"
17276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17277    unix_path=`$CYGPATH -u "$windows_path"`
17278    new_path="$unix_path"
17279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17281    new_path="$unix_path"
17282  fi
17283
17284    fi
17285
17286    if test "x$new_path" = x; then
17287      # It's still not found. Now this is an unrecoverable error.
17288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17289$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17290      has_space=`$ECHO "$complete" | $GREP " "`
17291      if test "x$has_space" != x; then
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17294      fi
17295      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17296    fi
17297  fi
17298
17299  # Now new_path has a complete unix path to the binary
17300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17301    # Keep paths in /bin as-is, but remove trailing .exe if any
17302    new_path="${new_path/%.exe/}"
17303    # Do not save /bin paths to all_fixpath_prefixes!
17304  else
17305    # Not in mixed or Windows style, start by that.
17306    new_path=`cmd //c echo $new_path`
17307
17308  input_path="$new_path"
17309  # Check if we need to convert this using DOS-style short mode. If the path
17310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17311  # take no chances and rewrite it.
17312  # Note: m4 eats our [], so we need to use [ and ] instead.
17313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17314  if test "x$has_forbidden_chars" != x; then
17315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17317  fi
17318
17319    # Output is in $new_path
17320
17321  windows_path="$new_path"
17322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17323    unix_path=`$CYGPATH -u "$windows_path"`
17324    new_path="$unix_path"
17325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17327    new_path="$unix_path"
17328  fi
17329
17330    # remove trailing .exe if any
17331    new_path="${new_path/%.exe/}"
17332
17333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17335  fi
17336
17337    else
17338      # We're on a unix platform. Hooray! :)
17339      # First separate the path from the arguments. This will split at the first
17340      # space.
17341      complete="$FOUND_MAKE"
17342      path="${complete%% *}"
17343      tmp="$complete EOL"
17344      arguments="${tmp#* }"
17345
17346      # Cannot rely on the command "which" here since it doesn't always work.
17347      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17348      if test -z "$is_absolute_path"; then
17349        # Path to executable is not absolute. Find it.
17350        IFS_save="$IFS"
17351        IFS=:
17352        for p in $PATH; do
17353          if test -f "$p/$path" && test -x "$p/$path"; then
17354            new_path="$p/$path"
17355            break
17356          fi
17357        done
17358        IFS="$IFS_save"
17359      else
17360        # This is an absolute path, we can use it without further modifications.
17361        new_path="$path"
17362      fi
17363
17364      if test "x$new_path" = x; then
17365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17366$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17367        has_space=`$ECHO "$complete" | $GREP " "`
17368        if test "x$has_space" != x; then
17369          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17371        fi
17372        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17373      fi
17374    fi
17375
17376    # Now join together the path and the arguments once again
17377    if test "x$arguments" != xEOL; then
17378      new_complete="$new_path ${arguments% *}"
17379    else
17380      new_complete="$new_path"
17381    fi
17382
17383    if test "x$complete" != "x$new_complete"; then
17384      FOUND_MAKE="$new_complete"
17385      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17386$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17387    fi
17388  fi
17389
17390        fi
17391      fi
17392    fi
17393  fi
17394
17395    fi
17396
17397    if test "x$FOUND_MAKE" = x; then
17398      if test "x$TOOLCHAIN_PATH" != x; then
17399        # We have a toolchain path, check that as well before giving up.
17400        OLD_PATH=$PATH
17401        PATH=$TOOLCHAIN_PATH:$PATH
17402        for ac_prog in gmake
17403do
17404  # Extract the first word of "$ac_prog", so it can be a program name with args.
17405set dummy $ac_prog; ac_word=$2
17406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17407$as_echo_n "checking for $ac_word... " >&6; }
17408if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17409  $as_echo_n "(cached) " >&6
17410else
17411  case $CHECK_TOOLSDIR_GMAKE in
17412  [\\/]* | ?:[\\/]*)
17413  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17414  ;;
17415  *)
17416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17417for as_dir in $PATH
17418do
17419  IFS=$as_save_IFS
17420  test -z "$as_dir" && as_dir=.
17421    for ac_exec_ext in '' $ac_executable_extensions; do
17422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17423    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17425    break 2
17426  fi
17427done
17428  done
17429IFS=$as_save_IFS
17430
17431  ;;
17432esac
17433fi
17434CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17435if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17437$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17438else
17439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17440$as_echo "no" >&6; }
17441fi
17442
17443
17444  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17445done
17446
17447
17448  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17449  DESCRIPTION="gmake in tools-dir"
17450
17451  # On Cygwin, we require a newer version of make than on other platforms
17452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17453    MAKE_VERSION_EXPR="-e 4\."
17454    MAKE_REQUIRED_VERSION="4.0"
17455   else
17456    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17457    MAKE_REQUIRED_VERSION="3.81"
17458  fi
17459
17460  if test "x$MAKE_CANDIDATE" != x; then
17461    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17462$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17463    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17464    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17465    if test "x$IS_GNU_MAKE" = x; then
17466      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17467$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17468    else
17469      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17470      if test "x$IS_MODERN_MAKE" = x; then
17471        { $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
17472$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;}
17473      else
17474        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17475          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17476            MAKE_EXPECTED_ENV='cygwin'
17477          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17478            MAKE_EXPECTED_ENV='msys'
17479          else
17480            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17481          fi
17482          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17483          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17484        else
17485          # Not relevant for non-Windows
17486          IS_MAKE_CORRECT_ENV=true
17487        fi
17488        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17489          { $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
17490$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;}
17491        else
17492          FOUND_MAKE=$MAKE_CANDIDATE
17493
17494  # Only process if variable expands to non-empty
17495
17496  if test "x$FOUND_MAKE" != x; then
17497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17498
17499  # First separate the path from the arguments. This will split at the first
17500  # space.
17501  complete="$FOUND_MAKE"
17502  path="${complete%% *}"
17503  tmp="$complete EOL"
17504  arguments="${tmp#* }"
17505
17506  # Input might be given as Windows format, start by converting to
17507  # unix format.
17508  new_path=`$CYGPATH -u "$path"`
17509
17510  # Now try to locate executable using which
17511  new_path=`$WHICH "$new_path" 2> /dev/null`
17512  # bat and cmd files are not always considered executable in cygwin causing which
17513  # to not find them
17514  if test "x$new_path" = x \
17515      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17516      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17517    new_path=`$CYGPATH -u "$path"`
17518  fi
17519  if test "x$new_path" = x; then
17520    # Oops. Which didn't find the executable.
17521    # The splitting of arguments from the executable at a space might have been incorrect,
17522    # since paths with space are more likely in Windows. Give it another try with the whole
17523    # argument.
17524    path="$complete"
17525    arguments="EOL"
17526    new_path=`$CYGPATH -u "$path"`
17527    new_path=`$WHICH "$new_path" 2> /dev/null`
17528    # bat and cmd files are not always considered executable in cygwin causing which
17529    # to not find them
17530    if test "x$new_path" = x \
17531        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17532        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17533      new_path=`$CYGPATH -u "$path"`
17534    fi
17535    if test "x$new_path" = x; then
17536      # It's still not found. Now this is an unrecoverable error.
17537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17538$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17539      has_space=`$ECHO "$complete" | $GREP " "`
17540      if test "x$has_space" != x; then
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17543      fi
17544      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17545    fi
17546  fi
17547
17548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17551  # "foo.exe" is OK but "foo" is an error.
17552  #
17553  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17554  # It is also a way to make sure we got the proper file name for the real test later on.
17555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17556  if test "x$test_shortpath" = x; then
17557    # Short path failed, file does not exist as specified.
17558    # Try adding .exe or .cmd
17559    if test -f "${new_path}.exe"; then
17560      input_to_shortpath="${new_path}.exe"
17561    elif test -f "${new_path}.cmd"; then
17562      input_to_shortpath="${new_path}.cmd"
17563    else
17564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17566      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17567$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17568      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17569    fi
17570  else
17571    input_to_shortpath="$new_path"
17572  fi
17573
17574  # Call helper function which possibly converts this using DOS-style short mode.
17575  # If so, the updated path is stored in $new_path.
17576  new_path="$input_to_shortpath"
17577
17578  input_path="$input_to_shortpath"
17579  # Check if we need to convert this using DOS-style short mode. If the path
17580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17581  # take no chances and rewrite it.
17582  # Note: m4 eats our [], so we need to use [ and ] instead.
17583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17584  if test "x$has_forbidden_chars" != x; then
17585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17589      # Going to short mode and back again did indeed matter. Since short mode is
17590      # case insensitive, let's make it lowercase to improve readability.
17591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17592      # Now convert it back to Unix-style (cygpath)
17593      input_path=`$CYGPATH -u "$shortmode_path"`
17594      new_path="$input_path"
17595    fi
17596  fi
17597
17598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17599  if test "x$test_cygdrive_prefix" = x; then
17600    # As a simple fix, exclude /usr/bin since it's not a real path.
17601    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17603      # a path prefixed by /cygdrive for fixpath to work.
17604      new_path="$CYGWIN_ROOT_PATH$input_path"
17605    fi
17606  fi
17607
17608  # remove trailing .exe if any
17609  new_path="${new_path/%.exe/}"
17610
17611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17612
17613  # First separate the path from the arguments. This will split at the first
17614  # space.
17615  complete="$FOUND_MAKE"
17616  path="${complete%% *}"
17617  tmp="$complete EOL"
17618  arguments="${tmp#* }"
17619
17620  # Input might be given as Windows format, start by converting to
17621  # unix format.
17622  new_path="$path"
17623
17624  windows_path="$new_path"
17625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17626    unix_path=`$CYGPATH -u "$windows_path"`
17627    new_path="$unix_path"
17628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17630    new_path="$unix_path"
17631  fi
17632
17633
17634  # Now try to locate executable using which
17635  new_path=`$WHICH "$new_path" 2> /dev/null`
17636
17637  if test "x$new_path" = x; then
17638    # Oops. Which didn't find the executable.
17639    # The splitting of arguments from the executable at a space might have been incorrect,
17640    # since paths with space are more likely in Windows. Give it another try with the whole
17641    # argument.
17642    path="$complete"
17643    arguments="EOL"
17644    new_path="$path"
17645
17646  windows_path="$new_path"
17647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17648    unix_path=`$CYGPATH -u "$windows_path"`
17649    new_path="$unix_path"
17650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17652    new_path="$unix_path"
17653  fi
17654
17655
17656    new_path=`$WHICH "$new_path" 2> /dev/null`
17657    # bat and cmd files are not always considered executable in MSYS causing which
17658    # to not find them
17659    if test "x$new_path" = x \
17660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662      new_path="$path"
17663
17664  windows_path="$new_path"
17665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17666    unix_path=`$CYGPATH -u "$windows_path"`
17667    new_path="$unix_path"
17668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17670    new_path="$unix_path"
17671  fi
17672
17673    fi
17674
17675    if test "x$new_path" = x; then
17676      # It's still not found. Now this is an unrecoverable error.
17677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17678$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17679      has_space=`$ECHO "$complete" | $GREP " "`
17680      if test "x$has_space" != x; then
17681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17683      fi
17684      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17685    fi
17686  fi
17687
17688  # Now new_path has a complete unix path to the binary
17689  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17690    # Keep paths in /bin as-is, but remove trailing .exe if any
17691    new_path="${new_path/%.exe/}"
17692    # Do not save /bin paths to all_fixpath_prefixes!
17693  else
17694    # Not in mixed or Windows style, start by that.
17695    new_path=`cmd //c echo $new_path`
17696
17697  input_path="$new_path"
17698  # Check if we need to convert this using DOS-style short mode. If the path
17699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17700  # take no chances and rewrite it.
17701  # Note: m4 eats our [], so we need to use [ and ] instead.
17702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17703  if test "x$has_forbidden_chars" != x; then
17704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17706  fi
17707
17708    # Output is in $new_path
17709
17710  windows_path="$new_path"
17711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17712    unix_path=`$CYGPATH -u "$windows_path"`
17713    new_path="$unix_path"
17714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17716    new_path="$unix_path"
17717  fi
17718
17719    # remove trailing .exe if any
17720    new_path="${new_path/%.exe/}"
17721
17722    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17723    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17724  fi
17725
17726    else
17727      # We're on a unix platform. Hooray! :)
17728      # First separate the path from the arguments. This will split at the first
17729      # space.
17730      complete="$FOUND_MAKE"
17731      path="${complete%% *}"
17732      tmp="$complete EOL"
17733      arguments="${tmp#* }"
17734
17735      # Cannot rely on the command "which" here since it doesn't always work.
17736      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17737      if test -z "$is_absolute_path"; then
17738        # Path to executable is not absolute. Find it.
17739        IFS_save="$IFS"
17740        IFS=:
17741        for p in $PATH; do
17742          if test -f "$p/$path" && test -x "$p/$path"; then
17743            new_path="$p/$path"
17744            break
17745          fi
17746        done
17747        IFS="$IFS_save"
17748      else
17749        # This is an absolute path, we can use it without further modifications.
17750        new_path="$path"
17751      fi
17752
17753      if test "x$new_path" = x; then
17754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17756        has_space=`$ECHO "$complete" | $GREP " "`
17757        if test "x$has_space" != x; then
17758          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17759$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17760        fi
17761        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17762      fi
17763    fi
17764
17765    # Now join together the path and the arguments once again
17766    if test "x$arguments" != xEOL; then
17767      new_complete="$new_path ${arguments% *}"
17768    else
17769      new_complete="$new_path"
17770    fi
17771
17772    if test "x$complete" != "x$new_complete"; then
17773      FOUND_MAKE="$new_complete"
17774      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17775$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17776    fi
17777  fi
17778
17779        fi
17780      fi
17781    fi
17782  fi
17783
17784        if test "x$FOUND_MAKE" = x; then
17785          for ac_prog in make
17786do
17787  # Extract the first word of "$ac_prog", so it can be a program name with args.
17788set dummy $ac_prog; ac_word=$2
17789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17790$as_echo_n "checking for $ac_word... " >&6; }
17791if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17792  $as_echo_n "(cached) " >&6
17793else
17794  case $CHECK_TOOLSDIR_MAKE in
17795  [\\/]* | ?:[\\/]*)
17796  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17797  ;;
17798  *)
17799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17800for as_dir in $PATH
17801do
17802  IFS=$as_save_IFS
17803  test -z "$as_dir" && as_dir=.
17804    for ac_exec_ext in '' $ac_executable_extensions; do
17805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17806    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17808    break 2
17809  fi
17810done
17811  done
17812IFS=$as_save_IFS
17813
17814  ;;
17815esac
17816fi
17817CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17818if test -n "$CHECK_TOOLSDIR_MAKE"; then
17819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17820$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17821else
17822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17823$as_echo "no" >&6; }
17824fi
17825
17826
17827  test -n "$CHECK_TOOLSDIR_MAKE" && break
17828done
17829
17830
17831  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17832  DESCRIPTION="make in tools-dir"
17833
17834  # On Cygwin, we require a newer version of make than on other platforms
17835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17836    MAKE_VERSION_EXPR="-e 4\."
17837    MAKE_REQUIRED_VERSION="4.0"
17838   else
17839    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17840    MAKE_REQUIRED_VERSION="3.81"
17841  fi
17842
17843  if test "x$MAKE_CANDIDATE" != x; then
17844    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17845$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17846    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17847    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17848    if test "x$IS_GNU_MAKE" = x; then
17849      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17850$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17851    else
17852      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17853      if test "x$IS_MODERN_MAKE" = x; then
17854        { $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
17855$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;}
17856      else
17857        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17858          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17859            MAKE_EXPECTED_ENV='cygwin'
17860          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17861            MAKE_EXPECTED_ENV='msys'
17862          else
17863            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17864          fi
17865          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17866          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17867        else
17868          # Not relevant for non-Windows
17869          IS_MAKE_CORRECT_ENV=true
17870        fi
17871        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17872          { $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
17873$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;}
17874        else
17875          FOUND_MAKE=$MAKE_CANDIDATE
17876
17877  # Only process if variable expands to non-empty
17878
17879  if test "x$FOUND_MAKE" != x; then
17880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17881
17882  # First separate the path from the arguments. This will split at the first
17883  # space.
17884  complete="$FOUND_MAKE"
17885  path="${complete%% *}"
17886  tmp="$complete EOL"
17887  arguments="${tmp#* }"
17888
17889  # Input might be given as Windows format, start by converting to
17890  # unix format.
17891  new_path=`$CYGPATH -u "$path"`
17892
17893  # Now try to locate executable using which
17894  new_path=`$WHICH "$new_path" 2> /dev/null`
17895  # bat and cmd files are not always considered executable in cygwin causing which
17896  # to not find them
17897  if test "x$new_path" = x \
17898      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17899      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17900    new_path=`$CYGPATH -u "$path"`
17901  fi
17902  if test "x$new_path" = x; then
17903    # Oops. Which didn't find the executable.
17904    # The splitting of arguments from the executable at a space might have been incorrect,
17905    # since paths with space are more likely in Windows. Give it another try with the whole
17906    # argument.
17907    path="$complete"
17908    arguments="EOL"
17909    new_path=`$CYGPATH -u "$path"`
17910    new_path=`$WHICH "$new_path" 2> /dev/null`
17911    # bat and cmd files are not always considered executable in cygwin causing which
17912    # to not find them
17913    if test "x$new_path" = x \
17914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17916      new_path=`$CYGPATH -u "$path"`
17917    fi
17918    if test "x$new_path" = x; then
17919      # It's still not found. Now this is an unrecoverable error.
17920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17921$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17922      has_space=`$ECHO "$complete" | $GREP " "`
17923      if test "x$has_space" != x; then
17924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17926      fi
17927      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17928    fi
17929  fi
17930
17931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17934  # "foo.exe" is OK but "foo" is an error.
17935  #
17936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17937  # It is also a way to make sure we got the proper file name for the real test later on.
17938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17939  if test "x$test_shortpath" = x; then
17940    # Short path failed, file does not exist as specified.
17941    # Try adding .exe or .cmd
17942    if test -f "${new_path}.exe"; then
17943      input_to_shortpath="${new_path}.exe"
17944    elif test -f "${new_path}.cmd"; then
17945      input_to_shortpath="${new_path}.cmd"
17946    else
17947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17948$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17951      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17952    fi
17953  else
17954    input_to_shortpath="$new_path"
17955  fi
17956
17957  # Call helper function which possibly converts this using DOS-style short mode.
17958  # If so, the updated path is stored in $new_path.
17959  new_path="$input_to_shortpath"
17960
17961  input_path="$input_to_shortpath"
17962  # Check if we need to convert this using DOS-style short mode. If the path
17963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17964  # take no chances and rewrite it.
17965  # Note: m4 eats our [], so we need to use [ and ] instead.
17966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17967  if test "x$has_forbidden_chars" != x; then
17968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17972      # Going to short mode and back again did indeed matter. Since short mode is
17973      # case insensitive, let's make it lowercase to improve readability.
17974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17975      # Now convert it back to Unix-style (cygpath)
17976      input_path=`$CYGPATH -u "$shortmode_path"`
17977      new_path="$input_path"
17978    fi
17979  fi
17980
17981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17982  if test "x$test_cygdrive_prefix" = x; then
17983    # As a simple fix, exclude /usr/bin since it's not a real path.
17984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17986      # a path prefixed by /cygdrive for fixpath to work.
17987      new_path="$CYGWIN_ROOT_PATH$input_path"
17988    fi
17989  fi
17990
17991  # remove trailing .exe if any
17992  new_path="${new_path/%.exe/}"
17993
17994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17995
17996  # First separate the path from the arguments. This will split at the first
17997  # space.
17998  complete="$FOUND_MAKE"
17999  path="${complete%% *}"
18000  tmp="$complete EOL"
18001  arguments="${tmp#* }"
18002
18003  # Input might be given as Windows format, start by converting to
18004  # unix format.
18005  new_path="$path"
18006
18007  windows_path="$new_path"
18008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18009    unix_path=`$CYGPATH -u "$windows_path"`
18010    new_path="$unix_path"
18011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18013    new_path="$unix_path"
18014  fi
18015
18016
18017  # Now try to locate executable using which
18018  new_path=`$WHICH "$new_path" 2> /dev/null`
18019
18020  if test "x$new_path" = x; then
18021    # Oops. Which didn't find the executable.
18022    # The splitting of arguments from the executable at a space might have been incorrect,
18023    # since paths with space are more likely in Windows. Give it another try with the whole
18024    # argument.
18025    path="$complete"
18026    arguments="EOL"
18027    new_path="$path"
18028
18029  windows_path="$new_path"
18030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18031    unix_path=`$CYGPATH -u "$windows_path"`
18032    new_path="$unix_path"
18033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18035    new_path="$unix_path"
18036  fi
18037
18038
18039    new_path=`$WHICH "$new_path" 2> /dev/null`
18040    # bat and cmd files are not always considered executable in MSYS causing which
18041    # to not find them
18042    if test "x$new_path" = x \
18043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18045      new_path="$path"
18046
18047  windows_path="$new_path"
18048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18049    unix_path=`$CYGPATH -u "$windows_path"`
18050    new_path="$unix_path"
18051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18053    new_path="$unix_path"
18054  fi
18055
18056    fi
18057
18058    if test "x$new_path" = x; then
18059      # It's still not found. Now this is an unrecoverable error.
18060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18062      has_space=`$ECHO "$complete" | $GREP " "`
18063      if test "x$has_space" != x; then
18064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18066      fi
18067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18068    fi
18069  fi
18070
18071  # Now new_path has a complete unix path to the binary
18072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18073    # Keep paths in /bin as-is, but remove trailing .exe if any
18074    new_path="${new_path/%.exe/}"
18075    # Do not save /bin paths to all_fixpath_prefixes!
18076  else
18077    # Not in mixed or Windows style, start by that.
18078    new_path=`cmd //c echo $new_path`
18079
18080  input_path="$new_path"
18081  # Check if we need to convert this using DOS-style short mode. If the path
18082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18083  # take no chances and rewrite it.
18084  # Note: m4 eats our [], so we need to use [ and ] instead.
18085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18086  if test "x$has_forbidden_chars" != x; then
18087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18089  fi
18090
18091    # Output is in $new_path
18092
18093  windows_path="$new_path"
18094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18095    unix_path=`$CYGPATH -u "$windows_path"`
18096    new_path="$unix_path"
18097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18099    new_path="$unix_path"
18100  fi
18101
18102    # remove trailing .exe if any
18103    new_path="${new_path/%.exe/}"
18104
18105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18107  fi
18108
18109    else
18110      # We're on a unix platform. Hooray! :)
18111      # First separate the path from the arguments. This will split at the first
18112      # space.
18113      complete="$FOUND_MAKE"
18114      path="${complete%% *}"
18115      tmp="$complete EOL"
18116      arguments="${tmp#* }"
18117
18118      # Cannot rely on the command "which" here since it doesn't always work.
18119      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18120      if test -z "$is_absolute_path"; then
18121        # Path to executable is not absolute. Find it.
18122        IFS_save="$IFS"
18123        IFS=:
18124        for p in $PATH; do
18125          if test -f "$p/$path" && test -x "$p/$path"; then
18126            new_path="$p/$path"
18127            break
18128          fi
18129        done
18130        IFS="$IFS_save"
18131      else
18132        # This is an absolute path, we can use it without further modifications.
18133        new_path="$path"
18134      fi
18135
18136      if test "x$new_path" = x; then
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18139        has_space=`$ECHO "$complete" | $GREP " "`
18140        if test "x$has_space" != x; then
18141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18143        fi
18144        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18145      fi
18146    fi
18147
18148    # Now join together the path and the arguments once again
18149    if test "x$arguments" != xEOL; then
18150      new_complete="$new_path ${arguments% *}"
18151    else
18152      new_complete="$new_path"
18153    fi
18154
18155    if test "x$complete" != "x$new_complete"; then
18156      FOUND_MAKE="$new_complete"
18157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18158$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18159    fi
18160  fi
18161
18162        fi
18163      fi
18164    fi
18165  fi
18166
18167        fi
18168        PATH=$OLD_PATH
18169      fi
18170    fi
18171
18172    if test "x$FOUND_MAKE" = x; then
18173      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
18174    fi
18175  fi
18176
18177  MAKE=$FOUND_MAKE
18178
18179  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
18180$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
18181
18182
18183  # Check if make supports the output sync option and if so, setup using it.
18184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
18185$as_echo_n "checking if make --output-sync is supported... " >&6; }
18186  if $MAKE --version -O > /dev/null 2>&1; then
18187    OUTPUT_SYNC_SUPPORTED=true
18188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18189$as_echo "yes" >&6; }
18190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
18191$as_echo_n "checking for output-sync value... " >&6; }
18192
18193# Check whether --with-output-sync was given.
18194if test "${with_output_sync+set}" = set; then :
18195  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
18196fi
18197
18198    if test "x$OUTPUT_SYNC" = "x"; then
18199      OUTPUT_SYNC=none
18200    fi
18201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
18202$as_echo "$OUTPUT_SYNC" >&6; }
18203    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
18204      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
18205    fi
18206  else
18207    OUTPUT_SYNC_SUPPORTED=false
18208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209$as_echo "no" >&6; }
18210  fi
18211
18212
18213
18214
18215
18216
18217  # Test if find supports -delete
18218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
18219$as_echo_n "checking if find supports -delete... " >&6; }
18220  FIND_DELETE="-delete"
18221
18222  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
18223
18224  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
18225
18226  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
18227  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
18228    # No, it does not.
18229    rm $DELETEDIR/TestIfFindSupportsDelete
18230    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
18231      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
18232      FIND_DELETE="-print | xargs rm"
18233    else
18234      FIND_DELETE="-exec rm \{\} \+"
18235    fi
18236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18237$as_echo "no" >&6; }
18238  else
18239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18240$as_echo "yes" >&6; }
18241  fi
18242  rmdir $DELETEDIR
18243
18244
18245
18246  # These tools might not be installed by default,
18247  # need hint on how to install them.
18248
18249
18250
18251  # Publish this variable in the help.
18252
18253
18254  if [ -z "${UNZIP+x}" ]; then
18255    # The variable is not set by user, try to locate tool using the code snippet
18256    for ac_prog in unzip
18257do
18258  # Extract the first word of "$ac_prog", so it can be a program name with args.
18259set dummy $ac_prog; ac_word=$2
18260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18261$as_echo_n "checking for $ac_word... " >&6; }
18262if ${ac_cv_path_UNZIP+:} false; then :
18263  $as_echo_n "(cached) " >&6
18264else
18265  case $UNZIP in
18266  [\\/]* | ?:[\\/]*)
18267  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18268  ;;
18269  *)
18270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18271for as_dir in $PATH
18272do
18273  IFS=$as_save_IFS
18274  test -z "$as_dir" && as_dir=.
18275    for ac_exec_ext in '' $ac_executable_extensions; do
18276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18277    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18279    break 2
18280  fi
18281done
18282  done
18283IFS=$as_save_IFS
18284
18285  ;;
18286esac
18287fi
18288UNZIP=$ac_cv_path_UNZIP
18289if test -n "$UNZIP"; then
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18291$as_echo "$UNZIP" >&6; }
18292else
18293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18294$as_echo "no" >&6; }
18295fi
18296
18297
18298  test -n "$UNZIP" && break
18299done
18300
18301  else
18302    # The variable is set, but is it from the command line or the environment?
18303
18304    # Try to remove the string !UNZIP! from our list.
18305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
18306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18307      # If it failed, the variable was not from the command line. Ignore it,
18308      # but warn the user (except for BASH, which is always set by the calling BASH).
18309      if test "xUNZIP" != xBASH; then
18310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
18311$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
18312      fi
18313      # Try to locate tool using the code snippet
18314      for ac_prog in unzip
18315do
18316  # Extract the first word of "$ac_prog", so it can be a program name with args.
18317set dummy $ac_prog; ac_word=$2
18318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18319$as_echo_n "checking for $ac_word... " >&6; }
18320if ${ac_cv_path_UNZIP+:} false; then :
18321  $as_echo_n "(cached) " >&6
18322else
18323  case $UNZIP in
18324  [\\/]* | ?:[\\/]*)
18325  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18326  ;;
18327  *)
18328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329for as_dir in $PATH
18330do
18331  IFS=$as_save_IFS
18332  test -z "$as_dir" && as_dir=.
18333    for ac_exec_ext in '' $ac_executable_extensions; do
18334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18335    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18337    break 2
18338  fi
18339done
18340  done
18341IFS=$as_save_IFS
18342
18343  ;;
18344esac
18345fi
18346UNZIP=$ac_cv_path_UNZIP
18347if test -n "$UNZIP"; then
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18349$as_echo "$UNZIP" >&6; }
18350else
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18352$as_echo "no" >&6; }
18353fi
18354
18355
18356  test -n "$UNZIP" && break
18357done
18358
18359    else
18360      # If it succeeded, then it was overridden by the user. We will use it
18361      # for the tool.
18362
18363      # First remove it from the list of overridden variables, so we can test
18364      # for unknown variables in the end.
18365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18366
18367      # Check if we try to supply an empty value
18368      if test "x$UNZIP" = x; then
18369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
18370$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
18371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18372$as_echo_n "checking for UNZIP... " >&6; }
18373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18374$as_echo "disabled" >&6; }
18375      else
18376        # Check if the provided tool contains a complete path.
18377        tool_specified="$UNZIP"
18378        tool_basename="${tool_specified##*/}"
18379        if test "x$tool_basename" = "x$tool_specified"; then
18380          # A command without a complete path is provided, search $PATH.
18381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
18382$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
18383          # Extract the first word of "$tool_basename", so it can be a program name with args.
18384set dummy $tool_basename; ac_word=$2
18385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386$as_echo_n "checking for $ac_word... " >&6; }
18387if ${ac_cv_path_UNZIP+:} false; then :
18388  $as_echo_n "(cached) " >&6
18389else
18390  case $UNZIP in
18391  [\\/]* | ?:[\\/]*)
18392  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18393  ;;
18394  *)
18395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396for as_dir in $PATH
18397do
18398  IFS=$as_save_IFS
18399  test -z "$as_dir" && as_dir=.
18400    for ac_exec_ext in '' $ac_executable_extensions; do
18401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18402    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18404    break 2
18405  fi
18406done
18407  done
18408IFS=$as_save_IFS
18409
18410  ;;
18411esac
18412fi
18413UNZIP=$ac_cv_path_UNZIP
18414if test -n "$UNZIP"; then
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18416$as_echo "$UNZIP" >&6; }
18417else
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419$as_echo "no" >&6; }
18420fi
18421
18422
18423          if test "x$UNZIP" = x; then
18424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18425          fi
18426        else
18427          # Otherwise we believe it is a complete path. Use it as it is.
18428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
18429$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
18430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18431$as_echo_n "checking for UNZIP... " >&6; }
18432          if test ! -x "$tool_specified"; then
18433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18434$as_echo "not found" >&6; }
18435            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18436          fi
18437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18438$as_echo "$tool_specified" >&6; }
18439        fi
18440      fi
18441    fi
18442  fi
18443
18444
18445
18446  if test "x$UNZIP" = x; then
18447    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
18448  fi
18449
18450
18451
18452
18453
18454  # Publish this variable in the help.
18455
18456
18457  if [ -z "${ZIP+x}" ]; then
18458    # The variable is not set by user, try to locate tool using the code snippet
18459    for ac_prog in zip
18460do
18461  # Extract the first word of "$ac_prog", so it can be a program name with args.
18462set dummy $ac_prog; ac_word=$2
18463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18464$as_echo_n "checking for $ac_word... " >&6; }
18465if ${ac_cv_path_ZIP+:} false; then :
18466  $as_echo_n "(cached) " >&6
18467else
18468  case $ZIP in
18469  [\\/]* | ?:[\\/]*)
18470  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18471  ;;
18472  *)
18473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18474for as_dir in $PATH
18475do
18476  IFS=$as_save_IFS
18477  test -z "$as_dir" && as_dir=.
18478    for ac_exec_ext in '' $ac_executable_extensions; do
18479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18480    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18482    break 2
18483  fi
18484done
18485  done
18486IFS=$as_save_IFS
18487
18488  ;;
18489esac
18490fi
18491ZIP=$ac_cv_path_ZIP
18492if test -n "$ZIP"; then
18493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18494$as_echo "$ZIP" >&6; }
18495else
18496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18497$as_echo "no" >&6; }
18498fi
18499
18500
18501  test -n "$ZIP" && break
18502done
18503
18504  else
18505    # The variable is set, but is it from the command line or the environment?
18506
18507    # Try to remove the string !ZIP! from our list.
18508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
18509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18510      # If it failed, the variable was not from the command line. Ignore it,
18511      # but warn the user (except for BASH, which is always set by the calling BASH).
18512      if test "xZIP" != xBASH; then
18513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
18514$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
18515      fi
18516      # Try to locate tool using the code snippet
18517      for ac_prog in zip
18518do
18519  # Extract the first word of "$ac_prog", so it can be a program name with args.
18520set dummy $ac_prog; ac_word=$2
18521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18522$as_echo_n "checking for $ac_word... " >&6; }
18523if ${ac_cv_path_ZIP+:} false; then :
18524  $as_echo_n "(cached) " >&6
18525else
18526  case $ZIP in
18527  [\\/]* | ?:[\\/]*)
18528  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18529  ;;
18530  *)
18531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18532for as_dir in $PATH
18533do
18534  IFS=$as_save_IFS
18535  test -z "$as_dir" && as_dir=.
18536    for ac_exec_ext in '' $ac_executable_extensions; do
18537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18538    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18540    break 2
18541  fi
18542done
18543  done
18544IFS=$as_save_IFS
18545
18546  ;;
18547esac
18548fi
18549ZIP=$ac_cv_path_ZIP
18550if test -n "$ZIP"; then
18551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18552$as_echo "$ZIP" >&6; }
18553else
18554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18555$as_echo "no" >&6; }
18556fi
18557
18558
18559  test -n "$ZIP" && break
18560done
18561
18562    else
18563      # If it succeeded, then it was overridden by the user. We will use it
18564      # for the tool.
18565
18566      # First remove it from the list of overridden variables, so we can test
18567      # for unknown variables in the end.
18568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18569
18570      # Check if we try to supply an empty value
18571      if test "x$ZIP" = x; then
18572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
18573$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
18574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18575$as_echo_n "checking for ZIP... " >&6; }
18576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18577$as_echo "disabled" >&6; }
18578      else
18579        # Check if the provided tool contains a complete path.
18580        tool_specified="$ZIP"
18581        tool_basename="${tool_specified##*/}"
18582        if test "x$tool_basename" = "x$tool_specified"; then
18583          # A command without a complete path is provided, search $PATH.
18584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
18585$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
18586          # Extract the first word of "$tool_basename", so it can be a program name with args.
18587set dummy $tool_basename; ac_word=$2
18588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18589$as_echo_n "checking for $ac_word... " >&6; }
18590if ${ac_cv_path_ZIP+:} false; then :
18591  $as_echo_n "(cached) " >&6
18592else
18593  case $ZIP in
18594  [\\/]* | ?:[\\/]*)
18595  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18596  ;;
18597  *)
18598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18599for as_dir in $PATH
18600do
18601  IFS=$as_save_IFS
18602  test -z "$as_dir" && as_dir=.
18603    for ac_exec_ext in '' $ac_executable_extensions; do
18604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18605    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18607    break 2
18608  fi
18609done
18610  done
18611IFS=$as_save_IFS
18612
18613  ;;
18614esac
18615fi
18616ZIP=$ac_cv_path_ZIP
18617if test -n "$ZIP"; then
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18619$as_echo "$ZIP" >&6; }
18620else
18621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18622$as_echo "no" >&6; }
18623fi
18624
18625
18626          if test "x$ZIP" = x; then
18627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18628          fi
18629        else
18630          # Otherwise we believe it is a complete path. Use it as it is.
18631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
18632$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
18633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18634$as_echo_n "checking for ZIP... " >&6; }
18635          if test ! -x "$tool_specified"; then
18636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18637$as_echo "not found" >&6; }
18638            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18639          fi
18640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18641$as_echo "$tool_specified" >&6; }
18642        fi
18643      fi
18644    fi
18645  fi
18646
18647
18648
18649  if test "x$ZIP" = x; then
18650    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18651  fi
18652
18653
18654
18655  # Non-required basic tools
18656
18657
18658
18659  # Publish this variable in the help.
18660
18661
18662  if [ -z "${LDD+x}" ]; then
18663    # The variable is not set by user, try to locate tool using the code snippet
18664    for ac_prog in ldd
18665do
18666  # Extract the first word of "$ac_prog", so it can be a program name with args.
18667set dummy $ac_prog; ac_word=$2
18668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18669$as_echo_n "checking for $ac_word... " >&6; }
18670if ${ac_cv_path_LDD+:} false; then :
18671  $as_echo_n "(cached) " >&6
18672else
18673  case $LDD in
18674  [\\/]* | ?:[\\/]*)
18675  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18676  ;;
18677  *)
18678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18679for as_dir in $PATH
18680do
18681  IFS=$as_save_IFS
18682  test -z "$as_dir" && as_dir=.
18683    for ac_exec_ext in '' $ac_executable_extensions; do
18684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18685    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18687    break 2
18688  fi
18689done
18690  done
18691IFS=$as_save_IFS
18692
18693  ;;
18694esac
18695fi
18696LDD=$ac_cv_path_LDD
18697if test -n "$LDD"; then
18698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18699$as_echo "$LDD" >&6; }
18700else
18701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18702$as_echo "no" >&6; }
18703fi
18704
18705
18706  test -n "$LDD" && break
18707done
18708
18709  else
18710    # The variable is set, but is it from the command line or the environment?
18711
18712    # Try to remove the string !LDD! from our list.
18713    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18714    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18715      # If it failed, the variable was not from the command line. Ignore it,
18716      # but warn the user (except for BASH, which is always set by the calling BASH).
18717      if test "xLDD" != xBASH; then
18718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18719$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18720      fi
18721      # Try to locate tool using the code snippet
18722      for ac_prog in ldd
18723do
18724  # Extract the first word of "$ac_prog", so it can be a program name with args.
18725set dummy $ac_prog; ac_word=$2
18726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18727$as_echo_n "checking for $ac_word... " >&6; }
18728if ${ac_cv_path_LDD+:} false; then :
18729  $as_echo_n "(cached) " >&6
18730else
18731  case $LDD in
18732  [\\/]* | ?:[\\/]*)
18733  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18734  ;;
18735  *)
18736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18737for as_dir in $PATH
18738do
18739  IFS=$as_save_IFS
18740  test -z "$as_dir" && as_dir=.
18741    for ac_exec_ext in '' $ac_executable_extensions; do
18742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18743    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18745    break 2
18746  fi
18747done
18748  done
18749IFS=$as_save_IFS
18750
18751  ;;
18752esac
18753fi
18754LDD=$ac_cv_path_LDD
18755if test -n "$LDD"; then
18756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18757$as_echo "$LDD" >&6; }
18758else
18759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18760$as_echo "no" >&6; }
18761fi
18762
18763
18764  test -n "$LDD" && break
18765done
18766
18767    else
18768      # If it succeeded, then it was overridden by the user. We will use it
18769      # for the tool.
18770
18771      # First remove it from the list of overridden variables, so we can test
18772      # for unknown variables in the end.
18773      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18774
18775      # Check if we try to supply an empty value
18776      if test "x$LDD" = x; then
18777        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
18778$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
18779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18780$as_echo_n "checking for LDD... " >&6; }
18781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18782$as_echo "disabled" >&6; }
18783      else
18784        # Check if the provided tool contains a complete path.
18785        tool_specified="$LDD"
18786        tool_basename="${tool_specified##*/}"
18787        if test "x$tool_basename" = "x$tool_specified"; then
18788          # A command without a complete path is provided, search $PATH.
18789          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18790$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18791          # Extract the first word of "$tool_basename", so it can be a program name with args.
18792set dummy $tool_basename; ac_word=$2
18793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18794$as_echo_n "checking for $ac_word... " >&6; }
18795if ${ac_cv_path_LDD+:} false; then :
18796  $as_echo_n "(cached) " >&6
18797else
18798  case $LDD in
18799  [\\/]* | ?:[\\/]*)
18800  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18801  ;;
18802  *)
18803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18804for as_dir in $PATH
18805do
18806  IFS=$as_save_IFS
18807  test -z "$as_dir" && as_dir=.
18808    for ac_exec_ext in '' $ac_executable_extensions; do
18809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18810    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18812    break 2
18813  fi
18814done
18815  done
18816IFS=$as_save_IFS
18817
18818  ;;
18819esac
18820fi
18821LDD=$ac_cv_path_LDD
18822if test -n "$LDD"; then
18823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18824$as_echo "$LDD" >&6; }
18825else
18826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18827$as_echo "no" >&6; }
18828fi
18829
18830
18831          if test "x$LDD" = x; then
18832            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18833          fi
18834        else
18835          # Otherwise we believe it is a complete path. Use it as it is.
18836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18837$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18838          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18839$as_echo_n "checking for LDD... " >&6; }
18840          if test ! -x "$tool_specified"; then
18841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18842$as_echo "not found" >&6; }
18843            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18844          fi
18845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18846$as_echo "$tool_specified" >&6; }
18847        fi
18848      fi
18849    fi
18850  fi
18851
18852
18853  if test "x$LDD" = "x"; then
18854    # List shared lib dependencies is used for
18855    # debug output and checking for forbidden dependencies.
18856    # We can build without it.
18857    LDD="true"
18858  fi
18859
18860
18861  # Publish this variable in the help.
18862
18863
18864  if [ -z "${OTOOL+x}" ]; then
18865    # The variable is not set by user, try to locate tool using the code snippet
18866    for ac_prog in otool
18867do
18868  # Extract the first word of "$ac_prog", so it can be a program name with args.
18869set dummy $ac_prog; ac_word=$2
18870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18871$as_echo_n "checking for $ac_word... " >&6; }
18872if ${ac_cv_path_OTOOL+:} false; then :
18873  $as_echo_n "(cached) " >&6
18874else
18875  case $OTOOL in
18876  [\\/]* | ?:[\\/]*)
18877  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18878  ;;
18879  *)
18880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18881for as_dir in $PATH
18882do
18883  IFS=$as_save_IFS
18884  test -z "$as_dir" && as_dir=.
18885    for ac_exec_ext in '' $ac_executable_extensions; do
18886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18887    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18889    break 2
18890  fi
18891done
18892  done
18893IFS=$as_save_IFS
18894
18895  ;;
18896esac
18897fi
18898OTOOL=$ac_cv_path_OTOOL
18899if test -n "$OTOOL"; then
18900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18901$as_echo "$OTOOL" >&6; }
18902else
18903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18904$as_echo "no" >&6; }
18905fi
18906
18907
18908  test -n "$OTOOL" && break
18909done
18910
18911  else
18912    # The variable is set, but is it from the command line or the environment?
18913
18914    # Try to remove the string !OTOOL! from our list.
18915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18917      # If it failed, the variable was not from the command line. Ignore it,
18918      # but warn the user (except for BASH, which is always set by the calling BASH).
18919      if test "xOTOOL" != xBASH; then
18920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18921$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18922      fi
18923      # Try to locate tool using the code snippet
18924      for ac_prog in otool
18925do
18926  # Extract the first word of "$ac_prog", so it can be a program name with args.
18927set dummy $ac_prog; ac_word=$2
18928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18929$as_echo_n "checking for $ac_word... " >&6; }
18930if ${ac_cv_path_OTOOL+:} false; then :
18931  $as_echo_n "(cached) " >&6
18932else
18933  case $OTOOL in
18934  [\\/]* | ?:[\\/]*)
18935  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18936  ;;
18937  *)
18938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18939for as_dir in $PATH
18940do
18941  IFS=$as_save_IFS
18942  test -z "$as_dir" && as_dir=.
18943    for ac_exec_ext in '' $ac_executable_extensions; do
18944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18945    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18947    break 2
18948  fi
18949done
18950  done
18951IFS=$as_save_IFS
18952
18953  ;;
18954esac
18955fi
18956OTOOL=$ac_cv_path_OTOOL
18957if test -n "$OTOOL"; then
18958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18959$as_echo "$OTOOL" >&6; }
18960else
18961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18962$as_echo "no" >&6; }
18963fi
18964
18965
18966  test -n "$OTOOL" && break
18967done
18968
18969    else
18970      # If it succeeded, then it was overridden by the user. We will use it
18971      # for the tool.
18972
18973      # First remove it from the list of overridden variables, so we can test
18974      # for unknown variables in the end.
18975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18976
18977      # Check if we try to supply an empty value
18978      if test "x$OTOOL" = x; then
18979        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
18980$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
18981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18982$as_echo_n "checking for OTOOL... " >&6; }
18983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18984$as_echo "disabled" >&6; }
18985      else
18986        # Check if the provided tool contains a complete path.
18987        tool_specified="$OTOOL"
18988        tool_basename="${tool_specified##*/}"
18989        if test "x$tool_basename" = "x$tool_specified"; then
18990          # A command without a complete path is provided, search $PATH.
18991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18992$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18993          # Extract the first word of "$tool_basename", so it can be a program name with args.
18994set dummy $tool_basename; ac_word=$2
18995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18996$as_echo_n "checking for $ac_word... " >&6; }
18997if ${ac_cv_path_OTOOL+:} false; then :
18998  $as_echo_n "(cached) " >&6
18999else
19000  case $OTOOL in
19001  [\\/]* | ?:[\\/]*)
19002  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19003  ;;
19004  *)
19005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19006for as_dir in $PATH
19007do
19008  IFS=$as_save_IFS
19009  test -z "$as_dir" && as_dir=.
19010    for ac_exec_ext in '' $ac_executable_extensions; do
19011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19012    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19014    break 2
19015  fi
19016done
19017  done
19018IFS=$as_save_IFS
19019
19020  ;;
19021esac
19022fi
19023OTOOL=$ac_cv_path_OTOOL
19024if test -n "$OTOOL"; then
19025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19026$as_echo "$OTOOL" >&6; }
19027else
19028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19029$as_echo "no" >&6; }
19030fi
19031
19032
19033          if test "x$OTOOL" = x; then
19034            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19035          fi
19036        else
19037          # Otherwise we believe it is a complete path. Use it as it is.
19038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
19039$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
19040          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
19041$as_echo_n "checking for OTOOL... " >&6; }
19042          if test ! -x "$tool_specified"; then
19043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19044$as_echo "not found" >&6; }
19045            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
19046          fi
19047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19048$as_echo "$tool_specified" >&6; }
19049        fi
19050      fi
19051    fi
19052  fi
19053
19054
19055  if test "x$OTOOL" = "x"; then
19056    OTOOL="true"
19057  fi
19058
19059
19060  # Publish this variable in the help.
19061
19062
19063  if [ -z "${READELF+x}" ]; then
19064    # The variable is not set by user, try to locate tool using the code snippet
19065    for ac_prog in greadelf readelf
19066do
19067  # Extract the first word of "$ac_prog", so it can be a program name with args.
19068set dummy $ac_prog; ac_word=$2
19069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19070$as_echo_n "checking for $ac_word... " >&6; }
19071if ${ac_cv_path_READELF+:} false; then :
19072  $as_echo_n "(cached) " >&6
19073else
19074  case $READELF in
19075  [\\/]* | ?:[\\/]*)
19076  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19077  ;;
19078  *)
19079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19080for as_dir in $PATH
19081do
19082  IFS=$as_save_IFS
19083  test -z "$as_dir" && as_dir=.
19084    for ac_exec_ext in '' $ac_executable_extensions; do
19085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19086    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19088    break 2
19089  fi
19090done
19091  done
19092IFS=$as_save_IFS
19093
19094  ;;
19095esac
19096fi
19097READELF=$ac_cv_path_READELF
19098if test -n "$READELF"; then
19099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19100$as_echo "$READELF" >&6; }
19101else
19102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19103$as_echo "no" >&6; }
19104fi
19105
19106
19107  test -n "$READELF" && break
19108done
19109
19110  else
19111    # The variable is set, but is it from the command line or the environment?
19112
19113    # Try to remove the string !READELF! from our list.
19114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
19115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19116      # If it failed, the variable was not from the command line. Ignore it,
19117      # but warn the user (except for BASH, which is always set by the calling BASH).
19118      if test "xREADELF" != xBASH; then
19119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
19120$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
19121      fi
19122      # Try to locate tool using the code snippet
19123      for ac_prog in greadelf readelf
19124do
19125  # Extract the first word of "$ac_prog", so it can be a program name with args.
19126set dummy $ac_prog; ac_word=$2
19127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19128$as_echo_n "checking for $ac_word... " >&6; }
19129if ${ac_cv_path_READELF+:} false; then :
19130  $as_echo_n "(cached) " >&6
19131else
19132  case $READELF in
19133  [\\/]* | ?:[\\/]*)
19134  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19135  ;;
19136  *)
19137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19138for as_dir in $PATH
19139do
19140  IFS=$as_save_IFS
19141  test -z "$as_dir" && as_dir=.
19142    for ac_exec_ext in '' $ac_executable_extensions; do
19143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19144    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19146    break 2
19147  fi
19148done
19149  done
19150IFS=$as_save_IFS
19151
19152  ;;
19153esac
19154fi
19155READELF=$ac_cv_path_READELF
19156if test -n "$READELF"; then
19157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19158$as_echo "$READELF" >&6; }
19159else
19160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19161$as_echo "no" >&6; }
19162fi
19163
19164
19165  test -n "$READELF" && break
19166done
19167
19168    else
19169      # If it succeeded, then it was overridden by the user. We will use it
19170      # for the tool.
19171
19172      # First remove it from the list of overridden variables, so we can test
19173      # for unknown variables in the end.
19174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19175
19176      # Check if we try to supply an empty value
19177      if test "x$READELF" = x; then
19178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
19179$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
19180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19181$as_echo_n "checking for READELF... " >&6; }
19182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19183$as_echo "disabled" >&6; }
19184      else
19185        # Check if the provided tool contains a complete path.
19186        tool_specified="$READELF"
19187        tool_basename="${tool_specified##*/}"
19188        if test "x$tool_basename" = "x$tool_specified"; then
19189          # A command without a complete path is provided, search $PATH.
19190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
19191$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
19192          # Extract the first word of "$tool_basename", so it can be a program name with args.
19193set dummy $tool_basename; ac_word=$2
19194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19195$as_echo_n "checking for $ac_word... " >&6; }
19196if ${ac_cv_path_READELF+:} false; then :
19197  $as_echo_n "(cached) " >&6
19198else
19199  case $READELF in
19200  [\\/]* | ?:[\\/]*)
19201  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19202  ;;
19203  *)
19204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19205for as_dir in $PATH
19206do
19207  IFS=$as_save_IFS
19208  test -z "$as_dir" && as_dir=.
19209    for ac_exec_ext in '' $ac_executable_extensions; do
19210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19211    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19213    break 2
19214  fi
19215done
19216  done
19217IFS=$as_save_IFS
19218
19219  ;;
19220esac
19221fi
19222READELF=$ac_cv_path_READELF
19223if test -n "$READELF"; then
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19225$as_echo "$READELF" >&6; }
19226else
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19228$as_echo "no" >&6; }
19229fi
19230
19231
19232          if test "x$READELF" = x; then
19233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19234          fi
19235        else
19236          # Otherwise we believe it is a complete path. Use it as it is.
19237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
19238$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
19239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19240$as_echo_n "checking for READELF... " >&6; }
19241          if test ! -x "$tool_specified"; then
19242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19243$as_echo "not found" >&6; }
19244            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
19245          fi
19246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19247$as_echo "$tool_specified" >&6; }
19248        fi
19249      fi
19250    fi
19251  fi
19252
19253
19254
19255
19256  # Publish this variable in the help.
19257
19258
19259  if [ -z "${HG+x}" ]; then
19260    # The variable is not set by user, try to locate tool using the code snippet
19261    for ac_prog in hg
19262do
19263  # Extract the first word of "$ac_prog", so it can be a program name with args.
19264set dummy $ac_prog; ac_word=$2
19265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19266$as_echo_n "checking for $ac_word... " >&6; }
19267if ${ac_cv_path_HG+:} false; then :
19268  $as_echo_n "(cached) " >&6
19269else
19270  case $HG in
19271  [\\/]* | ?:[\\/]*)
19272  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19273  ;;
19274  *)
19275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19276for as_dir in $PATH
19277do
19278  IFS=$as_save_IFS
19279  test -z "$as_dir" && as_dir=.
19280    for ac_exec_ext in '' $ac_executable_extensions; do
19281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19282    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19284    break 2
19285  fi
19286done
19287  done
19288IFS=$as_save_IFS
19289
19290  ;;
19291esac
19292fi
19293HG=$ac_cv_path_HG
19294if test -n "$HG"; then
19295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19296$as_echo "$HG" >&6; }
19297else
19298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19299$as_echo "no" >&6; }
19300fi
19301
19302
19303  test -n "$HG" && break
19304done
19305
19306  else
19307    # The variable is set, but is it from the command line or the environment?
19308
19309    # Try to remove the string !HG! from our list.
19310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
19311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19312      # If it failed, the variable was not from the command line. Ignore it,
19313      # but warn the user (except for BASH, which is always set by the calling BASH).
19314      if test "xHG" != xBASH; then
19315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
19316$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
19317      fi
19318      # Try to locate tool using the code snippet
19319      for ac_prog in hg
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_HG+:} false; then :
19326  $as_echo_n "(cached) " >&6
19327else
19328  case $HG in
19329  [\\/]* | ?:[\\/]*)
19330  ac_cv_path_HG="$HG" # 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_HG="$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
19351HG=$ac_cv_path_HG
19352if test -n "$HG"; then
19353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19354$as_echo "$HG" >&6; }
19355else
19356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19357$as_echo "no" >&6; }
19358fi
19359
19360
19361  test -n "$HG" && break
19362done
19363
19364    else
19365      # If it succeeded, then it was overridden by the user. We will use it
19366      # for the tool.
19367
19368      # First remove it from the list of overridden variables, so we can test
19369      # for unknown variables in the end.
19370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19371
19372      # Check if we try to supply an empty value
19373      if test "x$HG" = x; then
19374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
19375$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
19376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19377$as_echo_n "checking for HG... " >&6; }
19378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19379$as_echo "disabled" >&6; }
19380      else
19381        # Check if the provided tool contains a complete path.
19382        tool_specified="$HG"
19383        tool_basename="${tool_specified##*/}"
19384        if test "x$tool_basename" = "x$tool_specified"; then
19385          # A command without a complete path is provided, search $PATH.
19386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
19387$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
19388          # Extract the first word of "$tool_basename", so it can be a program name with args.
19389set dummy $tool_basename; ac_word=$2
19390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19391$as_echo_n "checking for $ac_word... " >&6; }
19392if ${ac_cv_path_HG+:} false; then :
19393  $as_echo_n "(cached) " >&6
19394else
19395  case $HG in
19396  [\\/]* | ?:[\\/]*)
19397  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19398  ;;
19399  *)
19400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19401for as_dir in $PATH
19402do
19403  IFS=$as_save_IFS
19404  test -z "$as_dir" && as_dir=.
19405    for ac_exec_ext in '' $ac_executable_extensions; do
19406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19407    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19409    break 2
19410  fi
19411done
19412  done
19413IFS=$as_save_IFS
19414
19415  ;;
19416esac
19417fi
19418HG=$ac_cv_path_HG
19419if test -n "$HG"; then
19420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19421$as_echo "$HG" >&6; }
19422else
19423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19424$as_echo "no" >&6; }
19425fi
19426
19427
19428          if test "x$HG" = x; then
19429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19430          fi
19431        else
19432          # Otherwise we believe it is a complete path. Use it as it is.
19433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
19434$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
19435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19436$as_echo_n "checking for HG... " >&6; }
19437          if test ! -x "$tool_specified"; then
19438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19439$as_echo "not found" >&6; }
19440            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
19441          fi
19442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19443$as_echo "$tool_specified" >&6; }
19444        fi
19445      fi
19446    fi
19447  fi
19448
19449
19450
19451
19452  # Publish this variable in the help.
19453
19454
19455  if [ -z "${STAT+x}" ]; then
19456    # The variable is not set by user, try to locate tool using the code snippet
19457    for ac_prog in stat
19458do
19459  # Extract the first word of "$ac_prog", so it can be a program name with args.
19460set dummy $ac_prog; ac_word=$2
19461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19462$as_echo_n "checking for $ac_word... " >&6; }
19463if ${ac_cv_path_STAT+:} false; then :
19464  $as_echo_n "(cached) " >&6
19465else
19466  case $STAT in
19467  [\\/]* | ?:[\\/]*)
19468  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19469  ;;
19470  *)
19471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19472for as_dir in $PATH
19473do
19474  IFS=$as_save_IFS
19475  test -z "$as_dir" && as_dir=.
19476    for ac_exec_ext in '' $ac_executable_extensions; do
19477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19478    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19480    break 2
19481  fi
19482done
19483  done
19484IFS=$as_save_IFS
19485
19486  ;;
19487esac
19488fi
19489STAT=$ac_cv_path_STAT
19490if test -n "$STAT"; then
19491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19492$as_echo "$STAT" >&6; }
19493else
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19495$as_echo "no" >&6; }
19496fi
19497
19498
19499  test -n "$STAT" && break
19500done
19501
19502  else
19503    # The variable is set, but is it from the command line or the environment?
19504
19505    # Try to remove the string !STAT! from our list.
19506    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
19507    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19508      # If it failed, the variable was not from the command line. Ignore it,
19509      # but warn the user (except for BASH, which is always set by the calling BASH).
19510      if test "xSTAT" != xBASH; then
19511        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
19512$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
19513      fi
19514      # Try to locate tool using the code snippet
19515      for ac_prog in stat
19516do
19517  # Extract the first word of "$ac_prog", so it can be a program name with args.
19518set dummy $ac_prog; ac_word=$2
19519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19520$as_echo_n "checking for $ac_word... " >&6; }
19521if ${ac_cv_path_STAT+:} false; then :
19522  $as_echo_n "(cached) " >&6
19523else
19524  case $STAT in
19525  [\\/]* | ?:[\\/]*)
19526  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19527  ;;
19528  *)
19529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19530for as_dir in $PATH
19531do
19532  IFS=$as_save_IFS
19533  test -z "$as_dir" && as_dir=.
19534    for ac_exec_ext in '' $ac_executable_extensions; do
19535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19536    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19538    break 2
19539  fi
19540done
19541  done
19542IFS=$as_save_IFS
19543
19544  ;;
19545esac
19546fi
19547STAT=$ac_cv_path_STAT
19548if test -n "$STAT"; then
19549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19550$as_echo "$STAT" >&6; }
19551else
19552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19553$as_echo "no" >&6; }
19554fi
19555
19556
19557  test -n "$STAT" && break
19558done
19559
19560    else
19561      # If it succeeded, then it was overridden by the user. We will use it
19562      # for the tool.
19563
19564      # First remove it from the list of overridden variables, so we can test
19565      # for unknown variables in the end.
19566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19567
19568      # Check if we try to supply an empty value
19569      if test "x$STAT" = x; then
19570        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
19571$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
19572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19573$as_echo_n "checking for STAT... " >&6; }
19574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19575$as_echo "disabled" >&6; }
19576      else
19577        # Check if the provided tool contains a complete path.
19578        tool_specified="$STAT"
19579        tool_basename="${tool_specified##*/}"
19580        if test "x$tool_basename" = "x$tool_specified"; then
19581          # A command without a complete path is provided, search $PATH.
19582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
19583$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
19584          # Extract the first word of "$tool_basename", so it can be a program name with args.
19585set dummy $tool_basename; ac_word=$2
19586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19587$as_echo_n "checking for $ac_word... " >&6; }
19588if ${ac_cv_path_STAT+:} false; then :
19589  $as_echo_n "(cached) " >&6
19590else
19591  case $STAT in
19592  [\\/]* | ?:[\\/]*)
19593  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19594  ;;
19595  *)
19596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19597for as_dir in $PATH
19598do
19599  IFS=$as_save_IFS
19600  test -z "$as_dir" && as_dir=.
19601    for ac_exec_ext in '' $ac_executable_extensions; do
19602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19603    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19605    break 2
19606  fi
19607done
19608  done
19609IFS=$as_save_IFS
19610
19611  ;;
19612esac
19613fi
19614STAT=$ac_cv_path_STAT
19615if test -n "$STAT"; then
19616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19617$as_echo "$STAT" >&6; }
19618else
19619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19620$as_echo "no" >&6; }
19621fi
19622
19623
19624          if test "x$STAT" = x; then
19625            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19626          fi
19627        else
19628          # Otherwise we believe it is a complete path. Use it as it is.
19629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
19630$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
19631          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19632$as_echo_n "checking for STAT... " >&6; }
19633          if test ! -x "$tool_specified"; then
19634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19635$as_echo "not found" >&6; }
19636            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
19637          fi
19638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19639$as_echo "$tool_specified" >&6; }
19640        fi
19641      fi
19642    fi
19643  fi
19644
19645
19646
19647
19648  # Publish this variable in the help.
19649
19650
19651  if [ -z "${TIME+x}" ]; then
19652    # The variable is not set by user, try to locate tool using the code snippet
19653    for ac_prog in time
19654do
19655  # Extract the first word of "$ac_prog", so it can be a program name with args.
19656set dummy $ac_prog; ac_word=$2
19657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19658$as_echo_n "checking for $ac_word... " >&6; }
19659if ${ac_cv_path_TIME+:} false; then :
19660  $as_echo_n "(cached) " >&6
19661else
19662  case $TIME in
19663  [\\/]* | ?:[\\/]*)
19664  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19665  ;;
19666  *)
19667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19668for as_dir in $PATH
19669do
19670  IFS=$as_save_IFS
19671  test -z "$as_dir" && as_dir=.
19672    for ac_exec_ext in '' $ac_executable_extensions; do
19673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19674    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19676    break 2
19677  fi
19678done
19679  done
19680IFS=$as_save_IFS
19681
19682  ;;
19683esac
19684fi
19685TIME=$ac_cv_path_TIME
19686if test -n "$TIME"; then
19687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19688$as_echo "$TIME" >&6; }
19689else
19690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19691$as_echo "no" >&6; }
19692fi
19693
19694
19695  test -n "$TIME" && break
19696done
19697
19698  else
19699    # The variable is set, but is it from the command line or the environment?
19700
19701    # Try to remove the string !TIME! from our list.
19702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19704      # If it failed, the variable was not from the command line. Ignore it,
19705      # but warn the user (except for BASH, which is always set by the calling BASH).
19706      if test "xTIME" != xBASH; then
19707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19708$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19709      fi
19710      # Try to locate tool using the code snippet
19711      for ac_prog in time
19712do
19713  # Extract the first word of "$ac_prog", so it can be a program name with args.
19714set dummy $ac_prog; ac_word=$2
19715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19716$as_echo_n "checking for $ac_word... " >&6; }
19717if ${ac_cv_path_TIME+:} false; then :
19718  $as_echo_n "(cached) " >&6
19719else
19720  case $TIME in
19721  [\\/]* | ?:[\\/]*)
19722  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19723  ;;
19724  *)
19725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19726for as_dir in $PATH
19727do
19728  IFS=$as_save_IFS
19729  test -z "$as_dir" && as_dir=.
19730    for ac_exec_ext in '' $ac_executable_extensions; do
19731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19732    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19734    break 2
19735  fi
19736done
19737  done
19738IFS=$as_save_IFS
19739
19740  ;;
19741esac
19742fi
19743TIME=$ac_cv_path_TIME
19744if test -n "$TIME"; then
19745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19746$as_echo "$TIME" >&6; }
19747else
19748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19749$as_echo "no" >&6; }
19750fi
19751
19752
19753  test -n "$TIME" && break
19754done
19755
19756    else
19757      # If it succeeded, then it was overridden by the user. We will use it
19758      # for the tool.
19759
19760      # First remove it from the list of overridden variables, so we can test
19761      # for unknown variables in the end.
19762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19763
19764      # Check if we try to supply an empty value
19765      if test "x$TIME" = x; then
19766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
19767$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
19768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19769$as_echo_n "checking for TIME... " >&6; }
19770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19771$as_echo "disabled" >&6; }
19772      else
19773        # Check if the provided tool contains a complete path.
19774        tool_specified="$TIME"
19775        tool_basename="${tool_specified##*/}"
19776        if test "x$tool_basename" = "x$tool_specified"; then
19777          # A command without a complete path is provided, search $PATH.
19778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19779$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19780          # Extract the first word of "$tool_basename", so it can be a program name with args.
19781set dummy $tool_basename; ac_word=$2
19782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19783$as_echo_n "checking for $ac_word... " >&6; }
19784if ${ac_cv_path_TIME+:} false; then :
19785  $as_echo_n "(cached) " >&6
19786else
19787  case $TIME in
19788  [\\/]* | ?:[\\/]*)
19789  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19790  ;;
19791  *)
19792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19793for as_dir in $PATH
19794do
19795  IFS=$as_save_IFS
19796  test -z "$as_dir" && as_dir=.
19797    for ac_exec_ext in '' $ac_executable_extensions; do
19798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19799    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19801    break 2
19802  fi
19803done
19804  done
19805IFS=$as_save_IFS
19806
19807  ;;
19808esac
19809fi
19810TIME=$ac_cv_path_TIME
19811if test -n "$TIME"; then
19812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19813$as_echo "$TIME" >&6; }
19814else
19815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19816$as_echo "no" >&6; }
19817fi
19818
19819
19820          if test "x$TIME" = x; then
19821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19822          fi
19823        else
19824          # Otherwise we believe it is a complete path. Use it as it is.
19825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19826$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19828$as_echo_n "checking for TIME... " >&6; }
19829          if test ! -x "$tool_specified"; then
19830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19831$as_echo "not found" >&6; }
19832            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19833          fi
19834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19835$as_echo "$tool_specified" >&6; }
19836        fi
19837      fi
19838    fi
19839  fi
19840
19841
19842
19843
19844  # Publish this variable in the help.
19845
19846
19847  if [ -z "${PATCH+x}" ]; then
19848    # The variable is not set by user, try to locate tool using the code snippet
19849    for ac_prog in gpatch patch
19850do
19851  # Extract the first word of "$ac_prog", so it can be a program name with args.
19852set dummy $ac_prog; ac_word=$2
19853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19854$as_echo_n "checking for $ac_word... " >&6; }
19855if ${ac_cv_path_PATCH+:} false; then :
19856  $as_echo_n "(cached) " >&6
19857else
19858  case $PATCH in
19859  [\\/]* | ?:[\\/]*)
19860  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19861  ;;
19862  *)
19863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19864for as_dir in $PATH
19865do
19866  IFS=$as_save_IFS
19867  test -z "$as_dir" && as_dir=.
19868    for ac_exec_ext in '' $ac_executable_extensions; do
19869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19870    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19872    break 2
19873  fi
19874done
19875  done
19876IFS=$as_save_IFS
19877
19878  ;;
19879esac
19880fi
19881PATCH=$ac_cv_path_PATCH
19882if test -n "$PATCH"; then
19883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19884$as_echo "$PATCH" >&6; }
19885else
19886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19887$as_echo "no" >&6; }
19888fi
19889
19890
19891  test -n "$PATCH" && break
19892done
19893
19894  else
19895    # The variable is set, but is it from the command line or the environment?
19896
19897    # Try to remove the string !PATCH! from our list.
19898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
19899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19900      # If it failed, the variable was not from the command line. Ignore it,
19901      # but warn the user (except for BASH, which is always set by the calling BASH).
19902      if test "xPATCH" != xBASH; then
19903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
19904$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
19905      fi
19906      # Try to locate tool using the code snippet
19907      for ac_prog in gpatch patch
19908do
19909  # Extract the first word of "$ac_prog", so it can be a program name with args.
19910set dummy $ac_prog; ac_word=$2
19911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19912$as_echo_n "checking for $ac_word... " >&6; }
19913if ${ac_cv_path_PATCH+:} false; then :
19914  $as_echo_n "(cached) " >&6
19915else
19916  case $PATCH in
19917  [\\/]* | ?:[\\/]*)
19918  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19919  ;;
19920  *)
19921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19922for as_dir in $PATH
19923do
19924  IFS=$as_save_IFS
19925  test -z "$as_dir" && as_dir=.
19926    for ac_exec_ext in '' $ac_executable_extensions; do
19927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19928    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19930    break 2
19931  fi
19932done
19933  done
19934IFS=$as_save_IFS
19935
19936  ;;
19937esac
19938fi
19939PATCH=$ac_cv_path_PATCH
19940if test -n "$PATCH"; then
19941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19942$as_echo "$PATCH" >&6; }
19943else
19944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19945$as_echo "no" >&6; }
19946fi
19947
19948
19949  test -n "$PATCH" && break
19950done
19951
19952    else
19953      # If it succeeded, then it was overridden by the user. We will use it
19954      # for the tool.
19955
19956      # First remove it from the list of overridden variables, so we can test
19957      # for unknown variables in the end.
19958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19959
19960      # Check if we try to supply an empty value
19961      if test "x$PATCH" = x; then
19962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
19963$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
19964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19965$as_echo_n "checking for PATCH... " >&6; }
19966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19967$as_echo "disabled" >&6; }
19968      else
19969        # Check if the provided tool contains a complete path.
19970        tool_specified="$PATCH"
19971        tool_basename="${tool_specified##*/}"
19972        if test "x$tool_basename" = "x$tool_specified"; then
19973          # A command without a complete path is provided, search $PATH.
19974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19975$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19976          # Extract the first word of "$tool_basename", so it can be a program name with args.
19977set dummy $tool_basename; ac_word=$2
19978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19979$as_echo_n "checking for $ac_word... " >&6; }
19980if ${ac_cv_path_PATCH+:} false; then :
19981  $as_echo_n "(cached) " >&6
19982else
19983  case $PATCH in
19984  [\\/]* | ?:[\\/]*)
19985  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19986  ;;
19987  *)
19988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19989for as_dir in $PATH
19990do
19991  IFS=$as_save_IFS
19992  test -z "$as_dir" && as_dir=.
19993    for ac_exec_ext in '' $ac_executable_extensions; do
19994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19995    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19997    break 2
19998  fi
19999done
20000  done
20001IFS=$as_save_IFS
20002
20003  ;;
20004esac
20005fi
20006PATCH=$ac_cv_path_PATCH
20007if test -n "$PATCH"; then
20008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20009$as_echo "$PATCH" >&6; }
20010else
20011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20012$as_echo "no" >&6; }
20013fi
20014
20015
20016          if test "x$PATCH" = x; then
20017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20018          fi
20019        else
20020          # Otherwise we believe it is a complete path. Use it as it is.
20021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
20022$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
20023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
20024$as_echo_n "checking for PATCH... " >&6; }
20025          if test ! -x "$tool_specified"; then
20026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20027$as_echo "not found" >&6; }
20028            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
20029          fi
20030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20031$as_echo "$tool_specified" >&6; }
20032        fi
20033      fi
20034    fi
20035  fi
20036
20037
20038  # Check if it's GNU time
20039  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
20040  if test "x$IS_GNU_TIME" != x; then
20041    IS_GNU_TIME=yes
20042  else
20043    IS_GNU_TIME=no
20044  fi
20045
20046
20047  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
20048
20049
20050
20051  # Publish this variable in the help.
20052
20053
20054  if [ -z "${DSYMUTIL+x}" ]; then
20055    # The variable is not set by user, try to locate tool using the code snippet
20056    for ac_prog in dsymutil
20057do
20058  # Extract the first word of "$ac_prog", so it can be a program name with args.
20059set dummy $ac_prog; ac_word=$2
20060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20061$as_echo_n "checking for $ac_word... " >&6; }
20062if ${ac_cv_path_DSYMUTIL+:} false; then :
20063  $as_echo_n "(cached) " >&6
20064else
20065  case $DSYMUTIL in
20066  [\\/]* | ?:[\\/]*)
20067  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20068  ;;
20069  *)
20070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20071for as_dir in $PATH
20072do
20073  IFS=$as_save_IFS
20074  test -z "$as_dir" && as_dir=.
20075    for ac_exec_ext in '' $ac_executable_extensions; do
20076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20077    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20079    break 2
20080  fi
20081done
20082  done
20083IFS=$as_save_IFS
20084
20085  ;;
20086esac
20087fi
20088DSYMUTIL=$ac_cv_path_DSYMUTIL
20089if test -n "$DSYMUTIL"; then
20090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20091$as_echo "$DSYMUTIL" >&6; }
20092else
20093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20094$as_echo "no" >&6; }
20095fi
20096
20097
20098  test -n "$DSYMUTIL" && break
20099done
20100
20101  else
20102    # The variable is set, but is it from the command line or the environment?
20103
20104    # Try to remove the string !DSYMUTIL! from our list.
20105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
20106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20107      # If it failed, the variable was not from the command line. Ignore it,
20108      # but warn the user (except for BASH, which is always set by the calling BASH).
20109      if test "xDSYMUTIL" != xBASH; then
20110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
20111$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
20112      fi
20113      # Try to locate tool using the code snippet
20114      for ac_prog in dsymutil
20115do
20116  # Extract the first word of "$ac_prog", so it can be a program name with args.
20117set dummy $ac_prog; ac_word=$2
20118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20119$as_echo_n "checking for $ac_word... " >&6; }
20120if ${ac_cv_path_DSYMUTIL+:} false; then :
20121  $as_echo_n "(cached) " >&6
20122else
20123  case $DSYMUTIL in
20124  [\\/]* | ?:[\\/]*)
20125  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20126  ;;
20127  *)
20128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20129for as_dir in $PATH
20130do
20131  IFS=$as_save_IFS
20132  test -z "$as_dir" && as_dir=.
20133    for ac_exec_ext in '' $ac_executable_extensions; do
20134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20135    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20137    break 2
20138  fi
20139done
20140  done
20141IFS=$as_save_IFS
20142
20143  ;;
20144esac
20145fi
20146DSYMUTIL=$ac_cv_path_DSYMUTIL
20147if test -n "$DSYMUTIL"; then
20148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20149$as_echo "$DSYMUTIL" >&6; }
20150else
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20152$as_echo "no" >&6; }
20153fi
20154
20155
20156  test -n "$DSYMUTIL" && break
20157done
20158
20159    else
20160      # If it succeeded, then it was overridden by the user. We will use it
20161      # for the tool.
20162
20163      # First remove it from the list of overridden variables, so we can test
20164      # for unknown variables in the end.
20165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20166
20167      # Check if we try to supply an empty value
20168      if test "x$DSYMUTIL" = x; then
20169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
20170$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
20171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20172$as_echo_n "checking for DSYMUTIL... " >&6; }
20173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20174$as_echo "disabled" >&6; }
20175      else
20176        # Check if the provided tool contains a complete path.
20177        tool_specified="$DSYMUTIL"
20178        tool_basename="${tool_specified##*/}"
20179        if test "x$tool_basename" = "x$tool_specified"; then
20180          # A command without a complete path is provided, search $PATH.
20181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
20182$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
20183          # Extract the first word of "$tool_basename", so it can be a program name with args.
20184set dummy $tool_basename; ac_word=$2
20185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20186$as_echo_n "checking for $ac_word... " >&6; }
20187if ${ac_cv_path_DSYMUTIL+:} false; then :
20188  $as_echo_n "(cached) " >&6
20189else
20190  case $DSYMUTIL in
20191  [\\/]* | ?:[\\/]*)
20192  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20193  ;;
20194  *)
20195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20196for as_dir in $PATH
20197do
20198  IFS=$as_save_IFS
20199  test -z "$as_dir" && as_dir=.
20200    for ac_exec_ext in '' $ac_executable_extensions; do
20201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20202    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20204    break 2
20205  fi
20206done
20207  done
20208IFS=$as_save_IFS
20209
20210  ;;
20211esac
20212fi
20213DSYMUTIL=$ac_cv_path_DSYMUTIL
20214if test -n "$DSYMUTIL"; then
20215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20216$as_echo "$DSYMUTIL" >&6; }
20217else
20218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20219$as_echo "no" >&6; }
20220fi
20221
20222
20223          if test "x$DSYMUTIL" = x; then
20224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20225          fi
20226        else
20227          # Otherwise we believe it is a complete path. Use it as it is.
20228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
20229$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
20230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20231$as_echo_n "checking for DSYMUTIL... " >&6; }
20232          if test ! -x "$tool_specified"; then
20233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20234$as_echo "not found" >&6; }
20235            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
20236          fi
20237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20238$as_echo "$tool_specified" >&6; }
20239        fi
20240      fi
20241    fi
20242  fi
20243
20244
20245
20246  if test "x$DSYMUTIL" = x; then
20247    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
20248  fi
20249
20250
20251
20252
20253
20254  # Publish this variable in the help.
20255
20256
20257  if [ -z "${XATTR+x}" ]; then
20258    # The variable is not set by user, try to locate tool using the code snippet
20259    for ac_prog in xattr
20260do
20261  # Extract the first word of "$ac_prog", so it can be a program name with args.
20262set dummy $ac_prog; ac_word=$2
20263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20264$as_echo_n "checking for $ac_word... " >&6; }
20265if ${ac_cv_path_XATTR+:} false; then :
20266  $as_echo_n "(cached) " >&6
20267else
20268  case $XATTR in
20269  [\\/]* | ?:[\\/]*)
20270  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20271  ;;
20272  *)
20273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20274for as_dir in $PATH
20275do
20276  IFS=$as_save_IFS
20277  test -z "$as_dir" && as_dir=.
20278    for ac_exec_ext in '' $ac_executable_extensions; do
20279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20280    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20282    break 2
20283  fi
20284done
20285  done
20286IFS=$as_save_IFS
20287
20288  ;;
20289esac
20290fi
20291XATTR=$ac_cv_path_XATTR
20292if test -n "$XATTR"; then
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20294$as_echo "$XATTR" >&6; }
20295else
20296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20297$as_echo "no" >&6; }
20298fi
20299
20300
20301  test -n "$XATTR" && break
20302done
20303
20304  else
20305    # The variable is set, but is it from the command line or the environment?
20306
20307    # Try to remove the string !XATTR! from our list.
20308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
20309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20310      # If it failed, the variable was not from the command line. Ignore it,
20311      # but warn the user (except for BASH, which is always set by the calling BASH).
20312      if test "xXATTR" != xBASH; then
20313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
20314$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
20315      fi
20316      # Try to locate tool using the code snippet
20317      for ac_prog in xattr
20318do
20319  # Extract the first word of "$ac_prog", so it can be a program name with args.
20320set dummy $ac_prog; ac_word=$2
20321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20322$as_echo_n "checking for $ac_word... " >&6; }
20323if ${ac_cv_path_XATTR+:} false; then :
20324  $as_echo_n "(cached) " >&6
20325else
20326  case $XATTR in
20327  [\\/]* | ?:[\\/]*)
20328  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20329  ;;
20330  *)
20331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20332for as_dir in $PATH
20333do
20334  IFS=$as_save_IFS
20335  test -z "$as_dir" && as_dir=.
20336    for ac_exec_ext in '' $ac_executable_extensions; do
20337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20338    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20340    break 2
20341  fi
20342done
20343  done
20344IFS=$as_save_IFS
20345
20346  ;;
20347esac
20348fi
20349XATTR=$ac_cv_path_XATTR
20350if test -n "$XATTR"; then
20351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20352$as_echo "$XATTR" >&6; }
20353else
20354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20355$as_echo "no" >&6; }
20356fi
20357
20358
20359  test -n "$XATTR" && break
20360done
20361
20362    else
20363      # If it succeeded, then it was overridden by the user. We will use it
20364      # for the tool.
20365
20366      # First remove it from the list of overridden variables, so we can test
20367      # for unknown variables in the end.
20368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20369
20370      # Check if we try to supply an empty value
20371      if test "x$XATTR" = x; then
20372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
20373$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
20374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20375$as_echo_n "checking for XATTR... " >&6; }
20376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20377$as_echo "disabled" >&6; }
20378      else
20379        # Check if the provided tool contains a complete path.
20380        tool_specified="$XATTR"
20381        tool_basename="${tool_specified##*/}"
20382        if test "x$tool_basename" = "x$tool_specified"; then
20383          # A command without a complete path is provided, search $PATH.
20384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
20385$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
20386          # Extract the first word of "$tool_basename", so it can be a program name with args.
20387set dummy $tool_basename; ac_word=$2
20388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20389$as_echo_n "checking for $ac_word... " >&6; }
20390if ${ac_cv_path_XATTR+:} false; then :
20391  $as_echo_n "(cached) " >&6
20392else
20393  case $XATTR in
20394  [\\/]* | ?:[\\/]*)
20395  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20396  ;;
20397  *)
20398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20399for as_dir in $PATH
20400do
20401  IFS=$as_save_IFS
20402  test -z "$as_dir" && as_dir=.
20403    for ac_exec_ext in '' $ac_executable_extensions; do
20404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20405    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20407    break 2
20408  fi
20409done
20410  done
20411IFS=$as_save_IFS
20412
20413  ;;
20414esac
20415fi
20416XATTR=$ac_cv_path_XATTR
20417if test -n "$XATTR"; then
20418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20419$as_echo "$XATTR" >&6; }
20420else
20421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20422$as_echo "no" >&6; }
20423fi
20424
20425
20426          if test "x$XATTR" = x; then
20427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20428          fi
20429        else
20430          # Otherwise we believe it is a complete path. Use it as it is.
20431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
20432$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
20433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20434$as_echo_n "checking for XATTR... " >&6; }
20435          if test ! -x "$tool_specified"; then
20436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20437$as_echo "not found" >&6; }
20438            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
20439          fi
20440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20441$as_echo "$tool_specified" >&6; }
20442        fi
20443      fi
20444    fi
20445  fi
20446
20447
20448
20449  if test "x$XATTR" = x; then
20450    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
20451  fi
20452
20453
20454
20455
20456  # Publish this variable in the help.
20457
20458
20459  if [ -z "${CODESIGN+x}" ]; then
20460    # The variable is not set by user, try to locate tool using the code snippet
20461    for ac_prog in codesign
20462do
20463  # Extract the first word of "$ac_prog", so it can be a program name with args.
20464set dummy $ac_prog; ac_word=$2
20465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20466$as_echo_n "checking for $ac_word... " >&6; }
20467if ${ac_cv_path_CODESIGN+:} false; then :
20468  $as_echo_n "(cached) " >&6
20469else
20470  case $CODESIGN in
20471  [\\/]* | ?:[\\/]*)
20472  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20473  ;;
20474  *)
20475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20476for as_dir in $PATH
20477do
20478  IFS=$as_save_IFS
20479  test -z "$as_dir" && as_dir=.
20480    for ac_exec_ext in '' $ac_executable_extensions; do
20481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20482    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20484    break 2
20485  fi
20486done
20487  done
20488IFS=$as_save_IFS
20489
20490  ;;
20491esac
20492fi
20493CODESIGN=$ac_cv_path_CODESIGN
20494if test -n "$CODESIGN"; then
20495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20496$as_echo "$CODESIGN" >&6; }
20497else
20498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20499$as_echo "no" >&6; }
20500fi
20501
20502
20503  test -n "$CODESIGN" && break
20504done
20505
20506  else
20507    # The variable is set, but is it from the command line or the environment?
20508
20509    # Try to remove the string !CODESIGN! from our list.
20510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
20511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20512      # If it failed, the variable was not from the command line. Ignore it,
20513      # but warn the user (except for BASH, which is always set by the calling BASH).
20514      if test "xCODESIGN" != xBASH; then
20515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
20516$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
20517      fi
20518      # Try to locate tool using the code snippet
20519      for ac_prog in codesign
20520do
20521  # Extract the first word of "$ac_prog", so it can be a program name with args.
20522set dummy $ac_prog; ac_word=$2
20523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20524$as_echo_n "checking for $ac_word... " >&6; }
20525if ${ac_cv_path_CODESIGN+:} false; then :
20526  $as_echo_n "(cached) " >&6
20527else
20528  case $CODESIGN in
20529  [\\/]* | ?:[\\/]*)
20530  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20531  ;;
20532  *)
20533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20534for as_dir in $PATH
20535do
20536  IFS=$as_save_IFS
20537  test -z "$as_dir" && as_dir=.
20538    for ac_exec_ext in '' $ac_executable_extensions; do
20539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20540    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20542    break 2
20543  fi
20544done
20545  done
20546IFS=$as_save_IFS
20547
20548  ;;
20549esac
20550fi
20551CODESIGN=$ac_cv_path_CODESIGN
20552if test -n "$CODESIGN"; then
20553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20554$as_echo "$CODESIGN" >&6; }
20555else
20556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20557$as_echo "no" >&6; }
20558fi
20559
20560
20561  test -n "$CODESIGN" && break
20562done
20563
20564    else
20565      # If it succeeded, then it was overridden by the user. We will use it
20566      # for the tool.
20567
20568      # First remove it from the list of overridden variables, so we can test
20569      # for unknown variables in the end.
20570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20571
20572      # Check if we try to supply an empty value
20573      if test "x$CODESIGN" = x; then
20574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
20575$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
20576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20577$as_echo_n "checking for CODESIGN... " >&6; }
20578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20579$as_echo "disabled" >&6; }
20580      else
20581        # Check if the provided tool contains a complete path.
20582        tool_specified="$CODESIGN"
20583        tool_basename="${tool_specified##*/}"
20584        if test "x$tool_basename" = "x$tool_specified"; then
20585          # A command without a complete path is provided, search $PATH.
20586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
20587$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
20588          # Extract the first word of "$tool_basename", so it can be a program name with args.
20589set dummy $tool_basename; ac_word=$2
20590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20591$as_echo_n "checking for $ac_word... " >&6; }
20592if ${ac_cv_path_CODESIGN+:} false; then :
20593  $as_echo_n "(cached) " >&6
20594else
20595  case $CODESIGN in
20596  [\\/]* | ?:[\\/]*)
20597  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20598  ;;
20599  *)
20600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20601for as_dir in $PATH
20602do
20603  IFS=$as_save_IFS
20604  test -z "$as_dir" && as_dir=.
20605    for ac_exec_ext in '' $ac_executable_extensions; do
20606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20607    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20609    break 2
20610  fi
20611done
20612  done
20613IFS=$as_save_IFS
20614
20615  ;;
20616esac
20617fi
20618CODESIGN=$ac_cv_path_CODESIGN
20619if test -n "$CODESIGN"; then
20620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20621$as_echo "$CODESIGN" >&6; }
20622else
20623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20624$as_echo "no" >&6; }
20625fi
20626
20627
20628          if test "x$CODESIGN" = x; then
20629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20630          fi
20631        else
20632          # Otherwise we believe it is a complete path. Use it as it is.
20633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
20634$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
20635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20636$as_echo_n "checking for CODESIGN... " >&6; }
20637          if test ! -x "$tool_specified"; then
20638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20639$as_echo "not found" >&6; }
20640            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
20641          fi
20642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20643$as_echo "$tool_specified" >&6; }
20644        fi
20645      fi
20646    fi
20647  fi
20648
20649
20650    if test "x$CODESIGN" != "x"; then
20651      # Verify that the openjdk_codesign certificate is present
20652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
20653$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
20654      rm -f codesign-testfile
20655      touch codesign-testfile
20656      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
20657      rm -f codesign-testfile
20658      if test "x$CODESIGN" = x; then
20659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20660$as_echo "no" >&6; }
20661      else
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20663$as_echo "yes" >&6; }
20664      fi
20665    fi
20666
20667
20668
20669  # Publish this variable in the help.
20670
20671
20672  if [ -z "${SETFILE+x}" ]; then
20673    # The variable is not set by user, try to locate tool using the code snippet
20674    for ac_prog in SetFile
20675do
20676  # Extract the first word of "$ac_prog", so it can be a program name with args.
20677set dummy $ac_prog; ac_word=$2
20678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20679$as_echo_n "checking for $ac_word... " >&6; }
20680if ${ac_cv_path_SETFILE+:} false; then :
20681  $as_echo_n "(cached) " >&6
20682else
20683  case $SETFILE in
20684  [\\/]* | ?:[\\/]*)
20685  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20686  ;;
20687  *)
20688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20689for as_dir in $PATH
20690do
20691  IFS=$as_save_IFS
20692  test -z "$as_dir" && as_dir=.
20693    for ac_exec_ext in '' $ac_executable_extensions; do
20694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20695    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20697    break 2
20698  fi
20699done
20700  done
20701IFS=$as_save_IFS
20702
20703  ;;
20704esac
20705fi
20706SETFILE=$ac_cv_path_SETFILE
20707if test -n "$SETFILE"; then
20708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20709$as_echo "$SETFILE" >&6; }
20710else
20711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20712$as_echo "no" >&6; }
20713fi
20714
20715
20716  test -n "$SETFILE" && break
20717done
20718
20719  else
20720    # The variable is set, but is it from the command line or the environment?
20721
20722    # Try to remove the string !SETFILE! from our list.
20723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
20724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20725      # If it failed, the variable was not from the command line. Ignore it,
20726      # but warn the user (except for BASH, which is always set by the calling BASH).
20727      if test "xSETFILE" != xBASH; then
20728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
20729$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
20730      fi
20731      # Try to locate tool using the code snippet
20732      for ac_prog in SetFile
20733do
20734  # Extract the first word of "$ac_prog", so it can be a program name with args.
20735set dummy $ac_prog; ac_word=$2
20736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20737$as_echo_n "checking for $ac_word... " >&6; }
20738if ${ac_cv_path_SETFILE+:} false; then :
20739  $as_echo_n "(cached) " >&6
20740else
20741  case $SETFILE in
20742  [\\/]* | ?:[\\/]*)
20743  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20744  ;;
20745  *)
20746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20747for as_dir in $PATH
20748do
20749  IFS=$as_save_IFS
20750  test -z "$as_dir" && as_dir=.
20751    for ac_exec_ext in '' $ac_executable_extensions; do
20752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20753    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20755    break 2
20756  fi
20757done
20758  done
20759IFS=$as_save_IFS
20760
20761  ;;
20762esac
20763fi
20764SETFILE=$ac_cv_path_SETFILE
20765if test -n "$SETFILE"; then
20766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20767$as_echo "$SETFILE" >&6; }
20768else
20769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20770$as_echo "no" >&6; }
20771fi
20772
20773
20774  test -n "$SETFILE" && break
20775done
20776
20777    else
20778      # If it succeeded, then it was overridden by the user. We will use it
20779      # for the tool.
20780
20781      # First remove it from the list of overridden variables, so we can test
20782      # for unknown variables in the end.
20783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20784
20785      # Check if we try to supply an empty value
20786      if test "x$SETFILE" = x; then
20787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
20788$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
20789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
20790$as_echo_n "checking for SETFILE... " >&6; }
20791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20792$as_echo "disabled" >&6; }
20793      else
20794        # Check if the provided tool contains a complete path.
20795        tool_specified="$SETFILE"
20796        tool_basename="${tool_specified##*/}"
20797        if test "x$tool_basename" = "x$tool_specified"; then
20798          # A command without a complete path is provided, search $PATH.
20799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
20800$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
20801          # Extract the first word of "$tool_basename", so it can be a program name with args.
20802set dummy $tool_basename; ac_word=$2
20803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20804$as_echo_n "checking for $ac_word... " >&6; }
20805if ${ac_cv_path_SETFILE+:} false; then :
20806  $as_echo_n "(cached) " >&6
20807else
20808  case $SETFILE in
20809  [\\/]* | ?:[\\/]*)
20810  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20811  ;;
20812  *)
20813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20814for as_dir in $PATH
20815do
20816  IFS=$as_save_IFS
20817  test -z "$as_dir" && as_dir=.
20818    for ac_exec_ext in '' $ac_executable_extensions; do
20819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20820    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20822    break 2
20823  fi
20824done
20825  done
20826IFS=$as_save_IFS
20827
20828  ;;
20829esac
20830fi
20831SETFILE=$ac_cv_path_SETFILE
20832if test -n "$SETFILE"; then
20833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20834$as_echo "$SETFILE" >&6; }
20835else
20836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20837$as_echo "no" >&6; }
20838fi
20839
20840
20841          if test "x$SETFILE" = x; then
20842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20843          fi
20844        else
20845          # Otherwise we believe it is a complete path. Use it as it is.
20846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
20847$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
20848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
20849$as_echo_n "checking for SETFILE... " >&6; }
20850          if test ! -x "$tool_specified"; then
20851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20852$as_echo "not found" >&6; }
20853            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
20854          fi
20855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20856$as_echo "$tool_specified" >&6; }
20857        fi
20858      fi
20859    fi
20860  fi
20861
20862
20863
20864  if test "x$SETFILE" = x; then
20865    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
20866  fi
20867
20868
20869  fi
20870
20871
20872  # Test if bash supports pipefail.
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
20874$as_echo_n "checking if bash supports pipefail... " >&6; }
20875  if ${BASH} -c 'set -o pipefail'; then
20876    BASH_ARGS="$BASH_ARGS -o pipefail"
20877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20878$as_echo "yes" >&6; }
20879  else
20880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20881$as_echo "no" >&6; }
20882  fi
20883
20884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
20885$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
20886  if ${BASH} -e -c 'true'; then
20887    BASH_ARGS="$BASH_ARGS -e"
20888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20889$as_echo "yes" >&6; }
20890  else
20891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20892$as_echo "no" >&6; }
20893  fi
20894
20895
20896
20897
20898# Check if pkg-config is available.
20899
20900
20901if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
20902	if test -n "$ac_tool_prefix"; then
20903  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
20904set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
20905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20906$as_echo_n "checking for $ac_word... " >&6; }
20907if ${ac_cv_path_PKG_CONFIG+:} false; then :
20908  $as_echo_n "(cached) " >&6
20909else
20910  case $PKG_CONFIG in
20911  [\\/]* | ?:[\\/]*)
20912  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
20913  ;;
20914  *)
20915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20916for as_dir in $PATH
20917do
20918  IFS=$as_save_IFS
20919  test -z "$as_dir" && as_dir=.
20920    for ac_exec_ext in '' $ac_executable_extensions; do
20921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20922    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20924    break 2
20925  fi
20926done
20927  done
20928IFS=$as_save_IFS
20929
20930  ;;
20931esac
20932fi
20933PKG_CONFIG=$ac_cv_path_PKG_CONFIG
20934if test -n "$PKG_CONFIG"; then
20935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
20936$as_echo "$PKG_CONFIG" >&6; }
20937else
20938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20939$as_echo "no" >&6; }
20940fi
20941
20942
20943fi
20944if test -z "$ac_cv_path_PKG_CONFIG"; then
20945  ac_pt_PKG_CONFIG=$PKG_CONFIG
20946  # Extract the first word of "pkg-config", so it can be a program name with args.
20947set dummy pkg-config; ac_word=$2
20948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20949$as_echo_n "checking for $ac_word... " >&6; }
20950if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
20951  $as_echo_n "(cached) " >&6
20952else
20953  case $ac_pt_PKG_CONFIG in
20954  [\\/]* | ?:[\\/]*)
20955  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
20956  ;;
20957  *)
20958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20959for as_dir in $PATH
20960do
20961  IFS=$as_save_IFS
20962  test -z "$as_dir" && as_dir=.
20963    for ac_exec_ext in '' $ac_executable_extensions; do
20964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20965    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20967    break 2
20968  fi
20969done
20970  done
20971IFS=$as_save_IFS
20972
20973  ;;
20974esac
20975fi
20976ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
20977if test -n "$ac_pt_PKG_CONFIG"; then
20978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
20979$as_echo "$ac_pt_PKG_CONFIG" >&6; }
20980else
20981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20982$as_echo "no" >&6; }
20983fi
20984
20985  if test "x$ac_pt_PKG_CONFIG" = x; then
20986    PKG_CONFIG=""
20987  else
20988    case $cross_compiling:$ac_tool_warned in
20989yes:)
20990{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20991$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20992ac_tool_warned=yes ;;
20993esac
20994    PKG_CONFIG=$ac_pt_PKG_CONFIG
20995  fi
20996else
20997  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
20998fi
20999
21000fi
21001if test -n "$PKG_CONFIG"; then
21002	_pkg_min_version=0.9.0
21003	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
21004$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
21005	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
21006		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21007$as_echo "yes" >&6; }
21008	else
21009		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21010$as_echo "no" >&6; }
21011		PKG_CONFIG=""
21012	fi
21013
21014fi
21015
21016# After basic tools have been setup, we can check build os specific details.
21017
21018  ###############################################################################
21019
21020  # Note that this is the build platform OS version!
21021
21022  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
21023  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
21024  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
21025  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
21026
21027
21028
21029
21030
21031###############################################################################
21032#
21033# Determine OpenJDK variants, options and version numbers.
21034#
21035###############################################################################
21036
21037# We need build & target for this.
21038
21039
21040  ###############################################################################
21041  #
21042  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
21043  # We always build headless support.
21044  #
21045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
21046$as_echo_n "checking headful support... " >&6; }
21047  # Check whether --enable-headful was given.
21048if test "${enable_headful+set}" = set; then :
21049  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
21050else
21051  SUPPORT_HEADFUL=yes
21052fi
21053
21054
21055  SUPPORT_HEADLESS=yes
21056  BUILD_HEADLESS="BUILD_HEADLESS:=true"
21057
21058  if test "x$SUPPORT_HEADFUL" = xyes; then
21059    # We are building both headful and headless.
21060    headful_msg="include support for both headful and headless"
21061  fi
21062
21063  if test "x$SUPPORT_HEADFUL" = xno; then
21064    # Thus we are building headless only.
21065    BUILD_HEADLESS="BUILD_HEADLESS:=true"
21066    headful_msg="headless only"
21067  fi
21068
21069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
21070$as_echo "$headful_msg" >&6; }
21071
21072
21073
21074
21075
21076  # Control wether Hotspot runs Queens test after build.
21077  # Check whether --enable-hotspot-test-in-build was given.
21078if test "${enable_hotspot_test_in_build+set}" = set; then :
21079  enableval=$enable_hotspot_test_in_build;
21080else
21081  enable_hotspot_test_in_build=no
21082fi
21083
21084  if test "x$enable_hotspot_test_in_build" = "xyes"; then
21085    TEST_IN_BUILD=true
21086  else
21087    TEST_IN_BUILD=false
21088  fi
21089
21090
21091  ###############################################################################
21092  #
21093  # Choose cacerts source file
21094  #
21095
21096# Check whether --with-cacerts-file was given.
21097if test "${with_cacerts_file+set}" = set; then :
21098  withval=$with_cacerts_file;
21099fi
21100
21101  if test "x$with_cacerts_file" != x; then
21102    CACERTS_FILE=$with_cacerts_file
21103  fi
21104
21105
21106  ###############################################################################
21107  #
21108  # Enable or disable unlimited crypto
21109  #
21110  # Check whether --enable-unlimited-crypto was given.
21111if test "${enable_unlimited_crypto+set}" = set; then :
21112  enableval=$enable_unlimited_crypto;
21113else
21114  enable_unlimited_crypto=no
21115fi
21116
21117  if test "x$enable_unlimited_crypto" = "xyes"; then
21118    UNLIMITED_CRYPTO=true
21119  else
21120    UNLIMITED_CRYPTO=false
21121  fi
21122
21123
21124  ###############################################################################
21125  #
21126  # Enable or disable the elliptic curve crypto implementation
21127  #
21128
21129
21130  ###############################################################################
21131  #
21132  # Compress jars
21133  #
21134  COMPRESS_JARS=false
21135
21136
21137
21138
21139  # Source the version numbers
21140  . $AUTOCONF_DIR/version-numbers
21141
21142  # Get the settings from parameters
21143
21144# Check whether --with-milestone was given.
21145if test "${with_milestone+set}" = set; then :
21146  withval=$with_milestone;
21147fi
21148
21149  if test "x$with_milestone" = xyes; then
21150    as_fn_error $? "Milestone must have a value" "$LINENO" 5
21151  elif test "x$with_milestone" != x; then
21152    MILESTONE="$with_milestone"
21153  fi
21154  if test "x$MILESTONE" = x; then
21155    MILESTONE=internal
21156  fi
21157
21158
21159# Check whether --with-update-version was given.
21160if test "${with_update_version+set}" = set; then :
21161  withval=$with_update_version;
21162fi
21163
21164  if test "x$with_update_version" = xyes; then
21165    as_fn_error $? "Update version must have a value" "$LINENO" 5
21166  elif test "x$with_update_version" != x; then
21167    JDK_UPDATE_VERSION="$with_update_version"
21168    # On macosx 10.7, it's not possible to set --with-update-version=0X due
21169    # to a bug in expr (which reduces it to just X). To work around this, we
21170    # always add a 0 to one digit update versions.
21171    if test "${#JDK_UPDATE_VERSION}" = "1"; then
21172      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
21173    fi
21174  fi
21175
21176
21177# Check whether --with-user-release-suffix was given.
21178if test "${with_user_release_suffix+set}" = set; then :
21179  withval=$with_user_release_suffix;
21180fi
21181
21182  if test "x$with_user_release_suffix" = xyes; then
21183    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
21184  elif test "x$with_user_release_suffix" != x; then
21185    USER_RELEASE_SUFFIX="$with_user_release_suffix"
21186  fi
21187
21188
21189# Check whether --with-build-number was given.
21190if test "${with_build_number+set}" = set; then :
21191  withval=$with_build_number;
21192fi
21193
21194  if test "x$with_build_number" = xyes; then
21195    as_fn_error $? "Build number must have a value" "$LINENO" 5
21196  elif test "x$with_build_number" != x; then
21197    JDK_BUILD_NUMBER="$with_build_number"
21198  fi
21199  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
21200  if test "x$JDK_BUILD_NUMBER" = x; then
21201    JDK_BUILD_NUMBER=b00
21202    if test "x$USER_RELEASE_SUFFIX" = x; then
21203      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
21204      # Avoid [:alnum:] since it depends on the locale.
21205      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
21206      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21207    fi
21208  fi
21209
21210  # Now set the JDK version, milestone, build number etc.
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227# Check whether --with-copyright-year was given.
21228if test "${with_copyright_year+set}" = set; then :
21229  withval=$with_copyright_year;
21230fi
21231
21232  if test "x$with_copyright_year" = xyes; then
21233    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
21234  elif test "x$with_copyright_year" != x; then
21235    COPYRIGHT_YEAR="$with_copyright_year"
21236  else
21237    COPYRIGHT_YEAR=`date +'%Y'`
21238  fi
21239
21240
21241  if test "x$JDK_UPDATE_VERSION" != x; then
21242    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
21243  else
21244    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
21245  fi
21246
21247
21248  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
21249
21250
21251
21252###############################################################################
21253#
21254# Setup BootJDK, used to bootstrap the build.
21255#
21256###############################################################################
21257
21258
21259  BOOT_JDK_FOUND=no
21260
21261# Check whether --with-boot-jdk was given.
21262if test "${with_boot_jdk+set}" = set; then :
21263  withval=$with_boot_jdk;
21264fi
21265
21266
21267  # We look for the Boot JDK through various means, going from more certain to
21268  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
21269  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
21270  # must check if this is indeed valid; otherwise we'll continue looking.
21271
21272  # Test: Is bootjdk explicitely set by command line arguments?
21273
21274  if test "x$BOOT_JDK_FOUND" = xno; then
21275    # Now execute the test
21276
21277  if test "x$with_boot_jdk" != x; then
21278    BOOT_JDK=$with_boot_jdk
21279    BOOT_JDK_FOUND=maybe
21280    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
21281$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
21282  fi
21283
21284
21285    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21286    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21287      # Do we have a bin/java?
21288      if test ! -x "$BOOT_JDK/bin/java"; then
21289        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21291        BOOT_JDK_FOUND=no
21292      else
21293        # Do we have a bin/javac?
21294        if test ! -x "$BOOT_JDK/bin/javac"; then
21295          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21297          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21298$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21299          BOOT_JDK_FOUND=no
21300        else
21301          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21302          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21303
21304          # Extra M4 quote needed to protect [] in grep expression.
21305          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21306          if test "x$FOUND_CORRECT_VERSION" = x; then
21307            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21309            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21310$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21311            BOOT_JDK_FOUND=no
21312          else
21313            # We're done! :-)
21314            BOOT_JDK_FOUND=yes
21315
21316  # Only process if variable expands to non-empty
21317
21318  if test "x$BOOT_JDK" != x; then
21319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21320
21321  # Input might be given as Windows format, start by converting to
21322  # unix format.
21323  path="$BOOT_JDK"
21324  new_path=`$CYGPATH -u "$path"`
21325
21326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21329  # "foo.exe" is OK but "foo" is an error.
21330  #
21331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21332  # It is also a way to make sure we got the proper file name for the real test later on.
21333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21334  if test "x$test_shortpath" = x; then
21335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21337    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21338  fi
21339
21340  # Call helper function which possibly converts this using DOS-style short mode.
21341  # If so, the updated path is stored in $new_path.
21342
21343  input_path="$new_path"
21344  # Check if we need to convert this using DOS-style short mode. If the path
21345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21346  # take no chances and rewrite it.
21347  # Note: m4 eats our [], so we need to use [ and ] instead.
21348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21349  if test "x$has_forbidden_chars" != x; then
21350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21354      # Going to short mode and back again did indeed matter. Since short mode is
21355      # case insensitive, let's make it lowercase to improve readability.
21356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21357      # Now convert it back to Unix-style (cygpath)
21358      input_path=`$CYGPATH -u "$shortmode_path"`
21359      new_path="$input_path"
21360    fi
21361  fi
21362
21363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21364  if test "x$test_cygdrive_prefix" = x; then
21365    # As a simple fix, exclude /usr/bin since it's not a real path.
21366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21368      # a path prefixed by /cygdrive for fixpath to work.
21369      new_path="$CYGWIN_ROOT_PATH$input_path"
21370    fi
21371  fi
21372
21373
21374  if test "x$path" != "x$new_path"; then
21375    BOOT_JDK="$new_path"
21376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21378  fi
21379
21380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21381
21382  path="$BOOT_JDK"
21383  has_colon=`$ECHO $path | $GREP ^.:`
21384  new_path="$path"
21385  if test "x$has_colon" = x; then
21386    # Not in mixed or Windows style, start by that.
21387    new_path=`cmd //c echo $path`
21388  fi
21389
21390
21391  input_path="$new_path"
21392  # Check if we need to convert this using DOS-style short mode. If the path
21393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21394  # take no chances and rewrite it.
21395  # Note: m4 eats our [], so we need to use [ and ] instead.
21396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21397  if test "x$has_forbidden_chars" != x; then
21398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21400  fi
21401
21402
21403  windows_path="$new_path"
21404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21405    unix_path=`$CYGPATH -u "$windows_path"`
21406    new_path="$unix_path"
21407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21409    new_path="$unix_path"
21410  fi
21411
21412  if test "x$path" != "x$new_path"; then
21413    BOOT_JDK="$new_path"
21414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21416  fi
21417
21418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21420
21421    else
21422      # We're on a unix platform. Hooray! :)
21423      path="$BOOT_JDK"
21424      has_space=`$ECHO "$path" | $GREP " "`
21425      if test "x$has_space" != x; then
21426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21429      fi
21430
21431      # Use eval to expand a potential ~
21432      eval path="$path"
21433      if test ! -f "$path" && test ! -d "$path"; then
21434        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21435      fi
21436
21437      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21438    fi
21439  fi
21440
21441            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21442$as_echo_n "checking for Boot JDK... " >&6; }
21443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21444$as_echo "$BOOT_JDK" >&6; }
21445            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21446$as_echo_n "checking Boot JDK version... " >&6; }
21447            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21449$as_echo "$BOOT_JDK_VERSION" >&6; }
21450          fi # end check jdk version
21451        fi # end check javac
21452      fi # end check java
21453    fi # end check boot jdk found
21454  fi
21455
21456  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
21457    # Having specified an argument which is incorrect will produce an instant failure;
21458    # we should not go on looking
21459    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
21460  fi
21461
21462  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21463
21464  if test "x$BOOT_JDK_FOUND" = xno; then
21465    # Now execute the test
21466
21467  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21468    # First check at user selected default
21469
21470  if test "x$BOOT_JDK_FOUND" = xno; then
21471    # Now execute the test
21472
21473  if test -x /usr/libexec/java_home; then
21474    BOOT_JDK=`/usr/libexec/java_home `
21475    BOOT_JDK_FOUND=maybe
21476    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21477$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21478  fi
21479
21480
21481    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21482    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21483      # Do we have a bin/java?
21484      if test ! -x "$BOOT_JDK/bin/java"; then
21485        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21487        BOOT_JDK_FOUND=no
21488      else
21489        # Do we have a bin/javac?
21490        if test ! -x "$BOOT_JDK/bin/javac"; then
21491          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21493          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21494$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21495          BOOT_JDK_FOUND=no
21496        else
21497          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21498          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21499
21500          # Extra M4 quote needed to protect [] in grep expression.
21501          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21502          if test "x$FOUND_CORRECT_VERSION" = x; then
21503            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21505            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21506$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21507            BOOT_JDK_FOUND=no
21508          else
21509            # We're done! :-)
21510            BOOT_JDK_FOUND=yes
21511
21512  # Only process if variable expands to non-empty
21513
21514  if test "x$BOOT_JDK" != x; then
21515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21516
21517  # Input might be given as Windows format, start by converting to
21518  # unix format.
21519  path="$BOOT_JDK"
21520  new_path=`$CYGPATH -u "$path"`
21521
21522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21525  # "foo.exe" is OK but "foo" is an error.
21526  #
21527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21528  # It is also a way to make sure we got the proper file name for the real test later on.
21529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21530  if test "x$test_shortpath" = x; then
21531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21533    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21534  fi
21535
21536  # Call helper function which possibly converts this using DOS-style short mode.
21537  # If so, the updated path is stored in $new_path.
21538
21539  input_path="$new_path"
21540  # Check if we need to convert this using DOS-style short mode. If the path
21541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21542  # take no chances and rewrite it.
21543  # Note: m4 eats our [], so we need to use [ and ] instead.
21544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21545  if test "x$has_forbidden_chars" != x; then
21546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21550      # Going to short mode and back again did indeed matter. Since short mode is
21551      # case insensitive, let's make it lowercase to improve readability.
21552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21553      # Now convert it back to Unix-style (cygpath)
21554      input_path=`$CYGPATH -u "$shortmode_path"`
21555      new_path="$input_path"
21556    fi
21557  fi
21558
21559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21560  if test "x$test_cygdrive_prefix" = x; then
21561    # As a simple fix, exclude /usr/bin since it's not a real path.
21562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21564      # a path prefixed by /cygdrive for fixpath to work.
21565      new_path="$CYGWIN_ROOT_PATH$input_path"
21566    fi
21567  fi
21568
21569
21570  if test "x$path" != "x$new_path"; then
21571    BOOT_JDK="$new_path"
21572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21574  fi
21575
21576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21577
21578  path="$BOOT_JDK"
21579  has_colon=`$ECHO $path | $GREP ^.:`
21580  new_path="$path"
21581  if test "x$has_colon" = x; then
21582    # Not in mixed or Windows style, start by that.
21583    new_path=`cmd //c echo $path`
21584  fi
21585
21586
21587  input_path="$new_path"
21588  # Check if we need to convert this using DOS-style short mode. If the path
21589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21590  # take no chances and rewrite it.
21591  # Note: m4 eats our [], so we need to use [ and ] instead.
21592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21593  if test "x$has_forbidden_chars" != x; then
21594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21596  fi
21597
21598
21599  windows_path="$new_path"
21600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21601    unix_path=`$CYGPATH -u "$windows_path"`
21602    new_path="$unix_path"
21603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21605    new_path="$unix_path"
21606  fi
21607
21608  if test "x$path" != "x$new_path"; then
21609    BOOT_JDK="$new_path"
21610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21611$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21612  fi
21613
21614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21616
21617    else
21618      # We're on a unix platform. Hooray! :)
21619      path="$BOOT_JDK"
21620      has_space=`$ECHO "$path" | $GREP " "`
21621      if test "x$has_space" != x; then
21622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21625      fi
21626
21627      # Use eval to expand a potential ~
21628      eval path="$path"
21629      if test ! -f "$path" && test ! -d "$path"; then
21630        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21631      fi
21632
21633      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21634    fi
21635  fi
21636
21637            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21638$as_echo_n "checking for Boot JDK... " >&6; }
21639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21640$as_echo "$BOOT_JDK" >&6; }
21641            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21642$as_echo_n "checking Boot JDK version... " >&6; }
21643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21645$as_echo "$BOOT_JDK_VERSION" >&6; }
21646          fi # end check jdk version
21647        fi # end check javac
21648      fi # end check java
21649    fi # end check boot jdk found
21650  fi
21651
21652    # If that did not work out (e.g. too old), try explicit versions instead
21653
21654  if test "x$BOOT_JDK_FOUND" = xno; then
21655    # Now execute the test
21656
21657  if test -x /usr/libexec/java_home; then
21658    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21659    BOOT_JDK_FOUND=maybe
21660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21661$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21662  fi
21663
21664
21665    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21666    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21667      # Do we have a bin/java?
21668      if test ! -x "$BOOT_JDK/bin/java"; then
21669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21671        BOOT_JDK_FOUND=no
21672      else
21673        # Do we have a bin/javac?
21674        if test ! -x "$BOOT_JDK/bin/javac"; then
21675          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21677          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21678$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21679          BOOT_JDK_FOUND=no
21680        else
21681          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21682          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21683
21684          # Extra M4 quote needed to protect [] in grep expression.
21685          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21686          if test "x$FOUND_CORRECT_VERSION" = x; then
21687            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21689            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21690$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21691            BOOT_JDK_FOUND=no
21692          else
21693            # We're done! :-)
21694            BOOT_JDK_FOUND=yes
21695
21696  # Only process if variable expands to non-empty
21697
21698  if test "x$BOOT_JDK" != x; then
21699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21700
21701  # Input might be given as Windows format, start by converting to
21702  # unix format.
21703  path="$BOOT_JDK"
21704  new_path=`$CYGPATH -u "$path"`
21705
21706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21709  # "foo.exe" is OK but "foo" is an error.
21710  #
21711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21712  # It is also a way to make sure we got the proper file name for the real test later on.
21713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21714  if test "x$test_shortpath" = x; then
21715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21717    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21718  fi
21719
21720  # Call helper function which possibly converts this using DOS-style short mode.
21721  # If so, the updated path is stored in $new_path.
21722
21723  input_path="$new_path"
21724  # Check if we need to convert this using DOS-style short mode. If the path
21725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21726  # take no chances and rewrite it.
21727  # Note: m4 eats our [], so we need to use [ and ] instead.
21728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21729  if test "x$has_forbidden_chars" != x; then
21730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21734      # Going to short mode and back again did indeed matter. Since short mode is
21735      # case insensitive, let's make it lowercase to improve readability.
21736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21737      # Now convert it back to Unix-style (cygpath)
21738      input_path=`$CYGPATH -u "$shortmode_path"`
21739      new_path="$input_path"
21740    fi
21741  fi
21742
21743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21744  if test "x$test_cygdrive_prefix" = x; then
21745    # As a simple fix, exclude /usr/bin since it's not a real path.
21746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21748      # a path prefixed by /cygdrive for fixpath to work.
21749      new_path="$CYGWIN_ROOT_PATH$input_path"
21750    fi
21751  fi
21752
21753
21754  if test "x$path" != "x$new_path"; then
21755    BOOT_JDK="$new_path"
21756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21758  fi
21759
21760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21761
21762  path="$BOOT_JDK"
21763  has_colon=`$ECHO $path | $GREP ^.:`
21764  new_path="$path"
21765  if test "x$has_colon" = x; then
21766    # Not in mixed or Windows style, start by that.
21767    new_path=`cmd //c echo $path`
21768  fi
21769
21770
21771  input_path="$new_path"
21772  # Check if we need to convert this using DOS-style short mode. If the path
21773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21774  # take no chances and rewrite it.
21775  # Note: m4 eats our [], so we need to use [ and ] instead.
21776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21777  if test "x$has_forbidden_chars" != x; then
21778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21780  fi
21781
21782
21783  windows_path="$new_path"
21784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21785    unix_path=`$CYGPATH -u "$windows_path"`
21786    new_path="$unix_path"
21787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21789    new_path="$unix_path"
21790  fi
21791
21792  if test "x$path" != "x$new_path"; then
21793    BOOT_JDK="$new_path"
21794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21796  fi
21797
21798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21800
21801    else
21802      # We're on a unix platform. Hooray! :)
21803      path="$BOOT_JDK"
21804      has_space=`$ECHO "$path" | $GREP " "`
21805      if test "x$has_space" != x; then
21806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21807$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21809      fi
21810
21811      # Use eval to expand a potential ~
21812      eval path="$path"
21813      if test ! -f "$path" && test ! -d "$path"; then
21814        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21815      fi
21816
21817      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21818    fi
21819  fi
21820
21821            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21822$as_echo_n "checking for Boot JDK... " >&6; }
21823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21824$as_echo "$BOOT_JDK" >&6; }
21825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21826$as_echo_n "checking Boot JDK version... " >&6; }
21827            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21829$as_echo "$BOOT_JDK_VERSION" >&6; }
21830          fi # end check jdk version
21831        fi # end check javac
21832      fi # end check java
21833    fi # end check boot jdk found
21834  fi
21835
21836
21837  if test "x$BOOT_JDK_FOUND" = xno; then
21838    # Now execute the test
21839
21840  if test -x /usr/libexec/java_home; then
21841    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21842    BOOT_JDK_FOUND=maybe
21843    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21844$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21845  fi
21846
21847
21848    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21849    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21850      # Do we have a bin/java?
21851      if test ! -x "$BOOT_JDK/bin/java"; then
21852        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21854        BOOT_JDK_FOUND=no
21855      else
21856        # Do we have a bin/javac?
21857        if test ! -x "$BOOT_JDK/bin/javac"; then
21858          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21860          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21861$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21862          BOOT_JDK_FOUND=no
21863        else
21864          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21865          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21866
21867          # Extra M4 quote needed to protect [] in grep expression.
21868          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21869          if test "x$FOUND_CORRECT_VERSION" = x; then
21870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21872            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21873$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21874            BOOT_JDK_FOUND=no
21875          else
21876            # We're done! :-)
21877            BOOT_JDK_FOUND=yes
21878
21879  # Only process if variable expands to non-empty
21880
21881  if test "x$BOOT_JDK" != x; then
21882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21883
21884  # Input might be given as Windows format, start by converting to
21885  # unix format.
21886  path="$BOOT_JDK"
21887  new_path=`$CYGPATH -u "$path"`
21888
21889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21892  # "foo.exe" is OK but "foo" is an error.
21893  #
21894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21895  # It is also a way to make sure we got the proper file name for the real test later on.
21896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21897  if test "x$test_shortpath" = x; then
21898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21900    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21901  fi
21902
21903  # Call helper function which possibly converts this using DOS-style short mode.
21904  # If so, the updated path is stored in $new_path.
21905
21906  input_path="$new_path"
21907  # Check if we need to convert this using DOS-style short mode. If the path
21908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21909  # take no chances and rewrite it.
21910  # Note: m4 eats our [], so we need to use [ and ] instead.
21911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21912  if test "x$has_forbidden_chars" != x; then
21913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21917      # Going to short mode and back again did indeed matter. Since short mode is
21918      # case insensitive, let's make it lowercase to improve readability.
21919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21920      # Now convert it back to Unix-style (cygpath)
21921      input_path=`$CYGPATH -u "$shortmode_path"`
21922      new_path="$input_path"
21923    fi
21924  fi
21925
21926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21927  if test "x$test_cygdrive_prefix" = x; then
21928    # As a simple fix, exclude /usr/bin since it's not a real path.
21929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21931      # a path prefixed by /cygdrive for fixpath to work.
21932      new_path="$CYGWIN_ROOT_PATH$input_path"
21933    fi
21934  fi
21935
21936
21937  if test "x$path" != "x$new_path"; then
21938    BOOT_JDK="$new_path"
21939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21941  fi
21942
21943    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21944
21945  path="$BOOT_JDK"
21946  has_colon=`$ECHO $path | $GREP ^.:`
21947  new_path="$path"
21948  if test "x$has_colon" = x; then
21949    # Not in mixed or Windows style, start by that.
21950    new_path=`cmd //c echo $path`
21951  fi
21952
21953
21954  input_path="$new_path"
21955  # Check if we need to convert this using DOS-style short mode. If the path
21956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21957  # take no chances and rewrite it.
21958  # Note: m4 eats our [], so we need to use [ and ] instead.
21959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21960  if test "x$has_forbidden_chars" != x; then
21961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21963  fi
21964
21965
21966  windows_path="$new_path"
21967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21968    unix_path=`$CYGPATH -u "$windows_path"`
21969    new_path="$unix_path"
21970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21972    new_path="$unix_path"
21973  fi
21974
21975  if test "x$path" != "x$new_path"; then
21976    BOOT_JDK="$new_path"
21977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21979  fi
21980
21981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21983
21984    else
21985      # We're on a unix platform. Hooray! :)
21986      path="$BOOT_JDK"
21987      has_space=`$ECHO "$path" | $GREP " "`
21988      if test "x$has_space" != x; then
21989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21991        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21992      fi
21993
21994      # Use eval to expand a potential ~
21995      eval path="$path"
21996      if test ! -f "$path" && test ! -d "$path"; then
21997        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21998      fi
21999
22000      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22001    fi
22002  fi
22003
22004            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22005$as_echo_n "checking for Boot JDK... " >&6; }
22006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22007$as_echo "$BOOT_JDK" >&6; }
22008            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22009$as_echo_n "checking Boot JDK version... " >&6; }
22010            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22012$as_echo "$BOOT_JDK_VERSION" >&6; }
22013          fi # end check jdk version
22014        fi # end check javac
22015      fi # end check java
22016    fi # end check boot jdk found
22017  fi
22018
22019
22020  if test "x$BOOT_JDK_FOUND" = xno; then
22021    # Now execute the test
22022
22023  if test -x /usr/libexec/java_home; then
22024    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
22025    BOOT_JDK_FOUND=maybe
22026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
22027$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
22028  fi
22029
22030
22031    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22032    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22033      # Do we have a bin/java?
22034      if test ! -x "$BOOT_JDK/bin/java"; then
22035        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22037        BOOT_JDK_FOUND=no
22038      else
22039        # Do we have a bin/javac?
22040        if test ! -x "$BOOT_JDK/bin/javac"; then
22041          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22043          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22044$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22045          BOOT_JDK_FOUND=no
22046        else
22047          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22048          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22049
22050          # Extra M4 quote needed to protect [] in grep expression.
22051          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22052          if test "x$FOUND_CORRECT_VERSION" = x; then
22053            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22055            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22056$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22057            BOOT_JDK_FOUND=no
22058          else
22059            # We're done! :-)
22060            BOOT_JDK_FOUND=yes
22061
22062  # Only process if variable expands to non-empty
22063
22064  if test "x$BOOT_JDK" != x; then
22065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22066
22067  # Input might be given as Windows format, start by converting to
22068  # unix format.
22069  path="$BOOT_JDK"
22070  new_path=`$CYGPATH -u "$path"`
22071
22072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22075  # "foo.exe" is OK but "foo" is an error.
22076  #
22077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22078  # It is also a way to make sure we got the proper file name for the real test later on.
22079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22080  if test "x$test_shortpath" = x; then
22081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22084  fi
22085
22086  # Call helper function which possibly converts this using DOS-style short mode.
22087  # If so, the updated path is stored in $new_path.
22088
22089  input_path="$new_path"
22090  # Check if we need to convert this using DOS-style short mode. If the path
22091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22092  # take no chances and rewrite it.
22093  # Note: m4 eats our [], so we need to use [ and ] instead.
22094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22095  if test "x$has_forbidden_chars" != x; then
22096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22100      # Going to short mode and back again did indeed matter. Since short mode is
22101      # case insensitive, let's make it lowercase to improve readability.
22102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22103      # Now convert it back to Unix-style (cygpath)
22104      input_path=`$CYGPATH -u "$shortmode_path"`
22105      new_path="$input_path"
22106    fi
22107  fi
22108
22109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22110  if test "x$test_cygdrive_prefix" = x; then
22111    # As a simple fix, exclude /usr/bin since it's not a real path.
22112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22114      # a path prefixed by /cygdrive for fixpath to work.
22115      new_path="$CYGWIN_ROOT_PATH$input_path"
22116    fi
22117  fi
22118
22119
22120  if test "x$path" != "x$new_path"; then
22121    BOOT_JDK="$new_path"
22122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22124  fi
22125
22126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22127
22128  path="$BOOT_JDK"
22129  has_colon=`$ECHO $path | $GREP ^.:`
22130  new_path="$path"
22131  if test "x$has_colon" = x; then
22132    # Not in mixed or Windows style, start by that.
22133    new_path=`cmd //c echo $path`
22134  fi
22135
22136
22137  input_path="$new_path"
22138  # Check if we need to convert this using DOS-style short mode. If the path
22139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22140  # take no chances and rewrite it.
22141  # Note: m4 eats our [], so we need to use [ and ] instead.
22142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22143  if test "x$has_forbidden_chars" != x; then
22144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22146  fi
22147
22148
22149  windows_path="$new_path"
22150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22151    unix_path=`$CYGPATH -u "$windows_path"`
22152    new_path="$unix_path"
22153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22155    new_path="$unix_path"
22156  fi
22157
22158  if test "x$path" != "x$new_path"; then
22159    BOOT_JDK="$new_path"
22160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22162  fi
22163
22164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22166
22167    else
22168      # We're on a unix platform. Hooray! :)
22169      path="$BOOT_JDK"
22170      has_space=`$ECHO "$path" | $GREP " "`
22171      if test "x$has_space" != x; then
22172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22175      fi
22176
22177      # Use eval to expand a potential ~
22178      eval path="$path"
22179      if test ! -f "$path" && test ! -d "$path"; then
22180        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22181      fi
22182
22183      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22184    fi
22185  fi
22186
22187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22188$as_echo_n "checking for Boot JDK... " >&6; }
22189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22190$as_echo "$BOOT_JDK" >&6; }
22191            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22192$as_echo_n "checking Boot JDK version... " >&6; }
22193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22195$as_echo "$BOOT_JDK_VERSION" >&6; }
22196          fi # end check jdk version
22197        fi # end check javac
22198      fi # end check java
22199    fi # end check boot jdk found
22200  fi
22201
22202  fi
22203
22204
22205    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22206    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22207      # Do we have a bin/java?
22208      if test ! -x "$BOOT_JDK/bin/java"; then
22209        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22211        BOOT_JDK_FOUND=no
22212      else
22213        # Do we have a bin/javac?
22214        if test ! -x "$BOOT_JDK/bin/javac"; then
22215          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22217          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22218$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22219          BOOT_JDK_FOUND=no
22220        else
22221          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22222          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22223
22224          # Extra M4 quote needed to protect [] in grep expression.
22225          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22226          if test "x$FOUND_CORRECT_VERSION" = x; then
22227            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22229            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22230$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22231            BOOT_JDK_FOUND=no
22232          else
22233            # We're done! :-)
22234            BOOT_JDK_FOUND=yes
22235
22236  # Only process if variable expands to non-empty
22237
22238  if test "x$BOOT_JDK" != x; then
22239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22240
22241  # Input might be given as Windows format, start by converting to
22242  # unix format.
22243  path="$BOOT_JDK"
22244  new_path=`$CYGPATH -u "$path"`
22245
22246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22249  # "foo.exe" is OK but "foo" is an error.
22250  #
22251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22252  # It is also a way to make sure we got the proper file name for the real test later on.
22253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22254  if test "x$test_shortpath" = x; then
22255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22257    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22258  fi
22259
22260  # Call helper function which possibly converts this using DOS-style short mode.
22261  # If so, the updated path is stored in $new_path.
22262
22263  input_path="$new_path"
22264  # Check if we need to convert this using DOS-style short mode. If the path
22265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22266  # take no chances and rewrite it.
22267  # Note: m4 eats our [], so we need to use [ and ] instead.
22268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22269  if test "x$has_forbidden_chars" != x; then
22270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22274      # Going to short mode and back again did indeed matter. Since short mode is
22275      # case insensitive, let's make it lowercase to improve readability.
22276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22277      # Now convert it back to Unix-style (cygpath)
22278      input_path=`$CYGPATH -u "$shortmode_path"`
22279      new_path="$input_path"
22280    fi
22281  fi
22282
22283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22284  if test "x$test_cygdrive_prefix" = x; then
22285    # As a simple fix, exclude /usr/bin since it's not a real path.
22286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22288      # a path prefixed by /cygdrive for fixpath to work.
22289      new_path="$CYGWIN_ROOT_PATH$input_path"
22290    fi
22291  fi
22292
22293
22294  if test "x$path" != "x$new_path"; then
22295    BOOT_JDK="$new_path"
22296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22298  fi
22299
22300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22301
22302  path="$BOOT_JDK"
22303  has_colon=`$ECHO $path | $GREP ^.:`
22304  new_path="$path"
22305  if test "x$has_colon" = x; then
22306    # Not in mixed or Windows style, start by that.
22307    new_path=`cmd //c echo $path`
22308  fi
22309
22310
22311  input_path="$new_path"
22312  # Check if we need to convert this using DOS-style short mode. If the path
22313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22314  # take no chances and rewrite it.
22315  # Note: m4 eats our [], so we need to use [ and ] instead.
22316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22317  if test "x$has_forbidden_chars" != x; then
22318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22320  fi
22321
22322
22323  windows_path="$new_path"
22324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22325    unix_path=`$CYGPATH -u "$windows_path"`
22326    new_path="$unix_path"
22327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22329    new_path="$unix_path"
22330  fi
22331
22332  if test "x$path" != "x$new_path"; then
22333    BOOT_JDK="$new_path"
22334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22336  fi
22337
22338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22340
22341    else
22342      # We're on a unix platform. Hooray! :)
22343      path="$BOOT_JDK"
22344      has_space=`$ECHO "$path" | $GREP " "`
22345      if test "x$has_space" != x; then
22346        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22348        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22349      fi
22350
22351      # Use eval to expand a potential ~
22352      eval path="$path"
22353      if test ! -f "$path" && test ! -d "$path"; then
22354        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22355      fi
22356
22357      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22358    fi
22359  fi
22360
22361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22362$as_echo_n "checking for Boot JDK... " >&6; }
22363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22364$as_echo "$BOOT_JDK" >&6; }
22365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22366$as_echo_n "checking Boot JDK version... " >&6; }
22367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22369$as_echo "$BOOT_JDK_VERSION" >&6; }
22370          fi # end check jdk version
22371        fi # end check javac
22372      fi # end check java
22373    fi # end check boot jdk found
22374  fi
22375
22376
22377  # Test: Is $JAVA_HOME set?
22378
22379  if test "x$BOOT_JDK_FOUND" = xno; then
22380    # Now execute the test
22381
22382  if test "x$JAVA_HOME" != x; then
22383    JAVA_HOME_PROCESSED="$JAVA_HOME"
22384
22385  # Only process if variable expands to non-empty
22386
22387  if test "x$JAVA_HOME_PROCESSED" != x; then
22388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22389
22390  # Input might be given as Windows format, start by converting to
22391  # unix format.
22392  path="$JAVA_HOME_PROCESSED"
22393  new_path=`$CYGPATH -u "$path"`
22394
22395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22398  # "foo.exe" is OK but "foo" is an error.
22399  #
22400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22401  # It is also a way to make sure we got the proper file name for the real test later on.
22402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22403  if test "x$test_shortpath" = x; then
22404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22405$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22406    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22407  fi
22408
22409  # Call helper function which possibly converts this using DOS-style short mode.
22410  # If so, the updated path is stored in $new_path.
22411
22412  input_path="$new_path"
22413  # Check if we need to convert this using DOS-style short mode. If the path
22414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22415  # take no chances and rewrite it.
22416  # Note: m4 eats our [], so we need to use [ and ] instead.
22417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22418  if test "x$has_forbidden_chars" != x; then
22419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22423      # Going to short mode and back again did indeed matter. Since short mode is
22424      # case insensitive, let's make it lowercase to improve readability.
22425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22426      # Now convert it back to Unix-style (cygpath)
22427      input_path=`$CYGPATH -u "$shortmode_path"`
22428      new_path="$input_path"
22429    fi
22430  fi
22431
22432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22433  if test "x$test_cygdrive_prefix" = x; then
22434    # As a simple fix, exclude /usr/bin since it's not a real path.
22435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22437      # a path prefixed by /cygdrive for fixpath to work.
22438      new_path="$CYGWIN_ROOT_PATH$input_path"
22439    fi
22440  fi
22441
22442
22443  if test "x$path" != "x$new_path"; then
22444    JAVA_HOME_PROCESSED="$new_path"
22445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22446$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22447  fi
22448
22449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22450
22451  path="$JAVA_HOME_PROCESSED"
22452  has_colon=`$ECHO $path | $GREP ^.:`
22453  new_path="$path"
22454  if test "x$has_colon" = x; then
22455    # Not in mixed or Windows style, start by that.
22456    new_path=`cmd //c echo $path`
22457  fi
22458
22459
22460  input_path="$new_path"
22461  # Check if we need to convert this using DOS-style short mode. If the path
22462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22463  # take no chances and rewrite it.
22464  # Note: m4 eats our [], so we need to use [ and ] instead.
22465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22466  if test "x$has_forbidden_chars" != x; then
22467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22469  fi
22470
22471
22472  windows_path="$new_path"
22473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22474    unix_path=`$CYGPATH -u "$windows_path"`
22475    new_path="$unix_path"
22476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22478    new_path="$unix_path"
22479  fi
22480
22481  if test "x$path" != "x$new_path"; then
22482    JAVA_HOME_PROCESSED="$new_path"
22483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22484$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22485  fi
22486
22487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22489
22490    else
22491      # We're on a unix platform. Hooray! :)
22492      path="$JAVA_HOME_PROCESSED"
22493      has_space=`$ECHO "$path" | $GREP " "`
22494      if test "x$has_space" != x; then
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22496$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22498      fi
22499
22500      # Use eval to expand a potential ~
22501      eval path="$path"
22502      if test ! -f "$path" && test ! -d "$path"; then
22503        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22504      fi
22505
22506      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22507    fi
22508  fi
22509
22510    if test ! -d "$JAVA_HOME_PROCESSED"; then
22511      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22512$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22513    else
22514      # Aha, the user has set a JAVA_HOME
22515      # let us use that as the Boot JDK.
22516      BOOT_JDK="$JAVA_HOME_PROCESSED"
22517      BOOT_JDK_FOUND=maybe
22518      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22519$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22520    fi
22521  fi
22522
22523
22524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22526      # Do we have a bin/java?
22527      if test ! -x "$BOOT_JDK/bin/java"; then
22528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22530        BOOT_JDK_FOUND=no
22531      else
22532        # Do we have a bin/javac?
22533        if test ! -x "$BOOT_JDK/bin/javac"; then
22534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22538          BOOT_JDK_FOUND=no
22539        else
22540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22542
22543          # Extra M4 quote needed to protect [] in grep expression.
22544          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22545          if test "x$FOUND_CORRECT_VERSION" = x; then
22546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22550            BOOT_JDK_FOUND=no
22551          else
22552            # We're done! :-)
22553            BOOT_JDK_FOUND=yes
22554
22555  # Only process if variable expands to non-empty
22556
22557  if test "x$BOOT_JDK" != x; then
22558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22559
22560  # Input might be given as Windows format, start by converting to
22561  # unix format.
22562  path="$BOOT_JDK"
22563  new_path=`$CYGPATH -u "$path"`
22564
22565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22568  # "foo.exe" is OK but "foo" is an error.
22569  #
22570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22571  # It is also a way to make sure we got the proper file name for the real test later on.
22572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22573  if test "x$test_shortpath" = x; then
22574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22577  fi
22578
22579  # Call helper function which possibly converts this using DOS-style short mode.
22580  # If so, the updated path is stored in $new_path.
22581
22582  input_path="$new_path"
22583  # Check if we need to convert this using DOS-style short mode. If the path
22584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22585  # take no chances and rewrite it.
22586  # Note: m4 eats our [], so we need to use [ and ] instead.
22587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22588  if test "x$has_forbidden_chars" != x; then
22589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22593      # Going to short mode and back again did indeed matter. Since short mode is
22594      # case insensitive, let's make it lowercase to improve readability.
22595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22596      # Now convert it back to Unix-style (cygpath)
22597      input_path=`$CYGPATH -u "$shortmode_path"`
22598      new_path="$input_path"
22599    fi
22600  fi
22601
22602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22603  if test "x$test_cygdrive_prefix" = x; then
22604    # As a simple fix, exclude /usr/bin since it's not a real path.
22605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22607      # a path prefixed by /cygdrive for fixpath to work.
22608      new_path="$CYGWIN_ROOT_PATH$input_path"
22609    fi
22610  fi
22611
22612
22613  if test "x$path" != "x$new_path"; then
22614    BOOT_JDK="$new_path"
22615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22617  fi
22618
22619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22620
22621  path="$BOOT_JDK"
22622  has_colon=`$ECHO $path | $GREP ^.:`
22623  new_path="$path"
22624  if test "x$has_colon" = x; then
22625    # Not in mixed or Windows style, start by that.
22626    new_path=`cmd //c echo $path`
22627  fi
22628
22629
22630  input_path="$new_path"
22631  # Check if we need to convert this using DOS-style short mode. If the path
22632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22633  # take no chances and rewrite it.
22634  # Note: m4 eats our [], so we need to use [ and ] instead.
22635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22636  if test "x$has_forbidden_chars" != x; then
22637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22639  fi
22640
22641
22642  windows_path="$new_path"
22643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22644    unix_path=`$CYGPATH -u "$windows_path"`
22645    new_path="$unix_path"
22646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22648    new_path="$unix_path"
22649  fi
22650
22651  if test "x$path" != "x$new_path"; then
22652    BOOT_JDK="$new_path"
22653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22655  fi
22656
22657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22659
22660    else
22661      # We're on a unix platform. Hooray! :)
22662      path="$BOOT_JDK"
22663      has_space=`$ECHO "$path" | $GREP " "`
22664      if test "x$has_space" != x; then
22665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22668      fi
22669
22670      # Use eval to expand a potential ~
22671      eval path="$path"
22672      if test ! -f "$path" && test ! -d "$path"; then
22673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22674      fi
22675
22676      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22677    fi
22678  fi
22679
22680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22681$as_echo_n "checking for Boot JDK... " >&6; }
22682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22683$as_echo "$BOOT_JDK" >&6; }
22684            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22685$as_echo_n "checking Boot JDK version... " >&6; }
22686            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22688$as_echo "$BOOT_JDK_VERSION" >&6; }
22689          fi # end check jdk version
22690        fi # end check javac
22691      fi # end check java
22692    fi # end check boot jdk found
22693  fi
22694
22695
22696  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22697
22698  if test "x$BOOT_JDK_FOUND" = xno; then
22699    # Now execute the test
22700
22701  # Extract the first word of "javac", so it can be a program name with args.
22702set dummy javac; ac_word=$2
22703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22704$as_echo_n "checking for $ac_word... " >&6; }
22705if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22706  $as_echo_n "(cached) " >&6
22707else
22708  case $JAVAC_CHECK in
22709  [\\/]* | ?:[\\/]*)
22710  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22711  ;;
22712  *)
22713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22714for as_dir in $PATH
22715do
22716  IFS=$as_save_IFS
22717  test -z "$as_dir" && as_dir=.
22718    for ac_exec_ext in '' $ac_executable_extensions; do
22719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22720    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22722    break 2
22723  fi
22724done
22725  done
22726IFS=$as_save_IFS
22727
22728  ;;
22729esac
22730fi
22731JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22732if test -n "$JAVAC_CHECK"; then
22733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22734$as_echo "$JAVAC_CHECK" >&6; }
22735else
22736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22737$as_echo "no" >&6; }
22738fi
22739
22740
22741  # Extract the first word of "java", so it can be a program name with args.
22742set dummy java; ac_word=$2
22743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22744$as_echo_n "checking for $ac_word... " >&6; }
22745if ${ac_cv_path_JAVA_CHECK+:} false; then :
22746  $as_echo_n "(cached) " >&6
22747else
22748  case $JAVA_CHECK in
22749  [\\/]* | ?:[\\/]*)
22750  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22751  ;;
22752  *)
22753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22754for as_dir in $PATH
22755do
22756  IFS=$as_save_IFS
22757  test -z "$as_dir" && as_dir=.
22758    for ac_exec_ext in '' $ac_executable_extensions; do
22759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22760    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22762    break 2
22763  fi
22764done
22765  done
22766IFS=$as_save_IFS
22767
22768  ;;
22769esac
22770fi
22771JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22772if test -n "$JAVA_CHECK"; then
22773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22774$as_echo "$JAVA_CHECK" >&6; }
22775else
22776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22777$as_echo "no" >&6; }
22778fi
22779
22780
22781  BINARY="$JAVAC_CHECK"
22782  if test "x$JAVAC_CHECK" = x; then
22783    BINARY="$JAVA_CHECK"
22784  fi
22785  if test "x$BINARY" != x; then
22786    # So there is a java(c) binary, it might be part of a JDK.
22787    # Lets find the JDK/JRE directory by following symbolic links.
22788    # Linux/GNU systems often have links from /usr/bin/java to
22789    # /etc/alternatives/java to the real JDK binary.
22790
22791  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22792    # Follow a chain of symbolic links. Use readlink
22793    # where it exists, else fall back to horribly
22794    # complicated shell code.
22795    if test "x$READLINK_TESTED" != yes; then
22796      # On MacOSX there is a readlink tool with a different
22797      # purpose than the GNU readlink tool. Check the found readlink.
22798      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22799      if test "x$ISGNU" = x; then
22800        # A readlink that we do not know how to use.
22801        # Are there other non-GNU readlinks out there?
22802        READLINK_TESTED=yes
22803        READLINK=
22804      fi
22805    fi
22806
22807    if test "x$READLINK" != x; then
22808      BINARY=`$READLINK -f $BINARY`
22809    else
22810      # Save the current directory for restoring afterwards
22811      STARTDIR=$PWD
22812      COUNTER=0
22813      sym_link_dir=`$DIRNAME $BINARY`
22814      sym_link_file=`$BASENAME $BINARY`
22815      cd $sym_link_dir
22816      # Use -P flag to resolve symlinks in directories.
22817      cd `$THEPWDCMD -P`
22818      sym_link_dir=`$THEPWDCMD -P`
22819      # Resolve file symlinks
22820      while test $COUNTER -lt 20; do
22821        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22822        if test "x$ISLINK" == x; then
22823          # This is not a symbolic link! We are done!
22824          break
22825        fi
22826        # Again resolve directory symlinks since the target of the just found
22827        # link could be in a different directory
22828        cd `$DIRNAME $ISLINK`
22829        sym_link_dir=`$THEPWDCMD -P`
22830        sym_link_file=`$BASENAME $ISLINK`
22831        let COUNTER=COUNTER+1
22832      done
22833      cd $STARTDIR
22834      BINARY=$sym_link_dir/$sym_link_file
22835    fi
22836  fi
22837
22838    BOOT_JDK=`dirname "$BINARY"`
22839    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22840    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22841      # Looks like we found ourselves an JDK
22842      BOOT_JDK_FOUND=maybe
22843      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22844$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22845    fi
22846  fi
22847
22848
22849    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22850    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22851      # Do we have a bin/java?
22852      if test ! -x "$BOOT_JDK/bin/java"; then
22853        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22855        BOOT_JDK_FOUND=no
22856      else
22857        # Do we have a bin/javac?
22858        if test ! -x "$BOOT_JDK/bin/javac"; then
22859          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22861          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22862$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22863          BOOT_JDK_FOUND=no
22864        else
22865          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22866          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22867
22868          # Extra M4 quote needed to protect [] in grep expression.
22869          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22870          if test "x$FOUND_CORRECT_VERSION" = x; then
22871            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22873            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22874$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22875            BOOT_JDK_FOUND=no
22876          else
22877            # We're done! :-)
22878            BOOT_JDK_FOUND=yes
22879
22880  # Only process if variable expands to non-empty
22881
22882  if test "x$BOOT_JDK" != x; then
22883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22884
22885  # Input might be given as Windows format, start by converting to
22886  # unix format.
22887  path="$BOOT_JDK"
22888  new_path=`$CYGPATH -u "$path"`
22889
22890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22893  # "foo.exe" is OK but "foo" is an error.
22894  #
22895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22896  # It is also a way to make sure we got the proper file name for the real test later on.
22897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22898  if test "x$test_shortpath" = x; then
22899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22901    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22902  fi
22903
22904  # Call helper function which possibly converts this using DOS-style short mode.
22905  # If so, the updated path is stored in $new_path.
22906
22907  input_path="$new_path"
22908  # Check if we need to convert this using DOS-style short mode. If the path
22909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22910  # take no chances and rewrite it.
22911  # Note: m4 eats our [], so we need to use [ and ] instead.
22912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22913  if test "x$has_forbidden_chars" != x; then
22914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22918      # Going to short mode and back again did indeed matter. Since short mode is
22919      # case insensitive, let's make it lowercase to improve readability.
22920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22921      # Now convert it back to Unix-style (cygpath)
22922      input_path=`$CYGPATH -u "$shortmode_path"`
22923      new_path="$input_path"
22924    fi
22925  fi
22926
22927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22928  if test "x$test_cygdrive_prefix" = x; then
22929    # As a simple fix, exclude /usr/bin since it's not a real path.
22930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22932      # a path prefixed by /cygdrive for fixpath to work.
22933      new_path="$CYGWIN_ROOT_PATH$input_path"
22934    fi
22935  fi
22936
22937
22938  if test "x$path" != "x$new_path"; then
22939    BOOT_JDK="$new_path"
22940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22942  fi
22943
22944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22945
22946  path="$BOOT_JDK"
22947  has_colon=`$ECHO $path | $GREP ^.:`
22948  new_path="$path"
22949  if test "x$has_colon" = x; then
22950    # Not in mixed or Windows style, start by that.
22951    new_path=`cmd //c echo $path`
22952  fi
22953
22954
22955  input_path="$new_path"
22956  # Check if we need to convert this using DOS-style short mode. If the path
22957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22958  # take no chances and rewrite it.
22959  # Note: m4 eats our [], so we need to use [ and ] instead.
22960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22961  if test "x$has_forbidden_chars" != x; then
22962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22964  fi
22965
22966
22967  windows_path="$new_path"
22968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22969    unix_path=`$CYGPATH -u "$windows_path"`
22970    new_path="$unix_path"
22971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22973    new_path="$unix_path"
22974  fi
22975
22976  if test "x$path" != "x$new_path"; then
22977    BOOT_JDK="$new_path"
22978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22980  fi
22981
22982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22984
22985    else
22986      # We're on a unix platform. Hooray! :)
22987      path="$BOOT_JDK"
22988      has_space=`$ECHO "$path" | $GREP " "`
22989      if test "x$has_space" != x; then
22990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22992        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22993      fi
22994
22995      # Use eval to expand a potential ~
22996      eval path="$path"
22997      if test ! -f "$path" && test ! -d "$path"; then
22998        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22999      fi
23000
23001      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23002    fi
23003  fi
23004
23005            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23006$as_echo_n "checking for Boot JDK... " >&6; }
23007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23008$as_echo "$BOOT_JDK" >&6; }
23009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23010$as_echo_n "checking Boot JDK version... " >&6; }
23011            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23013$as_echo "$BOOT_JDK_VERSION" >&6; }
23014          fi # end check jdk version
23015        fi # end check javac
23016      fi # end check java
23017    fi # end check boot jdk found
23018  fi
23019
23020
23021  # Test: Is there a JDK installed in default, well-known locations?
23022
23023  if test "x$BOOT_JDK_FOUND" = xno; then
23024    # Now execute the test
23025
23026  if test "x$OPENJDK_TARGET_OS" = xwindows; then
23027
23028  if test "x$BOOT_JDK_FOUND" = xno; then
23029    # Now execute the test
23030
23031  if test "x$ProgramW6432" != x; then
23032    VIRTUAL_DIR="$ProgramW6432/Java"
23033
23034  windows_path="$VIRTUAL_DIR"
23035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23036    unix_path=`$CYGPATH -u "$windows_path"`
23037    VIRTUAL_DIR="$unix_path"
23038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23040    VIRTUAL_DIR="$unix_path"
23041  fi
23042
23043
23044  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23045  BOOT_JDK_SUFFIX=""
23046  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23047  if test "x$ALL_JDKS_FOUND" != x; then
23048    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23049
23050  if test "x$BOOT_JDK_FOUND" = xno; then
23051    # Now execute the test
23052
23053        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23054        if test -d "$BOOT_JDK"; then
23055          BOOT_JDK_FOUND=maybe
23056          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23057$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23058        fi
23059
23060
23061    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23062    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23063      # Do we have a bin/java?
23064      if test ! -x "$BOOT_JDK/bin/java"; then
23065        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23067        BOOT_JDK_FOUND=no
23068      else
23069        # Do we have a bin/javac?
23070        if test ! -x "$BOOT_JDK/bin/javac"; then
23071          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23073          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23074$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23075          BOOT_JDK_FOUND=no
23076        else
23077          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23078          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23079
23080          # Extra M4 quote needed to protect [] in grep expression.
23081          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23082          if test "x$FOUND_CORRECT_VERSION" = x; then
23083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23085            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23086$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23087            BOOT_JDK_FOUND=no
23088          else
23089            # We're done! :-)
23090            BOOT_JDK_FOUND=yes
23091
23092  # Only process if variable expands to non-empty
23093
23094  if test "x$BOOT_JDK" != x; then
23095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23096
23097  # Input might be given as Windows format, start by converting to
23098  # unix format.
23099  path="$BOOT_JDK"
23100  new_path=`$CYGPATH -u "$path"`
23101
23102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23105  # "foo.exe" is OK but "foo" is an error.
23106  #
23107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23108  # It is also a way to make sure we got the proper file name for the real test later on.
23109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23110  if test "x$test_shortpath" = x; then
23111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23113    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23114  fi
23115
23116  # Call helper function which possibly converts this using DOS-style short mode.
23117  # If so, the updated path is stored in $new_path.
23118
23119  input_path="$new_path"
23120  # Check if we need to convert this using DOS-style short mode. If the path
23121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23122  # take no chances and rewrite it.
23123  # Note: m4 eats our [], so we need to use [ and ] instead.
23124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23125  if test "x$has_forbidden_chars" != x; then
23126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23130      # Going to short mode and back again did indeed matter. Since short mode is
23131      # case insensitive, let's make it lowercase to improve readability.
23132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23133      # Now convert it back to Unix-style (cygpath)
23134      input_path=`$CYGPATH -u "$shortmode_path"`
23135      new_path="$input_path"
23136    fi
23137  fi
23138
23139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23140  if test "x$test_cygdrive_prefix" = x; then
23141    # As a simple fix, exclude /usr/bin since it's not a real path.
23142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23144      # a path prefixed by /cygdrive for fixpath to work.
23145      new_path="$CYGWIN_ROOT_PATH$input_path"
23146    fi
23147  fi
23148
23149
23150  if test "x$path" != "x$new_path"; then
23151    BOOT_JDK="$new_path"
23152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23154  fi
23155
23156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23157
23158  path="$BOOT_JDK"
23159  has_colon=`$ECHO $path | $GREP ^.:`
23160  new_path="$path"
23161  if test "x$has_colon" = x; then
23162    # Not in mixed or Windows style, start by that.
23163    new_path=`cmd //c echo $path`
23164  fi
23165
23166
23167  input_path="$new_path"
23168  # Check if we need to convert this using DOS-style short mode. If the path
23169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170  # take no chances and rewrite it.
23171  # Note: m4 eats our [], so we need to use [ and ] instead.
23172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23173  if test "x$has_forbidden_chars" != x; then
23174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23176  fi
23177
23178
23179  windows_path="$new_path"
23180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23181    unix_path=`$CYGPATH -u "$windows_path"`
23182    new_path="$unix_path"
23183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23185    new_path="$unix_path"
23186  fi
23187
23188  if test "x$path" != "x$new_path"; then
23189    BOOT_JDK="$new_path"
23190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23192  fi
23193
23194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23196
23197    else
23198      # We're on a unix platform. Hooray! :)
23199      path="$BOOT_JDK"
23200      has_space=`$ECHO "$path" | $GREP " "`
23201      if test "x$has_space" != x; then
23202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23205      fi
23206
23207      # Use eval to expand a potential ~
23208      eval path="$path"
23209      if test ! -f "$path" && test ! -d "$path"; then
23210        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23211      fi
23212
23213      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23214    fi
23215  fi
23216
23217            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23218$as_echo_n "checking for Boot JDK... " >&6; }
23219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23220$as_echo "$BOOT_JDK" >&6; }
23221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23222$as_echo_n "checking Boot JDK version... " >&6; }
23223            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23225$as_echo "$BOOT_JDK_VERSION" >&6; }
23226          fi # end check jdk version
23227        fi # end check javac
23228      fi # end check java
23229    fi # end check boot jdk found
23230  fi
23231
23232    done
23233  fi
23234
23235  fi
23236
23237
23238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23240      # Do we have a bin/java?
23241      if test ! -x "$BOOT_JDK/bin/java"; then
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23244        BOOT_JDK_FOUND=no
23245      else
23246        # Do we have a bin/javac?
23247        if test ! -x "$BOOT_JDK/bin/javac"; then
23248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23252          BOOT_JDK_FOUND=no
23253        else
23254          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23255          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23256
23257          # Extra M4 quote needed to protect [] in grep expression.
23258          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23259          if test "x$FOUND_CORRECT_VERSION" = x; then
23260            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23262            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23263$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23264            BOOT_JDK_FOUND=no
23265          else
23266            # We're done! :-)
23267            BOOT_JDK_FOUND=yes
23268
23269  # Only process if variable expands to non-empty
23270
23271  if test "x$BOOT_JDK" != x; then
23272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23273
23274  # Input might be given as Windows format, start by converting to
23275  # unix format.
23276  path="$BOOT_JDK"
23277  new_path=`$CYGPATH -u "$path"`
23278
23279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23282  # "foo.exe" is OK but "foo" is an error.
23283  #
23284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23285  # It is also a way to make sure we got the proper file name for the real test later on.
23286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23287  if test "x$test_shortpath" = x; then
23288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23291  fi
23292
23293  # Call helper function which possibly converts this using DOS-style short mode.
23294  # If so, the updated path is stored in $new_path.
23295
23296  input_path="$new_path"
23297  # Check if we need to convert this using DOS-style short mode. If the path
23298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23299  # take no chances and rewrite it.
23300  # Note: m4 eats our [], so we need to use [ and ] instead.
23301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23302  if test "x$has_forbidden_chars" != x; then
23303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23307      # Going to short mode and back again did indeed matter. Since short mode is
23308      # case insensitive, let's make it lowercase to improve readability.
23309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23310      # Now convert it back to Unix-style (cygpath)
23311      input_path=`$CYGPATH -u "$shortmode_path"`
23312      new_path="$input_path"
23313    fi
23314  fi
23315
23316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23317  if test "x$test_cygdrive_prefix" = x; then
23318    # As a simple fix, exclude /usr/bin since it's not a real path.
23319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23321      # a path prefixed by /cygdrive for fixpath to work.
23322      new_path="$CYGWIN_ROOT_PATH$input_path"
23323    fi
23324  fi
23325
23326
23327  if test "x$path" != "x$new_path"; then
23328    BOOT_JDK="$new_path"
23329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23331  fi
23332
23333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23334
23335  path="$BOOT_JDK"
23336  has_colon=`$ECHO $path | $GREP ^.:`
23337  new_path="$path"
23338  if test "x$has_colon" = x; then
23339    # Not in mixed or Windows style, start by that.
23340    new_path=`cmd //c echo $path`
23341  fi
23342
23343
23344  input_path="$new_path"
23345  # Check if we need to convert this using DOS-style short mode. If the path
23346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23347  # take no chances and rewrite it.
23348  # Note: m4 eats our [], so we need to use [ and ] instead.
23349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23350  if test "x$has_forbidden_chars" != x; then
23351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23353  fi
23354
23355
23356  windows_path="$new_path"
23357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23358    unix_path=`$CYGPATH -u "$windows_path"`
23359    new_path="$unix_path"
23360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23362    new_path="$unix_path"
23363  fi
23364
23365  if test "x$path" != "x$new_path"; then
23366    BOOT_JDK="$new_path"
23367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23369  fi
23370
23371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23373
23374    else
23375      # We're on a unix platform. Hooray! :)
23376      path="$BOOT_JDK"
23377      has_space=`$ECHO "$path" | $GREP " "`
23378      if test "x$has_space" != x; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23382      fi
23383
23384      # Use eval to expand a potential ~
23385      eval path="$path"
23386      if test ! -f "$path" && test ! -d "$path"; then
23387        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23388      fi
23389
23390      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23391    fi
23392  fi
23393
23394            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23395$as_echo_n "checking for Boot JDK... " >&6; }
23396            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23397$as_echo "$BOOT_JDK" >&6; }
23398            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23399$as_echo_n "checking Boot JDK version... " >&6; }
23400            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23402$as_echo "$BOOT_JDK_VERSION" >&6; }
23403          fi # end check jdk version
23404        fi # end check javac
23405      fi # end check java
23406    fi # end check boot jdk found
23407  fi
23408
23409
23410  if test "x$BOOT_JDK_FOUND" = xno; then
23411    # Now execute the test
23412
23413  if test "x$PROGRAMW6432" != x; then
23414    VIRTUAL_DIR="$PROGRAMW6432/Java"
23415
23416  windows_path="$VIRTUAL_DIR"
23417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23418    unix_path=`$CYGPATH -u "$windows_path"`
23419    VIRTUAL_DIR="$unix_path"
23420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23422    VIRTUAL_DIR="$unix_path"
23423  fi
23424
23425
23426  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23427  BOOT_JDK_SUFFIX=""
23428  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23429  if test "x$ALL_JDKS_FOUND" != x; then
23430    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23431
23432  if test "x$BOOT_JDK_FOUND" = xno; then
23433    # Now execute the test
23434
23435        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23436        if test -d "$BOOT_JDK"; then
23437          BOOT_JDK_FOUND=maybe
23438          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23439$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23440        fi
23441
23442
23443    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23444    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23445      # Do we have a bin/java?
23446      if test ! -x "$BOOT_JDK/bin/java"; then
23447        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23449        BOOT_JDK_FOUND=no
23450      else
23451        # Do we have a bin/javac?
23452        if test ! -x "$BOOT_JDK/bin/javac"; then
23453          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23455          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23456$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23457          BOOT_JDK_FOUND=no
23458        else
23459          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23460          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23461
23462          # Extra M4 quote needed to protect [] in grep expression.
23463          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23464          if test "x$FOUND_CORRECT_VERSION" = x; then
23465            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23467            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23468$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23469            BOOT_JDK_FOUND=no
23470          else
23471            # We're done! :-)
23472            BOOT_JDK_FOUND=yes
23473
23474  # Only process if variable expands to non-empty
23475
23476  if test "x$BOOT_JDK" != x; then
23477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23478
23479  # Input might be given as Windows format, start by converting to
23480  # unix format.
23481  path="$BOOT_JDK"
23482  new_path=`$CYGPATH -u "$path"`
23483
23484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23487  # "foo.exe" is OK but "foo" is an error.
23488  #
23489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23490  # It is also a way to make sure we got the proper file name for the real test later on.
23491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23492  if test "x$test_shortpath" = x; then
23493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23494$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23495    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23496  fi
23497
23498  # Call helper function which possibly converts this using DOS-style short mode.
23499  # If so, the updated path is stored in $new_path.
23500
23501  input_path="$new_path"
23502  # Check if we need to convert this using DOS-style short mode. If the path
23503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23504  # take no chances and rewrite it.
23505  # Note: m4 eats our [], so we need to use [ and ] instead.
23506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23507  if test "x$has_forbidden_chars" != x; then
23508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23512      # Going to short mode and back again did indeed matter. Since short mode is
23513      # case insensitive, let's make it lowercase to improve readability.
23514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23515      # Now convert it back to Unix-style (cygpath)
23516      input_path=`$CYGPATH -u "$shortmode_path"`
23517      new_path="$input_path"
23518    fi
23519  fi
23520
23521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23522  if test "x$test_cygdrive_prefix" = x; then
23523    # As a simple fix, exclude /usr/bin since it's not a real path.
23524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23526      # a path prefixed by /cygdrive for fixpath to work.
23527      new_path="$CYGWIN_ROOT_PATH$input_path"
23528    fi
23529  fi
23530
23531
23532  if test "x$path" != "x$new_path"; then
23533    BOOT_JDK="$new_path"
23534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23536  fi
23537
23538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23539
23540  path="$BOOT_JDK"
23541  has_colon=`$ECHO $path | $GREP ^.:`
23542  new_path="$path"
23543  if test "x$has_colon" = x; then
23544    # Not in mixed or Windows style, start by that.
23545    new_path=`cmd //c echo $path`
23546  fi
23547
23548
23549  input_path="$new_path"
23550  # Check if we need to convert this using DOS-style short mode. If the path
23551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23552  # take no chances and rewrite it.
23553  # Note: m4 eats our [], so we need to use [ and ] instead.
23554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23555  if test "x$has_forbidden_chars" != x; then
23556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23558  fi
23559
23560
23561  windows_path="$new_path"
23562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23563    unix_path=`$CYGPATH -u "$windows_path"`
23564    new_path="$unix_path"
23565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23567    new_path="$unix_path"
23568  fi
23569
23570  if test "x$path" != "x$new_path"; then
23571    BOOT_JDK="$new_path"
23572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23574  fi
23575
23576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23578
23579    else
23580      # We're on a unix platform. Hooray! :)
23581      path="$BOOT_JDK"
23582      has_space=`$ECHO "$path" | $GREP " "`
23583      if test "x$has_space" != x; then
23584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23587      fi
23588
23589      # Use eval to expand a potential ~
23590      eval path="$path"
23591      if test ! -f "$path" && test ! -d "$path"; then
23592        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23593      fi
23594
23595      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23596    fi
23597  fi
23598
23599            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23600$as_echo_n "checking for Boot JDK... " >&6; }
23601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23602$as_echo "$BOOT_JDK" >&6; }
23603            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23604$as_echo_n "checking Boot JDK version... " >&6; }
23605            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23607$as_echo "$BOOT_JDK_VERSION" >&6; }
23608          fi # end check jdk version
23609        fi # end check javac
23610      fi # end check java
23611    fi # end check boot jdk found
23612  fi
23613
23614    done
23615  fi
23616
23617  fi
23618
23619
23620    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23621    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23622      # Do we have a bin/java?
23623      if test ! -x "$BOOT_JDK/bin/java"; then
23624        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23626        BOOT_JDK_FOUND=no
23627      else
23628        # Do we have a bin/javac?
23629        if test ! -x "$BOOT_JDK/bin/javac"; then
23630          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23632          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23633$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23634          BOOT_JDK_FOUND=no
23635        else
23636          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23637          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23638
23639          # Extra M4 quote needed to protect [] in grep expression.
23640          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23641          if test "x$FOUND_CORRECT_VERSION" = x; then
23642            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23644            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23645$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23646            BOOT_JDK_FOUND=no
23647          else
23648            # We're done! :-)
23649            BOOT_JDK_FOUND=yes
23650
23651  # Only process if variable expands to non-empty
23652
23653  if test "x$BOOT_JDK" != x; then
23654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23655
23656  # Input might be given as Windows format, start by converting to
23657  # unix format.
23658  path="$BOOT_JDK"
23659  new_path=`$CYGPATH -u "$path"`
23660
23661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23664  # "foo.exe" is OK but "foo" is an error.
23665  #
23666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23667  # It is also a way to make sure we got the proper file name for the real test later on.
23668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23669  if test "x$test_shortpath" = x; then
23670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23672    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23673  fi
23674
23675  # Call helper function which possibly converts this using DOS-style short mode.
23676  # If so, the updated path is stored in $new_path.
23677
23678  input_path="$new_path"
23679  # Check if we need to convert this using DOS-style short mode. If the path
23680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23681  # take no chances and rewrite it.
23682  # Note: m4 eats our [], so we need to use [ and ] instead.
23683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23684  if test "x$has_forbidden_chars" != x; then
23685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23689      # Going to short mode and back again did indeed matter. Since short mode is
23690      # case insensitive, let's make it lowercase to improve readability.
23691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23692      # Now convert it back to Unix-style (cygpath)
23693      input_path=`$CYGPATH -u "$shortmode_path"`
23694      new_path="$input_path"
23695    fi
23696  fi
23697
23698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23699  if test "x$test_cygdrive_prefix" = x; then
23700    # As a simple fix, exclude /usr/bin since it's not a real path.
23701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23703      # a path prefixed by /cygdrive for fixpath to work.
23704      new_path="$CYGWIN_ROOT_PATH$input_path"
23705    fi
23706  fi
23707
23708
23709  if test "x$path" != "x$new_path"; then
23710    BOOT_JDK="$new_path"
23711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23713  fi
23714
23715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23716
23717  path="$BOOT_JDK"
23718  has_colon=`$ECHO $path | $GREP ^.:`
23719  new_path="$path"
23720  if test "x$has_colon" = x; then
23721    # Not in mixed or Windows style, start by that.
23722    new_path=`cmd //c echo $path`
23723  fi
23724
23725
23726  input_path="$new_path"
23727  # Check if we need to convert this using DOS-style short mode. If the path
23728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23729  # take no chances and rewrite it.
23730  # Note: m4 eats our [], so we need to use [ and ] instead.
23731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23732  if test "x$has_forbidden_chars" != x; then
23733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23735  fi
23736
23737
23738  windows_path="$new_path"
23739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23740    unix_path=`$CYGPATH -u "$windows_path"`
23741    new_path="$unix_path"
23742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23744    new_path="$unix_path"
23745  fi
23746
23747  if test "x$path" != "x$new_path"; then
23748    BOOT_JDK="$new_path"
23749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23751  fi
23752
23753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23755
23756    else
23757      # We're on a unix platform. Hooray! :)
23758      path="$BOOT_JDK"
23759      has_space=`$ECHO "$path" | $GREP " "`
23760      if test "x$has_space" != x; then
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23764      fi
23765
23766      # Use eval to expand a potential ~
23767      eval path="$path"
23768      if test ! -f "$path" && test ! -d "$path"; then
23769        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23770      fi
23771
23772      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23773    fi
23774  fi
23775
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23777$as_echo_n "checking for Boot JDK... " >&6; }
23778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23779$as_echo "$BOOT_JDK" >&6; }
23780            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23781$as_echo_n "checking Boot JDK version... " >&6; }
23782            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23784$as_echo "$BOOT_JDK_VERSION" >&6; }
23785          fi # end check jdk version
23786        fi # end check javac
23787      fi # end check java
23788    fi # end check boot jdk found
23789  fi
23790
23791
23792  if test "x$BOOT_JDK_FOUND" = xno; then
23793    # Now execute the test
23794
23795  if test "x$PROGRAMFILES" != x; then
23796    VIRTUAL_DIR="$PROGRAMFILES/Java"
23797
23798  windows_path="$VIRTUAL_DIR"
23799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23800    unix_path=`$CYGPATH -u "$windows_path"`
23801    VIRTUAL_DIR="$unix_path"
23802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23804    VIRTUAL_DIR="$unix_path"
23805  fi
23806
23807
23808  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23809  BOOT_JDK_SUFFIX=""
23810  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23811  if test "x$ALL_JDKS_FOUND" != x; then
23812    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23813
23814  if test "x$BOOT_JDK_FOUND" = xno; then
23815    # Now execute the test
23816
23817        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23818        if test -d "$BOOT_JDK"; then
23819          BOOT_JDK_FOUND=maybe
23820          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23821$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23822        fi
23823
23824
23825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23827      # Do we have a bin/java?
23828      if test ! -x "$BOOT_JDK/bin/java"; then
23829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23831        BOOT_JDK_FOUND=no
23832      else
23833        # Do we have a bin/javac?
23834        if test ! -x "$BOOT_JDK/bin/javac"; then
23835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23839          BOOT_JDK_FOUND=no
23840        else
23841          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23842          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23843
23844          # Extra M4 quote needed to protect [] in grep expression.
23845          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23846          if test "x$FOUND_CORRECT_VERSION" = x; then
23847            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23849            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23850$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23851            BOOT_JDK_FOUND=no
23852          else
23853            # We're done! :-)
23854            BOOT_JDK_FOUND=yes
23855
23856  # Only process if variable expands to non-empty
23857
23858  if test "x$BOOT_JDK" != x; then
23859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23860
23861  # Input might be given as Windows format, start by converting to
23862  # unix format.
23863  path="$BOOT_JDK"
23864  new_path=`$CYGPATH -u "$path"`
23865
23866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23869  # "foo.exe" is OK but "foo" is an error.
23870  #
23871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23872  # It is also a way to make sure we got the proper file name for the real test later on.
23873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23874  if test "x$test_shortpath" = x; then
23875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23878  fi
23879
23880  # Call helper function which possibly converts this using DOS-style short mode.
23881  # If so, the updated path is stored in $new_path.
23882
23883  input_path="$new_path"
23884  # Check if we need to convert this using DOS-style short mode. If the path
23885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23886  # take no chances and rewrite it.
23887  # Note: m4 eats our [], so we need to use [ and ] instead.
23888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23889  if test "x$has_forbidden_chars" != x; then
23890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23894      # Going to short mode and back again did indeed matter. Since short mode is
23895      # case insensitive, let's make it lowercase to improve readability.
23896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23897      # Now convert it back to Unix-style (cygpath)
23898      input_path=`$CYGPATH -u "$shortmode_path"`
23899      new_path="$input_path"
23900    fi
23901  fi
23902
23903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23904  if test "x$test_cygdrive_prefix" = x; then
23905    # As a simple fix, exclude /usr/bin since it's not a real path.
23906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23908      # a path prefixed by /cygdrive for fixpath to work.
23909      new_path="$CYGWIN_ROOT_PATH$input_path"
23910    fi
23911  fi
23912
23913
23914  if test "x$path" != "x$new_path"; then
23915    BOOT_JDK="$new_path"
23916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23918  fi
23919
23920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23921
23922  path="$BOOT_JDK"
23923  has_colon=`$ECHO $path | $GREP ^.:`
23924  new_path="$path"
23925  if test "x$has_colon" = x; then
23926    # Not in mixed or Windows style, start by that.
23927    new_path=`cmd //c echo $path`
23928  fi
23929
23930
23931  input_path="$new_path"
23932  # Check if we need to convert this using DOS-style short mode. If the path
23933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23934  # take no chances and rewrite it.
23935  # Note: m4 eats our [], so we need to use [ and ] instead.
23936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23937  if test "x$has_forbidden_chars" != x; then
23938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23940  fi
23941
23942
23943  windows_path="$new_path"
23944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23945    unix_path=`$CYGPATH -u "$windows_path"`
23946    new_path="$unix_path"
23947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23949    new_path="$unix_path"
23950  fi
23951
23952  if test "x$path" != "x$new_path"; then
23953    BOOT_JDK="$new_path"
23954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23956  fi
23957
23958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23960
23961    else
23962      # We're on a unix platform. Hooray! :)
23963      path="$BOOT_JDK"
23964      has_space=`$ECHO "$path" | $GREP " "`
23965      if test "x$has_space" != x; then
23966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23969      fi
23970
23971      # Use eval to expand a potential ~
23972      eval path="$path"
23973      if test ! -f "$path" && test ! -d "$path"; then
23974        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23975      fi
23976
23977      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23978    fi
23979  fi
23980
23981            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23982$as_echo_n "checking for Boot JDK... " >&6; }
23983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23984$as_echo "$BOOT_JDK" >&6; }
23985            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23986$as_echo_n "checking Boot JDK version... " >&6; }
23987            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23989$as_echo "$BOOT_JDK_VERSION" >&6; }
23990          fi # end check jdk version
23991        fi # end check javac
23992      fi # end check java
23993    fi # end check boot jdk found
23994  fi
23995
23996    done
23997  fi
23998
23999  fi
24000
24001
24002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24004      # Do we have a bin/java?
24005      if test ! -x "$BOOT_JDK/bin/java"; then
24006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24008        BOOT_JDK_FOUND=no
24009      else
24010        # Do we have a bin/javac?
24011        if test ! -x "$BOOT_JDK/bin/javac"; then
24012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24016          BOOT_JDK_FOUND=no
24017        else
24018          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24019          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24020
24021          # Extra M4 quote needed to protect [] in grep expression.
24022          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24023          if test "x$FOUND_CORRECT_VERSION" = x; then
24024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24026            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24027$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24028            BOOT_JDK_FOUND=no
24029          else
24030            # We're done! :-)
24031            BOOT_JDK_FOUND=yes
24032
24033  # Only process if variable expands to non-empty
24034
24035  if test "x$BOOT_JDK" != x; then
24036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24037
24038  # Input might be given as Windows format, start by converting to
24039  # unix format.
24040  path="$BOOT_JDK"
24041  new_path=`$CYGPATH -u "$path"`
24042
24043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24046  # "foo.exe" is OK but "foo" is an error.
24047  #
24048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24049  # It is also a way to make sure we got the proper file name for the real test later on.
24050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24051  if test "x$test_shortpath" = x; then
24052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24055  fi
24056
24057  # Call helper function which possibly converts this using DOS-style short mode.
24058  # If so, the updated path is stored in $new_path.
24059
24060  input_path="$new_path"
24061  # Check if we need to convert this using DOS-style short mode. If the path
24062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24063  # take no chances and rewrite it.
24064  # Note: m4 eats our [], so we need to use [ and ] instead.
24065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24066  if test "x$has_forbidden_chars" != x; then
24067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24071      # Going to short mode and back again did indeed matter. Since short mode is
24072      # case insensitive, let's make it lowercase to improve readability.
24073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24074      # Now convert it back to Unix-style (cygpath)
24075      input_path=`$CYGPATH -u "$shortmode_path"`
24076      new_path="$input_path"
24077    fi
24078  fi
24079
24080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24081  if test "x$test_cygdrive_prefix" = x; then
24082    # As a simple fix, exclude /usr/bin since it's not a real path.
24083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24085      # a path prefixed by /cygdrive for fixpath to work.
24086      new_path="$CYGWIN_ROOT_PATH$input_path"
24087    fi
24088  fi
24089
24090
24091  if test "x$path" != "x$new_path"; then
24092    BOOT_JDK="$new_path"
24093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24095  fi
24096
24097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24098
24099  path="$BOOT_JDK"
24100  has_colon=`$ECHO $path | $GREP ^.:`
24101  new_path="$path"
24102  if test "x$has_colon" = x; then
24103    # Not in mixed or Windows style, start by that.
24104    new_path=`cmd //c echo $path`
24105  fi
24106
24107
24108  input_path="$new_path"
24109  # Check if we need to convert this using DOS-style short mode. If the path
24110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24111  # take no chances and rewrite it.
24112  # Note: m4 eats our [], so we need to use [ and ] instead.
24113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24114  if test "x$has_forbidden_chars" != x; then
24115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24117  fi
24118
24119
24120  windows_path="$new_path"
24121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24122    unix_path=`$CYGPATH -u "$windows_path"`
24123    new_path="$unix_path"
24124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24126    new_path="$unix_path"
24127  fi
24128
24129  if test "x$path" != "x$new_path"; then
24130    BOOT_JDK="$new_path"
24131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24133  fi
24134
24135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24137
24138    else
24139      # We're on a unix platform. Hooray! :)
24140      path="$BOOT_JDK"
24141      has_space=`$ECHO "$path" | $GREP " "`
24142      if test "x$has_space" != x; then
24143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24146      fi
24147
24148      # Use eval to expand a potential ~
24149      eval path="$path"
24150      if test ! -f "$path" && test ! -d "$path"; then
24151        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24152      fi
24153
24154      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24155    fi
24156  fi
24157
24158            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24159$as_echo_n "checking for Boot JDK... " >&6; }
24160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24161$as_echo "$BOOT_JDK" >&6; }
24162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24163$as_echo_n "checking Boot JDK version... " >&6; }
24164            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24166$as_echo "$BOOT_JDK_VERSION" >&6; }
24167          fi # end check jdk version
24168        fi # end check javac
24169      fi # end check java
24170    fi # end check boot jdk found
24171  fi
24172
24173
24174  if test "x$BOOT_JDK_FOUND" = xno; then
24175    # Now execute the test
24176
24177  if test "x$ProgramFiles" != x; then
24178    VIRTUAL_DIR="$ProgramFiles/Java"
24179
24180  windows_path="$VIRTUAL_DIR"
24181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182    unix_path=`$CYGPATH -u "$windows_path"`
24183    VIRTUAL_DIR="$unix_path"
24184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24186    VIRTUAL_DIR="$unix_path"
24187  fi
24188
24189
24190  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24191  BOOT_JDK_SUFFIX=""
24192  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24193  if test "x$ALL_JDKS_FOUND" != x; then
24194    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24195
24196  if test "x$BOOT_JDK_FOUND" = xno; then
24197    # Now execute the test
24198
24199        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24200        if test -d "$BOOT_JDK"; then
24201          BOOT_JDK_FOUND=maybe
24202          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24203$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24204        fi
24205
24206
24207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24209      # Do we have a bin/java?
24210      if test ! -x "$BOOT_JDK/bin/java"; then
24211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24213        BOOT_JDK_FOUND=no
24214      else
24215        # Do we have a bin/javac?
24216        if test ! -x "$BOOT_JDK/bin/javac"; then
24217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24221          BOOT_JDK_FOUND=no
24222        else
24223          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24224          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24225
24226          # Extra M4 quote needed to protect [] in grep expression.
24227          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24228          if test "x$FOUND_CORRECT_VERSION" = x; then
24229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24231            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24232$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24233            BOOT_JDK_FOUND=no
24234          else
24235            # We're done! :-)
24236            BOOT_JDK_FOUND=yes
24237
24238  # Only process if variable expands to non-empty
24239
24240  if test "x$BOOT_JDK" != x; then
24241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24242
24243  # Input might be given as Windows format, start by converting to
24244  # unix format.
24245  path="$BOOT_JDK"
24246  new_path=`$CYGPATH -u "$path"`
24247
24248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24251  # "foo.exe" is OK but "foo" is an error.
24252  #
24253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24254  # It is also a way to make sure we got the proper file name for the real test later on.
24255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24256  if test "x$test_shortpath" = x; then
24257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24259    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24260  fi
24261
24262  # Call helper function which possibly converts this using DOS-style short mode.
24263  # If so, the updated path is stored in $new_path.
24264
24265  input_path="$new_path"
24266  # Check if we need to convert this using DOS-style short mode. If the path
24267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24268  # take no chances and rewrite it.
24269  # Note: m4 eats our [], so we need to use [ and ] instead.
24270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24271  if test "x$has_forbidden_chars" != x; then
24272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24276      # Going to short mode and back again did indeed matter. Since short mode is
24277      # case insensitive, let's make it lowercase to improve readability.
24278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24279      # Now convert it back to Unix-style (cygpath)
24280      input_path=`$CYGPATH -u "$shortmode_path"`
24281      new_path="$input_path"
24282    fi
24283  fi
24284
24285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24286  if test "x$test_cygdrive_prefix" = x; then
24287    # As a simple fix, exclude /usr/bin since it's not a real path.
24288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24290      # a path prefixed by /cygdrive for fixpath to work.
24291      new_path="$CYGWIN_ROOT_PATH$input_path"
24292    fi
24293  fi
24294
24295
24296  if test "x$path" != "x$new_path"; then
24297    BOOT_JDK="$new_path"
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24300  fi
24301
24302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24303
24304  path="$BOOT_JDK"
24305  has_colon=`$ECHO $path | $GREP ^.:`
24306  new_path="$path"
24307  if test "x$has_colon" = x; then
24308    # Not in mixed or Windows style, start by that.
24309    new_path=`cmd //c echo $path`
24310  fi
24311
24312
24313  input_path="$new_path"
24314  # Check if we need to convert this using DOS-style short mode. If the path
24315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24316  # take no chances and rewrite it.
24317  # Note: m4 eats our [], so we need to use [ and ] instead.
24318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24319  if test "x$has_forbidden_chars" != x; then
24320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24322  fi
24323
24324
24325  windows_path="$new_path"
24326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24327    unix_path=`$CYGPATH -u "$windows_path"`
24328    new_path="$unix_path"
24329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24331    new_path="$unix_path"
24332  fi
24333
24334  if test "x$path" != "x$new_path"; then
24335    BOOT_JDK="$new_path"
24336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24337$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24338  fi
24339
24340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24342
24343    else
24344      # We're on a unix platform. Hooray! :)
24345      path="$BOOT_JDK"
24346      has_space=`$ECHO "$path" | $GREP " "`
24347      if test "x$has_space" != x; then
24348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24351      fi
24352
24353      # Use eval to expand a potential ~
24354      eval path="$path"
24355      if test ! -f "$path" && test ! -d "$path"; then
24356        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24357      fi
24358
24359      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24360    fi
24361  fi
24362
24363            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24364$as_echo_n "checking for Boot JDK... " >&6; }
24365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24366$as_echo "$BOOT_JDK" >&6; }
24367            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24368$as_echo_n "checking Boot JDK version... " >&6; }
24369            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24371$as_echo "$BOOT_JDK_VERSION" >&6; }
24372          fi # end check jdk version
24373        fi # end check javac
24374      fi # end check java
24375    fi # end check boot jdk found
24376  fi
24377
24378    done
24379  fi
24380
24381  fi
24382
24383
24384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24386      # Do we have a bin/java?
24387      if test ! -x "$BOOT_JDK/bin/java"; then
24388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24390        BOOT_JDK_FOUND=no
24391      else
24392        # Do we have a bin/javac?
24393        if test ! -x "$BOOT_JDK/bin/javac"; then
24394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24398          BOOT_JDK_FOUND=no
24399        else
24400          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24401          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24402
24403          # Extra M4 quote needed to protect [] in grep expression.
24404          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24405          if test "x$FOUND_CORRECT_VERSION" = x; then
24406            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24408            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24409$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24410            BOOT_JDK_FOUND=no
24411          else
24412            # We're done! :-)
24413            BOOT_JDK_FOUND=yes
24414
24415  # Only process if variable expands to non-empty
24416
24417  if test "x$BOOT_JDK" != x; then
24418    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24419
24420  # Input might be given as Windows format, start by converting to
24421  # unix format.
24422  path="$BOOT_JDK"
24423  new_path=`$CYGPATH -u "$path"`
24424
24425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24428  # "foo.exe" is OK but "foo" is an error.
24429  #
24430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24431  # It is also a way to make sure we got the proper file name for the real test later on.
24432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24433  if test "x$test_shortpath" = x; then
24434    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24435$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24436    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24437  fi
24438
24439  # Call helper function which possibly converts this using DOS-style short mode.
24440  # If so, the updated path is stored in $new_path.
24441
24442  input_path="$new_path"
24443  # Check if we need to convert this using DOS-style short mode. If the path
24444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24445  # take no chances and rewrite it.
24446  # Note: m4 eats our [], so we need to use [ and ] instead.
24447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24448  if test "x$has_forbidden_chars" != x; then
24449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24453      # Going to short mode and back again did indeed matter. Since short mode is
24454      # case insensitive, let's make it lowercase to improve readability.
24455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24456      # Now convert it back to Unix-style (cygpath)
24457      input_path=`$CYGPATH -u "$shortmode_path"`
24458      new_path="$input_path"
24459    fi
24460  fi
24461
24462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24463  if test "x$test_cygdrive_prefix" = x; then
24464    # As a simple fix, exclude /usr/bin since it's not a real path.
24465    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24467      # a path prefixed by /cygdrive for fixpath to work.
24468      new_path="$CYGWIN_ROOT_PATH$input_path"
24469    fi
24470  fi
24471
24472
24473  if test "x$path" != "x$new_path"; then
24474    BOOT_JDK="$new_path"
24475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24476$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24477  fi
24478
24479    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24480
24481  path="$BOOT_JDK"
24482  has_colon=`$ECHO $path | $GREP ^.:`
24483  new_path="$path"
24484  if test "x$has_colon" = x; then
24485    # Not in mixed or Windows style, start by that.
24486    new_path=`cmd //c echo $path`
24487  fi
24488
24489
24490  input_path="$new_path"
24491  # Check if we need to convert this using DOS-style short mode. If the path
24492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24493  # take no chances and rewrite it.
24494  # Note: m4 eats our [], so we need to use [ and ] instead.
24495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24496  if test "x$has_forbidden_chars" != x; then
24497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24499  fi
24500
24501
24502  windows_path="$new_path"
24503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24504    unix_path=`$CYGPATH -u "$windows_path"`
24505    new_path="$unix_path"
24506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24508    new_path="$unix_path"
24509  fi
24510
24511  if test "x$path" != "x$new_path"; then
24512    BOOT_JDK="$new_path"
24513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24515  fi
24516
24517  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24518  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24519
24520    else
24521      # We're on a unix platform. Hooray! :)
24522      path="$BOOT_JDK"
24523      has_space=`$ECHO "$path" | $GREP " "`
24524      if test "x$has_space" != x; then
24525        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24526$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24527        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24528      fi
24529
24530      # Use eval to expand a potential ~
24531      eval path="$path"
24532      if test ! -f "$path" && test ! -d "$path"; then
24533        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24534      fi
24535
24536      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24537    fi
24538  fi
24539
24540            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24541$as_echo_n "checking for Boot JDK... " >&6; }
24542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24543$as_echo "$BOOT_JDK" >&6; }
24544            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24545$as_echo_n "checking Boot JDK version... " >&6; }
24546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24548$as_echo "$BOOT_JDK_VERSION" >&6; }
24549          fi # end check jdk version
24550        fi # end check javac
24551      fi # end check java
24552    fi # end check boot jdk found
24553  fi
24554
24555
24556  if test "x$BOOT_JDK_FOUND" = xno; then
24557    # Now execute the test
24558
24559  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24560  BOOT_JDK_SUFFIX=""
24561  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24562  if test "x$ALL_JDKS_FOUND" != x; then
24563    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24564
24565  if test "x$BOOT_JDK_FOUND" = xno; then
24566    # Now execute the test
24567
24568        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24569        if test -d "$BOOT_JDK"; then
24570          BOOT_JDK_FOUND=maybe
24571          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24572$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24573        fi
24574
24575
24576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24578      # Do we have a bin/java?
24579      if test ! -x "$BOOT_JDK/bin/java"; then
24580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24582        BOOT_JDK_FOUND=no
24583      else
24584        # Do we have a bin/javac?
24585        if test ! -x "$BOOT_JDK/bin/javac"; then
24586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24590          BOOT_JDK_FOUND=no
24591        else
24592          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24593          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24594
24595          # Extra M4 quote needed to protect [] in grep expression.
24596          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24597          if test "x$FOUND_CORRECT_VERSION" = x; then
24598            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24600            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24601$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24602            BOOT_JDK_FOUND=no
24603          else
24604            # We're done! :-)
24605            BOOT_JDK_FOUND=yes
24606
24607  # Only process if variable expands to non-empty
24608
24609  if test "x$BOOT_JDK" != x; then
24610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24611
24612  # Input might be given as Windows format, start by converting to
24613  # unix format.
24614  path="$BOOT_JDK"
24615  new_path=`$CYGPATH -u "$path"`
24616
24617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24620  # "foo.exe" is OK but "foo" is an error.
24621  #
24622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24623  # It is also a way to make sure we got the proper file name for the real test later on.
24624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24625  if test "x$test_shortpath" = x; then
24626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24628    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24629  fi
24630
24631  # Call helper function which possibly converts this using DOS-style short mode.
24632  # If so, the updated path is stored in $new_path.
24633
24634  input_path="$new_path"
24635  # Check if we need to convert this using DOS-style short mode. If the path
24636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24637  # take no chances and rewrite it.
24638  # Note: m4 eats our [], so we need to use [ and ] instead.
24639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24640  if test "x$has_forbidden_chars" != x; then
24641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24645      # Going to short mode and back again did indeed matter. Since short mode is
24646      # case insensitive, let's make it lowercase to improve readability.
24647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24648      # Now convert it back to Unix-style (cygpath)
24649      input_path=`$CYGPATH -u "$shortmode_path"`
24650      new_path="$input_path"
24651    fi
24652  fi
24653
24654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24655  if test "x$test_cygdrive_prefix" = x; then
24656    # As a simple fix, exclude /usr/bin since it's not a real path.
24657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24659      # a path prefixed by /cygdrive for fixpath to work.
24660      new_path="$CYGWIN_ROOT_PATH$input_path"
24661    fi
24662  fi
24663
24664
24665  if test "x$path" != "x$new_path"; then
24666    BOOT_JDK="$new_path"
24667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24669  fi
24670
24671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24672
24673  path="$BOOT_JDK"
24674  has_colon=`$ECHO $path | $GREP ^.:`
24675  new_path="$path"
24676  if test "x$has_colon" = x; then
24677    # Not in mixed or Windows style, start by that.
24678    new_path=`cmd //c echo $path`
24679  fi
24680
24681
24682  input_path="$new_path"
24683  # Check if we need to convert this using DOS-style short mode. If the path
24684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24685  # take no chances and rewrite it.
24686  # Note: m4 eats our [], so we need to use [ and ] instead.
24687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24688  if test "x$has_forbidden_chars" != x; then
24689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24691  fi
24692
24693
24694  windows_path="$new_path"
24695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24696    unix_path=`$CYGPATH -u "$windows_path"`
24697    new_path="$unix_path"
24698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24700    new_path="$unix_path"
24701  fi
24702
24703  if test "x$path" != "x$new_path"; then
24704    BOOT_JDK="$new_path"
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24707  fi
24708
24709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24711
24712    else
24713      # We're on a unix platform. Hooray! :)
24714      path="$BOOT_JDK"
24715      has_space=`$ECHO "$path" | $GREP " "`
24716      if test "x$has_space" != x; then
24717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24720      fi
24721
24722      # Use eval to expand a potential ~
24723      eval path="$path"
24724      if test ! -f "$path" && test ! -d "$path"; then
24725        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24726      fi
24727
24728      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24729    fi
24730  fi
24731
24732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24733$as_echo_n "checking for Boot JDK... " >&6; }
24734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24735$as_echo "$BOOT_JDK" >&6; }
24736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24737$as_echo_n "checking Boot JDK version... " >&6; }
24738            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24740$as_echo "$BOOT_JDK_VERSION" >&6; }
24741          fi # end check jdk version
24742        fi # end check javac
24743      fi # end check java
24744    fi # end check boot jdk found
24745  fi
24746
24747    done
24748  fi
24749
24750
24751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24753      # Do we have a bin/java?
24754      if test ! -x "$BOOT_JDK/bin/java"; then
24755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24757        BOOT_JDK_FOUND=no
24758      else
24759        # Do we have a bin/javac?
24760        if test ! -x "$BOOT_JDK/bin/javac"; then
24761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24765          BOOT_JDK_FOUND=no
24766        else
24767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24769
24770          # Extra M4 quote needed to protect [] in grep expression.
24771          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24772          if test "x$FOUND_CORRECT_VERSION" = x; then
24773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24777            BOOT_JDK_FOUND=no
24778          else
24779            # We're done! :-)
24780            BOOT_JDK_FOUND=yes
24781
24782  # Only process if variable expands to non-empty
24783
24784  if test "x$BOOT_JDK" != x; then
24785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24786
24787  # Input might be given as Windows format, start by converting to
24788  # unix format.
24789  path="$BOOT_JDK"
24790  new_path=`$CYGPATH -u "$path"`
24791
24792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24795  # "foo.exe" is OK but "foo" is an error.
24796  #
24797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24798  # It is also a way to make sure we got the proper file name for the real test later on.
24799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24800  if test "x$test_shortpath" = x; then
24801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24804  fi
24805
24806  # Call helper function which possibly converts this using DOS-style short mode.
24807  # If so, the updated path is stored in $new_path.
24808
24809  input_path="$new_path"
24810  # Check if we need to convert this using DOS-style short mode. If the path
24811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24812  # take no chances and rewrite it.
24813  # Note: m4 eats our [], so we need to use [ and ] instead.
24814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24815  if test "x$has_forbidden_chars" != x; then
24816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24820      # Going to short mode and back again did indeed matter. Since short mode is
24821      # case insensitive, let's make it lowercase to improve readability.
24822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24823      # Now convert it back to Unix-style (cygpath)
24824      input_path=`$CYGPATH -u "$shortmode_path"`
24825      new_path="$input_path"
24826    fi
24827  fi
24828
24829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24830  if test "x$test_cygdrive_prefix" = x; then
24831    # As a simple fix, exclude /usr/bin since it's not a real path.
24832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24834      # a path prefixed by /cygdrive for fixpath to work.
24835      new_path="$CYGWIN_ROOT_PATH$input_path"
24836    fi
24837  fi
24838
24839
24840  if test "x$path" != "x$new_path"; then
24841    BOOT_JDK="$new_path"
24842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24844  fi
24845
24846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24847
24848  path="$BOOT_JDK"
24849  has_colon=`$ECHO $path | $GREP ^.:`
24850  new_path="$path"
24851  if test "x$has_colon" = x; then
24852    # Not in mixed or Windows style, start by that.
24853    new_path=`cmd //c echo $path`
24854  fi
24855
24856
24857  input_path="$new_path"
24858  # Check if we need to convert this using DOS-style short mode. If the path
24859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24860  # take no chances and rewrite it.
24861  # Note: m4 eats our [], so we need to use [ and ] instead.
24862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24863  if test "x$has_forbidden_chars" != x; then
24864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24866  fi
24867
24868
24869  windows_path="$new_path"
24870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24871    unix_path=`$CYGPATH -u "$windows_path"`
24872    new_path="$unix_path"
24873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24875    new_path="$unix_path"
24876  fi
24877
24878  if test "x$path" != "x$new_path"; then
24879    BOOT_JDK="$new_path"
24880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24882  fi
24883
24884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24886
24887    else
24888      # We're on a unix platform. Hooray! :)
24889      path="$BOOT_JDK"
24890      has_space=`$ECHO "$path" | $GREP " "`
24891      if test "x$has_space" != x; then
24892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24895      fi
24896
24897      # Use eval to expand a potential ~
24898      eval path="$path"
24899      if test ! -f "$path" && test ! -d "$path"; then
24900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24901      fi
24902
24903      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24904    fi
24905  fi
24906
24907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24908$as_echo_n "checking for Boot JDK... " >&6; }
24909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24910$as_echo "$BOOT_JDK" >&6; }
24911            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24912$as_echo_n "checking Boot JDK version... " >&6; }
24913            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24915$as_echo "$BOOT_JDK_VERSION" >&6; }
24916          fi # end check jdk version
24917        fi # end check javac
24918      fi # end check java
24919    fi # end check boot jdk found
24920  fi
24921
24922  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24923
24924  if test "x$BOOT_JDK_FOUND" = xno; then
24925    # Now execute the test
24926
24927  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24928  BOOT_JDK_SUFFIX="/Contents/Home"
24929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24930  if test "x$ALL_JDKS_FOUND" != x; then
24931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24932
24933  if test "x$BOOT_JDK_FOUND" = xno; then
24934    # Now execute the test
24935
24936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24937        if test -d "$BOOT_JDK"; then
24938          BOOT_JDK_FOUND=maybe
24939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24941        fi
24942
24943
24944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24946      # Do we have a bin/java?
24947      if test ! -x "$BOOT_JDK/bin/java"; then
24948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24950        BOOT_JDK_FOUND=no
24951      else
24952        # Do we have a bin/javac?
24953        if test ! -x "$BOOT_JDK/bin/javac"; then
24954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24958          BOOT_JDK_FOUND=no
24959        else
24960          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24961          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24962
24963          # Extra M4 quote needed to protect [] in grep expression.
24964          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24965          if test "x$FOUND_CORRECT_VERSION" = x; then
24966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24968            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24969$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24970            BOOT_JDK_FOUND=no
24971          else
24972            # We're done! :-)
24973            BOOT_JDK_FOUND=yes
24974
24975  # Only process if variable expands to non-empty
24976
24977  if test "x$BOOT_JDK" != x; then
24978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24979
24980  # Input might be given as Windows format, start by converting to
24981  # unix format.
24982  path="$BOOT_JDK"
24983  new_path=`$CYGPATH -u "$path"`
24984
24985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24988  # "foo.exe" is OK but "foo" is an error.
24989  #
24990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24991  # It is also a way to make sure we got the proper file name for the real test later on.
24992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24993  if test "x$test_shortpath" = x; then
24994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24997  fi
24998
24999  # Call helper function which possibly converts this using DOS-style short mode.
25000  # If so, the updated path is stored in $new_path.
25001
25002  input_path="$new_path"
25003  # Check if we need to convert this using DOS-style short mode. If the path
25004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25005  # take no chances and rewrite it.
25006  # Note: m4 eats our [], so we need to use [ and ] instead.
25007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25008  if test "x$has_forbidden_chars" != x; then
25009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25013      # Going to short mode and back again did indeed matter. Since short mode is
25014      # case insensitive, let's make it lowercase to improve readability.
25015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25016      # Now convert it back to Unix-style (cygpath)
25017      input_path=`$CYGPATH -u "$shortmode_path"`
25018      new_path="$input_path"
25019    fi
25020  fi
25021
25022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25023  if test "x$test_cygdrive_prefix" = x; then
25024    # As a simple fix, exclude /usr/bin since it's not a real path.
25025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25027      # a path prefixed by /cygdrive for fixpath to work.
25028      new_path="$CYGWIN_ROOT_PATH$input_path"
25029    fi
25030  fi
25031
25032
25033  if test "x$path" != "x$new_path"; then
25034    BOOT_JDK="$new_path"
25035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25037  fi
25038
25039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25040
25041  path="$BOOT_JDK"
25042  has_colon=`$ECHO $path | $GREP ^.:`
25043  new_path="$path"
25044  if test "x$has_colon" = x; then
25045    # Not in mixed or Windows style, start by that.
25046    new_path=`cmd //c echo $path`
25047  fi
25048
25049
25050  input_path="$new_path"
25051  # Check if we need to convert this using DOS-style short mode. If the path
25052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25053  # take no chances and rewrite it.
25054  # Note: m4 eats our [], so we need to use [ and ] instead.
25055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25056  if test "x$has_forbidden_chars" != x; then
25057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25059  fi
25060
25061
25062  windows_path="$new_path"
25063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25064    unix_path=`$CYGPATH -u "$windows_path"`
25065    new_path="$unix_path"
25066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25068    new_path="$unix_path"
25069  fi
25070
25071  if test "x$path" != "x$new_path"; then
25072    BOOT_JDK="$new_path"
25073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25075  fi
25076
25077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25079
25080    else
25081      # We're on a unix platform. Hooray! :)
25082      path="$BOOT_JDK"
25083      has_space=`$ECHO "$path" | $GREP " "`
25084      if test "x$has_space" != x; then
25085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25088      fi
25089
25090      # Use eval to expand a potential ~
25091      eval path="$path"
25092      if test ! -f "$path" && test ! -d "$path"; then
25093        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25094      fi
25095
25096      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25097    fi
25098  fi
25099
25100            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25101$as_echo_n "checking for Boot JDK... " >&6; }
25102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25103$as_echo "$BOOT_JDK" >&6; }
25104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25105$as_echo_n "checking Boot JDK version... " >&6; }
25106            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25108$as_echo "$BOOT_JDK_VERSION" >&6; }
25109          fi # end check jdk version
25110        fi # end check javac
25111      fi # end check java
25112    fi # end check boot jdk found
25113  fi
25114
25115    done
25116  fi
25117
25118
25119    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25120    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25121      # Do we have a bin/java?
25122      if test ! -x "$BOOT_JDK/bin/java"; then
25123        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25125        BOOT_JDK_FOUND=no
25126      else
25127        # Do we have a bin/javac?
25128        if test ! -x "$BOOT_JDK/bin/javac"; then
25129          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25131          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25132$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25133          BOOT_JDK_FOUND=no
25134        else
25135          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25136          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25137
25138          # Extra M4 quote needed to protect [] in grep expression.
25139          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25140          if test "x$FOUND_CORRECT_VERSION" = x; then
25141            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25143            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25144$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25145            BOOT_JDK_FOUND=no
25146          else
25147            # We're done! :-)
25148            BOOT_JDK_FOUND=yes
25149
25150  # Only process if variable expands to non-empty
25151
25152  if test "x$BOOT_JDK" != x; then
25153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25154
25155  # Input might be given as Windows format, start by converting to
25156  # unix format.
25157  path="$BOOT_JDK"
25158  new_path=`$CYGPATH -u "$path"`
25159
25160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25163  # "foo.exe" is OK but "foo" is an error.
25164  #
25165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25166  # It is also a way to make sure we got the proper file name for the real test later on.
25167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25168  if test "x$test_shortpath" = x; then
25169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25171    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25172  fi
25173
25174  # Call helper function which possibly converts this using DOS-style short mode.
25175  # If so, the updated path is stored in $new_path.
25176
25177  input_path="$new_path"
25178  # Check if we need to convert this using DOS-style short mode. If the path
25179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25180  # take no chances and rewrite it.
25181  # Note: m4 eats our [], so we need to use [ and ] instead.
25182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25183  if test "x$has_forbidden_chars" != x; then
25184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25188      # Going to short mode and back again did indeed matter. Since short mode is
25189      # case insensitive, let's make it lowercase to improve readability.
25190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25191      # Now convert it back to Unix-style (cygpath)
25192      input_path=`$CYGPATH -u "$shortmode_path"`
25193      new_path="$input_path"
25194    fi
25195  fi
25196
25197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25198  if test "x$test_cygdrive_prefix" = x; then
25199    # As a simple fix, exclude /usr/bin since it's not a real path.
25200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25202      # a path prefixed by /cygdrive for fixpath to work.
25203      new_path="$CYGWIN_ROOT_PATH$input_path"
25204    fi
25205  fi
25206
25207
25208  if test "x$path" != "x$new_path"; then
25209    BOOT_JDK="$new_path"
25210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25211$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25212  fi
25213
25214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25215
25216  path="$BOOT_JDK"
25217  has_colon=`$ECHO $path | $GREP ^.:`
25218  new_path="$path"
25219  if test "x$has_colon" = x; then
25220    # Not in mixed or Windows style, start by that.
25221    new_path=`cmd //c echo $path`
25222  fi
25223
25224
25225  input_path="$new_path"
25226  # Check if we need to convert this using DOS-style short mode. If the path
25227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25228  # take no chances and rewrite it.
25229  # Note: m4 eats our [], so we need to use [ and ] instead.
25230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25231  if test "x$has_forbidden_chars" != x; then
25232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25234  fi
25235
25236
25237  windows_path="$new_path"
25238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25239    unix_path=`$CYGPATH -u "$windows_path"`
25240    new_path="$unix_path"
25241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25243    new_path="$unix_path"
25244  fi
25245
25246  if test "x$path" != "x$new_path"; then
25247    BOOT_JDK="$new_path"
25248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25250  fi
25251
25252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25254
25255    else
25256      # We're on a unix platform. Hooray! :)
25257      path="$BOOT_JDK"
25258      has_space=`$ECHO "$path" | $GREP " "`
25259      if test "x$has_space" != x; then
25260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25263      fi
25264
25265      # Use eval to expand a potential ~
25266      eval path="$path"
25267      if test ! -f "$path" && test ! -d "$path"; then
25268        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25269      fi
25270
25271      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25272    fi
25273  fi
25274
25275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25276$as_echo_n "checking for Boot JDK... " >&6; }
25277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25278$as_echo "$BOOT_JDK" >&6; }
25279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25280$as_echo_n "checking Boot JDK version... " >&6; }
25281            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25283$as_echo "$BOOT_JDK_VERSION" >&6; }
25284          fi # end check jdk version
25285        fi # end check javac
25286      fi # end check java
25287    fi # end check boot jdk found
25288  fi
25289
25290
25291  if test "x$BOOT_JDK_FOUND" = xno; then
25292    # Now execute the test
25293
25294  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25295  BOOT_JDK_SUFFIX="/Contents/Home"
25296  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25297  if test "x$ALL_JDKS_FOUND" != x; then
25298    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25299
25300  if test "x$BOOT_JDK_FOUND" = xno; then
25301    # Now execute the test
25302
25303        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25304        if test -d "$BOOT_JDK"; then
25305          BOOT_JDK_FOUND=maybe
25306          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25307$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25308        fi
25309
25310
25311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25313      # Do we have a bin/java?
25314      if test ! -x "$BOOT_JDK/bin/java"; then
25315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25317        BOOT_JDK_FOUND=no
25318      else
25319        # Do we have a bin/javac?
25320        if test ! -x "$BOOT_JDK/bin/javac"; then
25321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25325          BOOT_JDK_FOUND=no
25326        else
25327          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25328          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25329
25330          # Extra M4 quote needed to protect [] in grep expression.
25331          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25332          if test "x$FOUND_CORRECT_VERSION" = x; then
25333            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25335            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25336$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25337            BOOT_JDK_FOUND=no
25338          else
25339            # We're done! :-)
25340            BOOT_JDK_FOUND=yes
25341
25342  # Only process if variable expands to non-empty
25343
25344  if test "x$BOOT_JDK" != x; then
25345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25346
25347  # Input might be given as Windows format, start by converting to
25348  # unix format.
25349  path="$BOOT_JDK"
25350  new_path=`$CYGPATH -u "$path"`
25351
25352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25355  # "foo.exe" is OK but "foo" is an error.
25356  #
25357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25358  # It is also a way to make sure we got the proper file name for the real test later on.
25359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25360  if test "x$test_shortpath" = x; then
25361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25363    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25364  fi
25365
25366  # Call helper function which possibly converts this using DOS-style short mode.
25367  # If so, the updated path is stored in $new_path.
25368
25369  input_path="$new_path"
25370  # Check if we need to convert this using DOS-style short mode. If the path
25371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25372  # take no chances and rewrite it.
25373  # Note: m4 eats our [], so we need to use [ and ] instead.
25374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25375  if test "x$has_forbidden_chars" != x; then
25376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25380      # Going to short mode and back again did indeed matter. Since short mode is
25381      # case insensitive, let's make it lowercase to improve readability.
25382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25383      # Now convert it back to Unix-style (cygpath)
25384      input_path=`$CYGPATH -u "$shortmode_path"`
25385      new_path="$input_path"
25386    fi
25387  fi
25388
25389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25390  if test "x$test_cygdrive_prefix" = x; then
25391    # As a simple fix, exclude /usr/bin since it's not a real path.
25392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25394      # a path prefixed by /cygdrive for fixpath to work.
25395      new_path="$CYGWIN_ROOT_PATH$input_path"
25396    fi
25397  fi
25398
25399
25400  if test "x$path" != "x$new_path"; then
25401    BOOT_JDK="$new_path"
25402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25404  fi
25405
25406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25407
25408  path="$BOOT_JDK"
25409  has_colon=`$ECHO $path | $GREP ^.:`
25410  new_path="$path"
25411  if test "x$has_colon" = x; then
25412    # Not in mixed or Windows style, start by that.
25413    new_path=`cmd //c echo $path`
25414  fi
25415
25416
25417  input_path="$new_path"
25418  # Check if we need to convert this using DOS-style short mode. If the path
25419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25420  # take no chances and rewrite it.
25421  # Note: m4 eats our [], so we need to use [ and ] instead.
25422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25423  if test "x$has_forbidden_chars" != x; then
25424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25426  fi
25427
25428
25429  windows_path="$new_path"
25430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25431    unix_path=`$CYGPATH -u "$windows_path"`
25432    new_path="$unix_path"
25433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25435    new_path="$unix_path"
25436  fi
25437
25438  if test "x$path" != "x$new_path"; then
25439    BOOT_JDK="$new_path"
25440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25442  fi
25443
25444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25446
25447    else
25448      # We're on a unix platform. Hooray! :)
25449      path="$BOOT_JDK"
25450      has_space=`$ECHO "$path" | $GREP " "`
25451      if test "x$has_space" != x; then
25452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25454        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25455      fi
25456
25457      # Use eval to expand a potential ~
25458      eval path="$path"
25459      if test ! -f "$path" && test ! -d "$path"; then
25460        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25461      fi
25462
25463      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25464    fi
25465  fi
25466
25467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25468$as_echo_n "checking for Boot JDK... " >&6; }
25469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25470$as_echo "$BOOT_JDK" >&6; }
25471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25472$as_echo_n "checking Boot JDK version... " >&6; }
25473            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25475$as_echo "$BOOT_JDK_VERSION" >&6; }
25476          fi # end check jdk version
25477        fi # end check javac
25478      fi # end check java
25479    fi # end check boot jdk found
25480  fi
25481
25482    done
25483  fi
25484
25485
25486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25488      # Do we have a bin/java?
25489      if test ! -x "$BOOT_JDK/bin/java"; then
25490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25492        BOOT_JDK_FOUND=no
25493      else
25494        # Do we have a bin/javac?
25495        if test ! -x "$BOOT_JDK/bin/javac"; then
25496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25500          BOOT_JDK_FOUND=no
25501        else
25502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25504
25505          # Extra M4 quote needed to protect [] in grep expression.
25506          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25507          if test "x$FOUND_CORRECT_VERSION" = x; then
25508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25512            BOOT_JDK_FOUND=no
25513          else
25514            # We're done! :-)
25515            BOOT_JDK_FOUND=yes
25516
25517  # Only process if variable expands to non-empty
25518
25519  if test "x$BOOT_JDK" != x; then
25520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25521
25522  # Input might be given as Windows format, start by converting to
25523  # unix format.
25524  path="$BOOT_JDK"
25525  new_path=`$CYGPATH -u "$path"`
25526
25527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25530  # "foo.exe" is OK but "foo" is an error.
25531  #
25532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25533  # It is also a way to make sure we got the proper file name for the real test later on.
25534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25535  if test "x$test_shortpath" = x; then
25536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25539  fi
25540
25541  # Call helper function which possibly converts this using DOS-style short mode.
25542  # If so, the updated path is stored in $new_path.
25543
25544  input_path="$new_path"
25545  # Check if we need to convert this using DOS-style short mode. If the path
25546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25547  # take no chances and rewrite it.
25548  # Note: m4 eats our [], so we need to use [ and ] instead.
25549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25550  if test "x$has_forbidden_chars" != x; then
25551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25555      # Going to short mode and back again did indeed matter. Since short mode is
25556      # case insensitive, let's make it lowercase to improve readability.
25557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25558      # Now convert it back to Unix-style (cygpath)
25559      input_path=`$CYGPATH -u "$shortmode_path"`
25560      new_path="$input_path"
25561    fi
25562  fi
25563
25564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25565  if test "x$test_cygdrive_prefix" = x; then
25566    # As a simple fix, exclude /usr/bin since it's not a real path.
25567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25569      # a path prefixed by /cygdrive for fixpath to work.
25570      new_path="$CYGWIN_ROOT_PATH$input_path"
25571    fi
25572  fi
25573
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25582
25583  path="$BOOT_JDK"
25584  has_colon=`$ECHO $path | $GREP ^.:`
25585  new_path="$path"
25586  if test "x$has_colon" = x; then
25587    # Not in mixed or Windows style, start by that.
25588    new_path=`cmd //c echo $path`
25589  fi
25590
25591
25592  input_path="$new_path"
25593  # Check if we need to convert this using DOS-style short mode. If the path
25594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25595  # take no chances and rewrite it.
25596  # Note: m4 eats our [], so we need to use [ and ] instead.
25597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25598  if test "x$has_forbidden_chars" != x; then
25599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25601  fi
25602
25603
25604  windows_path="$new_path"
25605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25606    unix_path=`$CYGPATH -u "$windows_path"`
25607    new_path="$unix_path"
25608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25610    new_path="$unix_path"
25611  fi
25612
25613  if test "x$path" != "x$new_path"; then
25614    BOOT_JDK="$new_path"
25615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25617  fi
25618
25619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25621
25622    else
25623      # We're on a unix platform. Hooray! :)
25624      path="$BOOT_JDK"
25625      has_space=`$ECHO "$path" | $GREP " "`
25626      if test "x$has_space" != x; then
25627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25630      fi
25631
25632      # Use eval to expand a potential ~
25633      eval path="$path"
25634      if test ! -f "$path" && test ! -d "$path"; then
25635        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25636      fi
25637
25638      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25639    fi
25640  fi
25641
25642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25643$as_echo_n "checking for Boot JDK... " >&6; }
25644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25645$as_echo "$BOOT_JDK" >&6; }
25646            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25647$as_echo_n "checking Boot JDK version... " >&6; }
25648            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25650$as_echo "$BOOT_JDK_VERSION" >&6; }
25651          fi # end check jdk version
25652        fi # end check javac
25653      fi # end check java
25654    fi # end check boot jdk found
25655  fi
25656
25657  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25658
25659  if test "x$BOOT_JDK_FOUND" = xno; then
25660    # Now execute the test
25661
25662  BOOT_JDK_PREFIX="/usr/lib/jvm"
25663  BOOT_JDK_SUFFIX=""
25664  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25665  if test "x$ALL_JDKS_FOUND" != x; then
25666    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25667
25668  if test "x$BOOT_JDK_FOUND" = xno; then
25669    # Now execute the test
25670
25671        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25672        if test -d "$BOOT_JDK"; then
25673          BOOT_JDK_FOUND=maybe
25674          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25675$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25676        fi
25677
25678
25679    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25680    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25681      # Do we have a bin/java?
25682      if test ! -x "$BOOT_JDK/bin/java"; then
25683        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25685        BOOT_JDK_FOUND=no
25686      else
25687        # Do we have a bin/javac?
25688        if test ! -x "$BOOT_JDK/bin/javac"; then
25689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25691          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25692$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25693          BOOT_JDK_FOUND=no
25694        else
25695          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25696          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25697
25698          # Extra M4 quote needed to protect [] in grep expression.
25699          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25700          if test "x$FOUND_CORRECT_VERSION" = x; then
25701            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25703            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25704$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25705            BOOT_JDK_FOUND=no
25706          else
25707            # We're done! :-)
25708            BOOT_JDK_FOUND=yes
25709
25710  # Only process if variable expands to non-empty
25711
25712  if test "x$BOOT_JDK" != x; then
25713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25714
25715  # Input might be given as Windows format, start by converting to
25716  # unix format.
25717  path="$BOOT_JDK"
25718  new_path=`$CYGPATH -u "$path"`
25719
25720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25723  # "foo.exe" is OK but "foo" is an error.
25724  #
25725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25726  # It is also a way to make sure we got the proper file name for the real test later on.
25727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25728  if test "x$test_shortpath" = x; then
25729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25732  fi
25733
25734  # Call helper function which possibly converts this using DOS-style short mode.
25735  # If so, the updated path is stored in $new_path.
25736
25737  input_path="$new_path"
25738  # Check if we need to convert this using DOS-style short mode. If the path
25739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25740  # take no chances and rewrite it.
25741  # Note: m4 eats our [], so we need to use [ and ] instead.
25742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25743  if test "x$has_forbidden_chars" != x; then
25744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25748      # Going to short mode and back again did indeed matter. Since short mode is
25749      # case insensitive, let's make it lowercase to improve readability.
25750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25751      # Now convert it back to Unix-style (cygpath)
25752      input_path=`$CYGPATH -u "$shortmode_path"`
25753      new_path="$input_path"
25754    fi
25755  fi
25756
25757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25758  if test "x$test_cygdrive_prefix" = x; then
25759    # As a simple fix, exclude /usr/bin since it's not a real path.
25760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25762      # a path prefixed by /cygdrive for fixpath to work.
25763      new_path="$CYGWIN_ROOT_PATH$input_path"
25764    fi
25765  fi
25766
25767
25768  if test "x$path" != "x$new_path"; then
25769    BOOT_JDK="$new_path"
25770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25772  fi
25773
25774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25775
25776  path="$BOOT_JDK"
25777  has_colon=`$ECHO $path | $GREP ^.:`
25778  new_path="$path"
25779  if test "x$has_colon" = x; then
25780    # Not in mixed or Windows style, start by that.
25781    new_path=`cmd //c echo $path`
25782  fi
25783
25784
25785  input_path="$new_path"
25786  # Check if we need to convert this using DOS-style short mode. If the path
25787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25788  # take no chances and rewrite it.
25789  # Note: m4 eats our [], so we need to use [ and ] instead.
25790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25791  if test "x$has_forbidden_chars" != x; then
25792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25794  fi
25795
25796
25797  windows_path="$new_path"
25798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25799    unix_path=`$CYGPATH -u "$windows_path"`
25800    new_path="$unix_path"
25801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25803    new_path="$unix_path"
25804  fi
25805
25806  if test "x$path" != "x$new_path"; then
25807    BOOT_JDK="$new_path"
25808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25810  fi
25811
25812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25814
25815    else
25816      # We're on a unix platform. Hooray! :)
25817      path="$BOOT_JDK"
25818      has_space=`$ECHO "$path" | $GREP " "`
25819      if test "x$has_space" != x; then
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25823      fi
25824
25825      # Use eval to expand a potential ~
25826      eval path="$path"
25827      if test ! -f "$path" && test ! -d "$path"; then
25828        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25829      fi
25830
25831      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25832    fi
25833  fi
25834
25835            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25836$as_echo_n "checking for Boot JDK... " >&6; }
25837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25838$as_echo "$BOOT_JDK" >&6; }
25839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25840$as_echo_n "checking Boot JDK version... " >&6; }
25841            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25843$as_echo "$BOOT_JDK_VERSION" >&6; }
25844          fi # end check jdk version
25845        fi # end check javac
25846      fi # end check java
25847    fi # end check boot jdk found
25848  fi
25849
25850    done
25851  fi
25852
25853
25854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25856      # Do we have a bin/java?
25857      if test ! -x "$BOOT_JDK/bin/java"; then
25858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25860        BOOT_JDK_FOUND=no
25861      else
25862        # Do we have a bin/javac?
25863        if test ! -x "$BOOT_JDK/bin/javac"; then
25864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25868          BOOT_JDK_FOUND=no
25869        else
25870          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25871          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25872
25873          # Extra M4 quote needed to protect [] in grep expression.
25874          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25875          if test "x$FOUND_CORRECT_VERSION" = x; then
25876            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25878            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25879$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25880            BOOT_JDK_FOUND=no
25881          else
25882            # We're done! :-)
25883            BOOT_JDK_FOUND=yes
25884
25885  # Only process if variable expands to non-empty
25886
25887  if test "x$BOOT_JDK" != x; then
25888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889
25890  # Input might be given as Windows format, start by converting to
25891  # unix format.
25892  path="$BOOT_JDK"
25893  new_path=`$CYGPATH -u "$path"`
25894
25895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25898  # "foo.exe" is OK but "foo" is an error.
25899  #
25900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25901  # It is also a way to make sure we got the proper file name for the real test later on.
25902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25903  if test "x$test_shortpath" = x; then
25904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25906    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25907  fi
25908
25909  # Call helper function which possibly converts this using DOS-style short mode.
25910  # If so, the updated path is stored in $new_path.
25911
25912  input_path="$new_path"
25913  # Check if we need to convert this using DOS-style short mode. If the path
25914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25915  # take no chances and rewrite it.
25916  # Note: m4 eats our [], so we need to use [ and ] instead.
25917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25918  if test "x$has_forbidden_chars" != x; then
25919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25923      # Going to short mode and back again did indeed matter. Since short mode is
25924      # case insensitive, let's make it lowercase to improve readability.
25925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25926      # Now convert it back to Unix-style (cygpath)
25927      input_path=`$CYGPATH -u "$shortmode_path"`
25928      new_path="$input_path"
25929    fi
25930  fi
25931
25932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25933  if test "x$test_cygdrive_prefix" = x; then
25934    # As a simple fix, exclude /usr/bin since it's not a real path.
25935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25937      # a path prefixed by /cygdrive for fixpath to work.
25938      new_path="$CYGWIN_ROOT_PATH$input_path"
25939    fi
25940  fi
25941
25942
25943  if test "x$path" != "x$new_path"; then
25944    BOOT_JDK="$new_path"
25945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25947  fi
25948
25949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25950
25951  path="$BOOT_JDK"
25952  has_colon=`$ECHO $path | $GREP ^.:`
25953  new_path="$path"
25954  if test "x$has_colon" = x; then
25955    # Not in mixed or Windows style, start by that.
25956    new_path=`cmd //c echo $path`
25957  fi
25958
25959
25960  input_path="$new_path"
25961  # Check if we need to convert this using DOS-style short mode. If the path
25962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25963  # take no chances and rewrite it.
25964  # Note: m4 eats our [], so we need to use [ and ] instead.
25965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25966  if test "x$has_forbidden_chars" != x; then
25967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25969  fi
25970
25971
25972  windows_path="$new_path"
25973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25974    unix_path=`$CYGPATH -u "$windows_path"`
25975    new_path="$unix_path"
25976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25978    new_path="$unix_path"
25979  fi
25980
25981  if test "x$path" != "x$new_path"; then
25982    BOOT_JDK="$new_path"
25983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25985  fi
25986
25987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25989
25990    else
25991      # We're on a unix platform. Hooray! :)
25992      path="$BOOT_JDK"
25993      has_space=`$ECHO "$path" | $GREP " "`
25994      if test "x$has_space" != x; then
25995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25998      fi
25999
26000      # Use eval to expand a potential ~
26001      eval path="$path"
26002      if test ! -f "$path" && test ! -d "$path"; then
26003        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26004      fi
26005
26006      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26007    fi
26008  fi
26009
26010            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26011$as_echo_n "checking for Boot JDK... " >&6; }
26012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26013$as_echo "$BOOT_JDK" >&6; }
26014            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26015$as_echo_n "checking Boot JDK version... " >&6; }
26016            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26018$as_echo "$BOOT_JDK_VERSION" >&6; }
26019          fi # end check jdk version
26020        fi # end check javac
26021      fi # end check java
26022    fi # end check boot jdk found
26023  fi
26024
26025  fi
26026
26027
26028    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26029    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26030      # Do we have a bin/java?
26031      if test ! -x "$BOOT_JDK/bin/java"; then
26032        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26034        BOOT_JDK_FOUND=no
26035      else
26036        # Do we have a bin/javac?
26037        if test ! -x "$BOOT_JDK/bin/javac"; then
26038          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26040          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26041$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26042          BOOT_JDK_FOUND=no
26043        else
26044          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26045          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26046
26047          # Extra M4 quote needed to protect [] in grep expression.
26048          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26049          if test "x$FOUND_CORRECT_VERSION" = x; then
26050            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26052            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26053$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26054            BOOT_JDK_FOUND=no
26055          else
26056            # We're done! :-)
26057            BOOT_JDK_FOUND=yes
26058
26059  # Only process if variable expands to non-empty
26060
26061  if test "x$BOOT_JDK" != x; then
26062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26063
26064  # Input might be given as Windows format, start by converting to
26065  # unix format.
26066  path="$BOOT_JDK"
26067  new_path=`$CYGPATH -u "$path"`
26068
26069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26072  # "foo.exe" is OK but "foo" is an error.
26073  #
26074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26075  # It is also a way to make sure we got the proper file name for the real test later on.
26076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26077  if test "x$test_shortpath" = x; then
26078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26080    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26081  fi
26082
26083  # Call helper function which possibly converts this using DOS-style short mode.
26084  # If so, the updated path is stored in $new_path.
26085
26086  input_path="$new_path"
26087  # Check if we need to convert this using DOS-style short mode. If the path
26088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26089  # take no chances and rewrite it.
26090  # Note: m4 eats our [], so we need to use [ and ] instead.
26091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26092  if test "x$has_forbidden_chars" != x; then
26093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26097      # Going to short mode and back again did indeed matter. Since short mode is
26098      # case insensitive, let's make it lowercase to improve readability.
26099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26100      # Now convert it back to Unix-style (cygpath)
26101      input_path=`$CYGPATH -u "$shortmode_path"`
26102      new_path="$input_path"
26103    fi
26104  fi
26105
26106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26107  if test "x$test_cygdrive_prefix" = x; then
26108    # As a simple fix, exclude /usr/bin since it's not a real path.
26109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26111      # a path prefixed by /cygdrive for fixpath to work.
26112      new_path="$CYGWIN_ROOT_PATH$input_path"
26113    fi
26114  fi
26115
26116
26117  if test "x$path" != "x$new_path"; then
26118    BOOT_JDK="$new_path"
26119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26121  fi
26122
26123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26124
26125  path="$BOOT_JDK"
26126  has_colon=`$ECHO $path | $GREP ^.:`
26127  new_path="$path"
26128  if test "x$has_colon" = x; then
26129    # Not in mixed or Windows style, start by that.
26130    new_path=`cmd //c echo $path`
26131  fi
26132
26133
26134  input_path="$new_path"
26135  # Check if we need to convert this using DOS-style short mode. If the path
26136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26137  # take no chances and rewrite it.
26138  # Note: m4 eats our [], so we need to use [ and ] instead.
26139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26140  if test "x$has_forbidden_chars" != x; then
26141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26143  fi
26144
26145
26146  windows_path="$new_path"
26147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26148    unix_path=`$CYGPATH -u "$windows_path"`
26149    new_path="$unix_path"
26150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26152    new_path="$unix_path"
26153  fi
26154
26155  if test "x$path" != "x$new_path"; then
26156    BOOT_JDK="$new_path"
26157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26159  fi
26160
26161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26163
26164    else
26165      # We're on a unix platform. Hooray! :)
26166      path="$BOOT_JDK"
26167      has_space=`$ECHO "$path" | $GREP " "`
26168      if test "x$has_space" != x; then
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26172      fi
26173
26174      # Use eval to expand a potential ~
26175      eval path="$path"
26176      if test ! -f "$path" && test ! -d "$path"; then
26177        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26178      fi
26179
26180      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26181    fi
26182  fi
26183
26184            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26185$as_echo_n "checking for Boot JDK... " >&6; }
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26187$as_echo "$BOOT_JDK" >&6; }
26188            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26189$as_echo_n "checking Boot JDK version... " >&6; }
26190            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26192$as_echo "$BOOT_JDK_VERSION" >&6; }
26193          fi # end check jdk version
26194        fi # end check javac
26195      fi # end check java
26196    fi # end check boot jdk found
26197  fi
26198
26199
26200  # If we haven't found anything yet, we've truly lost. Give up.
26201  if test "x$BOOT_JDK_FOUND" = xno; then
26202
26203  # Print a helpful message on how to acquire the necessary build dependency.
26204  # openjdk is the help tag: freetype, cups, alsa etc
26205  MISSING_DEPENDENCY=openjdk
26206
26207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26208    cygwin_help $MISSING_DEPENDENCY
26209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26210    msys_help $MISSING_DEPENDENCY
26211  else
26212    PKGHANDLER_COMMAND=
26213
26214    case $PKGHANDLER in
26215      apt-get)
26216        apt_help     $MISSING_DEPENDENCY ;;
26217      yum)
26218        yum_help     $MISSING_DEPENDENCY ;;
26219      port)
26220        port_help    $MISSING_DEPENDENCY ;;
26221      pkgutil)
26222        pkgutil_help $MISSING_DEPENDENCY ;;
26223      pkgadd)
26224        pkgadd_help  $MISSING_DEPENDENCY ;;
26225    esac
26226
26227    if test "x$PKGHANDLER_COMMAND" != x; then
26228      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26229    fi
26230  fi
26231
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
26233$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
26234    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
26235$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26236    as_fn_error $? "Cannot continue" "$LINENO" 5
26237  fi
26238
26239
26240
26241  # Setup tools from the Boot JDK.
26242
26243  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26244
26245  # Publish this variable in the help.
26246
26247
26248  if [ -z "${JAVA+x}" ]; then
26249    # The variable is not set by user, try to locate tool using the code snippet
26250
26251      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26252$as_echo_n "checking for java in Boot JDK... " >&6; }
26253      JAVA=$BOOT_JDK/bin/java
26254      if test ! -x $JAVA; then
26255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26256$as_echo "not found" >&6; }
26257        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26258$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26259        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26260      fi
26261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26262$as_echo "ok" >&6; }
26263
26264
26265  else
26266    # The variable is set, but is it from the command line or the environment?
26267
26268    # Try to remove the string !JAVA! from our list.
26269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26271      # If it failed, the variable was not from the command line. Ignore it,
26272      # but warn the user (except for BASH, which is always set by the calling BASH).
26273      if test "xJAVA" != xBASH; then
26274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26275$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26276      fi
26277      # Try to locate tool using the code snippet
26278
26279      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26280$as_echo_n "checking for java in Boot JDK... " >&6; }
26281      JAVA=$BOOT_JDK/bin/java
26282      if test ! -x $JAVA; then
26283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26284$as_echo "not found" >&6; }
26285        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26286$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26287        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26288      fi
26289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26290$as_echo "ok" >&6; }
26291
26292
26293    else
26294      # If it succeeded, then it was overridden by the user. We will use it
26295      # for the tool.
26296
26297      # First remove it from the list of overridden variables, so we can test
26298      # for unknown variables in the end.
26299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26300
26301      # Check if we try to supply an empty value
26302      if test "x$JAVA" = x; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
26304$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
26305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26306$as_echo_n "checking for JAVA... " >&6; }
26307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26308$as_echo "disabled" >&6; }
26309      else
26310        # Check if the provided tool contains a complete path.
26311        tool_specified="$JAVA"
26312        tool_basename="${tool_specified##*/}"
26313        if test "x$tool_basename" = "x$tool_specified"; then
26314          # A command without a complete path is provided, search $PATH.
26315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26316$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26317          # Extract the first word of "$tool_basename", so it can be a program name with args.
26318set dummy $tool_basename; ac_word=$2
26319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26320$as_echo_n "checking for $ac_word... " >&6; }
26321if ${ac_cv_path_JAVA+:} false; then :
26322  $as_echo_n "(cached) " >&6
26323else
26324  case $JAVA in
26325  [\\/]* | ?:[\\/]*)
26326  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26327  ;;
26328  *)
26329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26330for as_dir in $PATH
26331do
26332  IFS=$as_save_IFS
26333  test -z "$as_dir" && as_dir=.
26334    for ac_exec_ext in '' $ac_executable_extensions; do
26335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26336    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26338    break 2
26339  fi
26340done
26341  done
26342IFS=$as_save_IFS
26343
26344  ;;
26345esac
26346fi
26347JAVA=$ac_cv_path_JAVA
26348if test -n "$JAVA"; then
26349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26350$as_echo "$JAVA" >&6; }
26351else
26352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26353$as_echo "no" >&6; }
26354fi
26355
26356
26357          if test "x$JAVA" = x; then
26358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26359          fi
26360        else
26361          # Otherwise we believe it is a complete path. Use it as it is.
26362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26363$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26365$as_echo_n "checking for JAVA... " >&6; }
26366          if test ! -x "$tool_specified"; then
26367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26368$as_echo "not found" >&6; }
26369            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26370          fi
26371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26372$as_echo "$tool_specified" >&6; }
26373        fi
26374      fi
26375    fi
26376  fi
26377
26378
26379
26380  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26381
26382  # Publish this variable in the help.
26383
26384
26385  if [ -z "${JAVAC+x}" ]; then
26386    # The variable is not set by user, try to locate tool using the code snippet
26387
26388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26389$as_echo_n "checking for javac in Boot JDK... " >&6; }
26390      JAVAC=$BOOT_JDK/bin/javac
26391      if test ! -x $JAVAC; then
26392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26393$as_echo "not found" >&6; }
26394        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26395$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26396        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26397      fi
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26399$as_echo "ok" >&6; }
26400
26401
26402  else
26403    # The variable is set, but is it from the command line or the environment?
26404
26405    # Try to remove the string !JAVAC! from our list.
26406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26408      # If it failed, the variable was not from the command line. Ignore it,
26409      # but warn the user (except for BASH, which is always set by the calling BASH).
26410      if test "xJAVAC" != xBASH; then
26411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26412$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26413      fi
26414      # Try to locate tool using the code snippet
26415
26416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26417$as_echo_n "checking for javac in Boot JDK... " >&6; }
26418      JAVAC=$BOOT_JDK/bin/javac
26419      if test ! -x $JAVAC; then
26420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26421$as_echo "not found" >&6; }
26422        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26423$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26424        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26425      fi
26426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26427$as_echo "ok" >&6; }
26428
26429
26430    else
26431      # If it succeeded, then it was overridden by the user. We will use it
26432      # for the tool.
26433
26434      # First remove it from the list of overridden variables, so we can test
26435      # for unknown variables in the end.
26436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26437
26438      # Check if we try to supply an empty value
26439      if test "x$JAVAC" = x; then
26440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
26441$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
26442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26443$as_echo_n "checking for JAVAC... " >&6; }
26444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26445$as_echo "disabled" >&6; }
26446      else
26447        # Check if the provided tool contains a complete path.
26448        tool_specified="$JAVAC"
26449        tool_basename="${tool_specified##*/}"
26450        if test "x$tool_basename" = "x$tool_specified"; then
26451          # A command without a complete path is provided, search $PATH.
26452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26453$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26454          # Extract the first word of "$tool_basename", so it can be a program name with args.
26455set dummy $tool_basename; ac_word=$2
26456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26457$as_echo_n "checking for $ac_word... " >&6; }
26458if ${ac_cv_path_JAVAC+:} false; then :
26459  $as_echo_n "(cached) " >&6
26460else
26461  case $JAVAC in
26462  [\\/]* | ?:[\\/]*)
26463  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26464  ;;
26465  *)
26466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26467for as_dir in $PATH
26468do
26469  IFS=$as_save_IFS
26470  test -z "$as_dir" && as_dir=.
26471    for ac_exec_ext in '' $ac_executable_extensions; do
26472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26473    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26475    break 2
26476  fi
26477done
26478  done
26479IFS=$as_save_IFS
26480
26481  ;;
26482esac
26483fi
26484JAVAC=$ac_cv_path_JAVAC
26485if test -n "$JAVAC"; then
26486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26487$as_echo "$JAVAC" >&6; }
26488else
26489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26490$as_echo "no" >&6; }
26491fi
26492
26493
26494          if test "x$JAVAC" = x; then
26495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26496          fi
26497        else
26498          # Otherwise we believe it is a complete path. Use it as it is.
26499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26500$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26502$as_echo_n "checking for JAVAC... " >&6; }
26503          if test ! -x "$tool_specified"; then
26504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26505$as_echo "not found" >&6; }
26506            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26507          fi
26508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26509$as_echo "$tool_specified" >&6; }
26510        fi
26511      fi
26512    fi
26513  fi
26514
26515
26516
26517  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26518
26519  # Publish this variable in the help.
26520
26521
26522  if [ -z "${JAVAH+x}" ]; then
26523    # The variable is not set by user, try to locate tool using the code snippet
26524
26525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26526$as_echo_n "checking for javah in Boot JDK... " >&6; }
26527      JAVAH=$BOOT_JDK/bin/javah
26528      if test ! -x $JAVAH; then
26529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26530$as_echo "not found" >&6; }
26531        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26532$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26533        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26534      fi
26535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26536$as_echo "ok" >&6; }
26537
26538
26539  else
26540    # The variable is set, but is it from the command line or the environment?
26541
26542    # Try to remove the string !JAVAH! from our list.
26543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26545      # If it failed, the variable was not from the command line. Ignore it,
26546      # but warn the user (except for BASH, which is always set by the calling BASH).
26547      if test "xJAVAH" != xBASH; then
26548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26549$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26550      fi
26551      # Try to locate tool using the code snippet
26552
26553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26554$as_echo_n "checking for javah in Boot JDK... " >&6; }
26555      JAVAH=$BOOT_JDK/bin/javah
26556      if test ! -x $JAVAH; then
26557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26558$as_echo "not found" >&6; }
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26561        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26562      fi
26563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26564$as_echo "ok" >&6; }
26565
26566
26567    else
26568      # If it succeeded, then it was overridden by the user. We will use it
26569      # for the tool.
26570
26571      # First remove it from the list of overridden variables, so we can test
26572      # for unknown variables in the end.
26573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26574
26575      # Check if we try to supply an empty value
26576      if test "x$JAVAH" = x; then
26577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
26578$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
26579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26580$as_echo_n "checking for JAVAH... " >&6; }
26581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26582$as_echo "disabled" >&6; }
26583      else
26584        # Check if the provided tool contains a complete path.
26585        tool_specified="$JAVAH"
26586        tool_basename="${tool_specified##*/}"
26587        if test "x$tool_basename" = "x$tool_specified"; then
26588          # A command without a complete path is provided, search $PATH.
26589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26590$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26591          # Extract the first word of "$tool_basename", so it can be a program name with args.
26592set dummy $tool_basename; ac_word=$2
26593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26594$as_echo_n "checking for $ac_word... " >&6; }
26595if ${ac_cv_path_JAVAH+:} false; then :
26596  $as_echo_n "(cached) " >&6
26597else
26598  case $JAVAH in
26599  [\\/]* | ?:[\\/]*)
26600  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26601  ;;
26602  *)
26603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26604for as_dir in $PATH
26605do
26606  IFS=$as_save_IFS
26607  test -z "$as_dir" && as_dir=.
26608    for ac_exec_ext in '' $ac_executable_extensions; do
26609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26610    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26612    break 2
26613  fi
26614done
26615  done
26616IFS=$as_save_IFS
26617
26618  ;;
26619esac
26620fi
26621JAVAH=$ac_cv_path_JAVAH
26622if test -n "$JAVAH"; then
26623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26624$as_echo "$JAVAH" >&6; }
26625else
26626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26627$as_echo "no" >&6; }
26628fi
26629
26630
26631          if test "x$JAVAH" = x; then
26632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26633          fi
26634        else
26635          # Otherwise we believe it is a complete path. Use it as it is.
26636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26637$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26639$as_echo_n "checking for JAVAH... " >&6; }
26640          if test ! -x "$tool_specified"; then
26641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26642$as_echo "not found" >&6; }
26643            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26644          fi
26645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26646$as_echo "$tool_specified" >&6; }
26647        fi
26648      fi
26649    fi
26650  fi
26651
26652
26653
26654  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26655
26656  # Publish this variable in the help.
26657
26658
26659  if [ -z "${JAR+x}" ]; then
26660    # The variable is not set by user, try to locate tool using the code snippet
26661
26662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26663$as_echo_n "checking for jar in Boot JDK... " >&6; }
26664      JAR=$BOOT_JDK/bin/jar
26665      if test ! -x $JAR; then
26666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26667$as_echo "not found" >&6; }
26668        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26669$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26670        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26671      fi
26672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26673$as_echo "ok" >&6; }
26674
26675
26676  else
26677    # The variable is set, but is it from the command line or the environment?
26678
26679    # Try to remove the string !JAR! from our list.
26680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26682      # If it failed, the variable was not from the command line. Ignore it,
26683      # but warn the user (except for BASH, which is always set by the calling BASH).
26684      if test "xJAR" != xBASH; then
26685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26686$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26687      fi
26688      # Try to locate tool using the code snippet
26689
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26691$as_echo_n "checking for jar in Boot JDK... " >&6; }
26692      JAR=$BOOT_JDK/bin/jar
26693      if test ! -x $JAR; then
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26695$as_echo "not found" >&6; }
26696        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26697$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26698        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26699      fi
26700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26701$as_echo "ok" >&6; }
26702
26703
26704    else
26705      # If it succeeded, then it was overridden by the user. We will use it
26706      # for the tool.
26707
26708      # First remove it from the list of overridden variables, so we can test
26709      # for unknown variables in the end.
26710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26711
26712      # Check if we try to supply an empty value
26713      if test "x$JAR" = x; then
26714        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
26715$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
26716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26717$as_echo_n "checking for JAR... " >&6; }
26718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26719$as_echo "disabled" >&6; }
26720      else
26721        # Check if the provided tool contains a complete path.
26722        tool_specified="$JAR"
26723        tool_basename="${tool_specified##*/}"
26724        if test "x$tool_basename" = "x$tool_specified"; then
26725          # A command without a complete path is provided, search $PATH.
26726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26727$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26728          # Extract the first word of "$tool_basename", so it can be a program name with args.
26729set dummy $tool_basename; ac_word=$2
26730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26731$as_echo_n "checking for $ac_word... " >&6; }
26732if ${ac_cv_path_JAR+:} false; then :
26733  $as_echo_n "(cached) " >&6
26734else
26735  case $JAR in
26736  [\\/]* | ?:[\\/]*)
26737  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26738  ;;
26739  *)
26740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26741for as_dir in $PATH
26742do
26743  IFS=$as_save_IFS
26744  test -z "$as_dir" && as_dir=.
26745    for ac_exec_ext in '' $ac_executable_extensions; do
26746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26747    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26749    break 2
26750  fi
26751done
26752  done
26753IFS=$as_save_IFS
26754
26755  ;;
26756esac
26757fi
26758JAR=$ac_cv_path_JAR
26759if test -n "$JAR"; then
26760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26761$as_echo "$JAR" >&6; }
26762else
26763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26764$as_echo "no" >&6; }
26765fi
26766
26767
26768          if test "x$JAR" = x; then
26769            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26770          fi
26771        else
26772          # Otherwise we believe it is a complete path. Use it as it is.
26773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26774$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26775          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26776$as_echo_n "checking for JAR... " >&6; }
26777          if test ! -x "$tool_specified"; then
26778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26779$as_echo "not found" >&6; }
26780            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26781          fi
26782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26783$as_echo "$tool_specified" >&6; }
26784        fi
26785      fi
26786    fi
26787  fi
26788
26789
26790
26791  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26792
26793  # Publish this variable in the help.
26794
26795
26796  if [ -z "${JARSIGNER+x}" ]; then
26797    # The variable is not set by user, try to locate tool using the code snippet
26798
26799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26800$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26801      JARSIGNER=$BOOT_JDK/bin/jarsigner
26802      if test ! -x $JARSIGNER; then
26803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26804$as_echo "not found" >&6; }
26805        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26806$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26807        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26808      fi
26809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26810$as_echo "ok" >&6; }
26811
26812
26813  else
26814    # The variable is set, but is it from the command line or the environment?
26815
26816    # Try to remove the string !JARSIGNER! from our list.
26817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26819      # If it failed, the variable was not from the command line. Ignore it,
26820      # but warn the user (except for BASH, which is always set by the calling BASH).
26821      if test "xJARSIGNER" != xBASH; then
26822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26823$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26824      fi
26825      # Try to locate tool using the code snippet
26826
26827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26828$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26829      JARSIGNER=$BOOT_JDK/bin/jarsigner
26830      if test ! -x $JARSIGNER; then
26831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26832$as_echo "not found" >&6; }
26833        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26834$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26835        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26836      fi
26837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26838$as_echo "ok" >&6; }
26839
26840
26841    else
26842      # If it succeeded, then it was overridden by the user. We will use it
26843      # for the tool.
26844
26845      # First remove it from the list of overridden variables, so we can test
26846      # for unknown variables in the end.
26847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26848
26849      # Check if we try to supply an empty value
26850      if test "x$JARSIGNER" = x; then
26851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
26852$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26854$as_echo_n "checking for JARSIGNER... " >&6; }
26855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26856$as_echo "disabled" >&6; }
26857      else
26858        # Check if the provided tool contains a complete path.
26859        tool_specified="$JARSIGNER"
26860        tool_basename="${tool_specified##*/}"
26861        if test "x$tool_basename" = "x$tool_specified"; then
26862          # A command without a complete path is provided, search $PATH.
26863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26864$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26865          # Extract the first word of "$tool_basename", so it can be a program name with args.
26866set dummy $tool_basename; ac_word=$2
26867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26868$as_echo_n "checking for $ac_word... " >&6; }
26869if ${ac_cv_path_JARSIGNER+:} false; then :
26870  $as_echo_n "(cached) " >&6
26871else
26872  case $JARSIGNER in
26873  [\\/]* | ?:[\\/]*)
26874  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26875  ;;
26876  *)
26877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26878for as_dir in $PATH
26879do
26880  IFS=$as_save_IFS
26881  test -z "$as_dir" && as_dir=.
26882    for ac_exec_ext in '' $ac_executable_extensions; do
26883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26884    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26886    break 2
26887  fi
26888done
26889  done
26890IFS=$as_save_IFS
26891
26892  ;;
26893esac
26894fi
26895JARSIGNER=$ac_cv_path_JARSIGNER
26896if test -n "$JARSIGNER"; then
26897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26898$as_echo "$JARSIGNER" >&6; }
26899else
26900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26901$as_echo "no" >&6; }
26902fi
26903
26904
26905          if test "x$JARSIGNER" = x; then
26906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26907          fi
26908        else
26909          # Otherwise we believe it is a complete path. Use it as it is.
26910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26911$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26913$as_echo_n "checking for JARSIGNER... " >&6; }
26914          if test ! -x "$tool_specified"; then
26915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26916$as_echo "not found" >&6; }
26917            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26918          fi
26919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26920$as_echo "$tool_specified" >&6; }
26921        fi
26922      fi
26923    fi
26924  fi
26925
26926
26927
26928  # Finally, set some other options...
26929
26930  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26931  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26932
26933
26934
26935
26936###############################################################################
26937#
26938# Configure the sources to use. We can add or override individual directories.
26939#
26940###############################################################################
26941
26942
26943  # Where are the sources. Any of these can be overridden
26944  # using --with-override-corba and the likes.
26945  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26946  CORBA_TOPDIR="$SRC_ROOT/corba"
26947  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26948  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26949  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26950  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26951  JDK_TOPDIR="$SRC_ROOT/jdk"
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962  ###############################################################################
26963  #
26964  # Pickup additional source for a component from outside of the source root
26965  # or override source for a component.
26966  #
26967
26968# Check whether --with-add-source-root was given.
26969if test "${with_add_source_root+set}" = set; then :
26970  withval=$with_add_source_root;
26971fi
26972
26973
26974
26975# Check whether --with-override-source-root was given.
26976if test "${with_override_source_root+set}" = set; then :
26977  withval=$with_override_source_root;
26978fi
26979
26980
26981
26982# Check whether --with-adds-and-overrides was given.
26983if test "${with_adds_and_overrides+set}" = set; then :
26984  withval=$with_adds_and_overrides;
26985fi
26986
26987
26988  if test "x$with_adds_and_overrides" != x; then
26989    with_add_source_root="$with_adds_and_overrides/adds"
26990    with_override_source_root="$with_adds_and_overrides/overrides"
26991  fi
26992
26993  if test "x$with_add_source_root" != x; then
26994    if ! test -d $with_add_source_root; then
26995      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26996    fi
26997    CURDIR="$PWD"
26998    cd "$with_add_source_root"
26999    ADD_SRC_ROOT="`pwd`"
27000    cd "$CURDIR"
27001    # Verify that the addon source root does not have any root makefiles.
27002    # If it does, then it is usually an error, prevent this.
27003    if test -f $with_add_source_root/langtools/make/Makefile; then
27004      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
27005    fi
27006    if test -f $with_add_source_root/corba/make/Makefile; then
27007      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
27008    fi
27009    if test -f $with_add_source_root/jaxp/make/Makefile; then
27010      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
27011    fi
27012    if test -f $with_add_source_root/jaxws/make/Makefile; then
27013      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
27014    fi
27015    if test -f $with_add_source_root/hotspot/make/Makefile; then
27016      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
27017    fi
27018    if test -f $with_add_source_root/nashorn/make/Makefile; then
27019      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
27020    fi
27021    if test -f $with_add_source_root/jdk/make/Makefile; then
27022      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
27023    fi
27024  fi
27025
27026
27027  if test "x$with_override_source_root" != x; then
27028    if ! test -d $with_override_source_root; then
27029      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
27030    fi
27031    CURDIR="$PWD"
27032    cd "$with_override_source_root"
27033    OVERRIDE_SRC_ROOT="`pwd`"
27034    cd "$CURDIR"
27035    if test -f $with_override_source_root/langtools/make/Makefile; then
27036      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
27037    fi
27038    if test -f $with_override_source_root/corba/make/Makefile; then
27039      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
27040    fi
27041    if test -f $with_override_source_root/jaxp/make/Makefile; then
27042      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
27043    fi
27044    if test -f $with_override_source_root/jaxws/make/Makefile; then
27045      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
27046    fi
27047    if test -f $with_override_source_root/hotspot/make/Makefile; then
27048      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
27049    fi
27050    if test -f $with_override_source_root/nashorn/make/Makefile; then
27051      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
27052    fi
27053    if test -f $with_override_source_root/jdk/make/Makefile; then
27054      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
27055    fi
27056  fi
27057
27058
27059  ###############################################################################
27060  #
27061  # Override a repo completely, this is used for example when you have 3 small
27062  # development sandboxes of the langtools sources and want to avoid having 3 full
27063  # OpenJDK sources checked out on disk.
27064  #
27065  # Assuming that the 3 langtools sandboxes are located here:
27066  # /home/fredrik/sandbox1/langtools
27067  # /home/fredrik/sandbox2/langtools
27068  # /home/fredrik/sandbox3/langtools
27069  #
27070  # From the source root you create build subdirs manually:
27071  #     mkdir -p build1 build2 build3
27072  # in each build directory run:
27073  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
27074  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
27075  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
27076  #
27077
27078
27079# Check whether --with-override-langtools was given.
27080if test "${with_override_langtools+set}" = set; then :
27081  withval=$with_override_langtools;
27082fi
27083
27084
27085
27086# Check whether --with-override-corba was given.
27087if test "${with_override_corba+set}" = set; then :
27088  withval=$with_override_corba;
27089fi
27090
27091
27092
27093# Check whether --with-override-jaxp was given.
27094if test "${with_override_jaxp+set}" = set; then :
27095  withval=$with_override_jaxp;
27096fi
27097
27098
27099
27100# Check whether --with-override-jaxws was given.
27101if test "${with_override_jaxws+set}" = set; then :
27102  withval=$with_override_jaxws;
27103fi
27104
27105
27106
27107# Check whether --with-override-hotspot was given.
27108if test "${with_override_hotspot+set}" = set; then :
27109  withval=$with_override_hotspot;
27110fi
27111
27112
27113
27114# Check whether --with-override-nashorn was given.
27115if test "${with_override_nashorn+set}" = set; then :
27116  withval=$with_override_nashorn;
27117fi
27118
27119
27120
27121# Check whether --with-override-jdk was given.
27122if test "${with_override_jdk+set}" = set; then :
27123  withval=$with_override_jdk;
27124fi
27125
27126
27127  if test "x$with_override_langtools" != x; then
27128    CURDIR="$PWD"
27129    cd "$with_override_langtools"
27130    LANGTOOLS_TOPDIR="`pwd`"
27131    cd "$CURDIR"
27132    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
27133      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
27134    fi
27135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
27136$as_echo_n "checking if langtools should be overridden... " >&6; }
27137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
27138$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
27139  fi
27140  if test "x$with_override_corba" != x; then
27141    CURDIR="$PWD"
27142    cd "$with_override_corba"
27143    CORBA_TOPDIR="`pwd`"
27144    cd "$CURDIR"
27145    if ! test -f $CORBA_TOPDIR/make/Makefile; then
27146      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
27147    fi
27148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
27149$as_echo_n "checking if corba should be overridden... " >&6; }
27150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
27151$as_echo "yes with $CORBA_TOPDIR" >&6; }
27152  fi
27153  if test "x$with_override_jaxp" != x; then
27154    CURDIR="$PWD"
27155    cd "$with_override_jaxp"
27156    JAXP_TOPDIR="`pwd`"
27157    cd "$CURDIR"
27158    if ! test -f $JAXP_TOPDIR/make/Makefile; then
27159      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
27160    fi
27161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
27162$as_echo_n "checking if jaxp should be overridden... " >&6; }
27163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
27164$as_echo "yes with $JAXP_TOPDIR" >&6; }
27165  fi
27166  if test "x$with_override_jaxws" != x; then
27167    CURDIR="$PWD"
27168    cd "$with_override_jaxws"
27169    JAXWS_TOPDIR="`pwd`"
27170    cd "$CURDIR"
27171    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
27172      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
27173    fi
27174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
27175$as_echo_n "checking if jaxws should be overridden... " >&6; }
27176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
27177$as_echo "yes with $JAXWS_TOPDIR" >&6; }
27178  fi
27179  if test "x$with_override_hotspot" != x; then
27180    CURDIR="$PWD"
27181    cd "$with_override_hotspot"
27182    HOTSPOT_TOPDIR="`pwd`"
27183    cd "$CURDIR"
27184    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
27185      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
27186    fi
27187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
27188$as_echo_n "checking if hotspot should be overridden... " >&6; }
27189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
27190$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
27191  fi
27192  if test "x$with_override_nashorn" != x; then
27193    CURDIR="$PWD"
27194    cd "$with_override_nashorn"
27195    NASHORN_TOPDIR="`pwd`"
27196    cd "$CURDIR"
27197    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
27198      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
27199    fi
27200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
27201$as_echo_n "checking if nashorn should be overridden... " >&6; }
27202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
27203$as_echo "yes with $NASHORN_TOPDIR" >&6; }
27204  fi
27205  if test "x$with_override_jdk" != x; then
27206    CURDIR="$PWD"
27207    cd "$with_override_jdk"
27208    JDK_TOPDIR="`pwd`"
27209    cd "$CURDIR"
27210    if ! test -f $JDK_TOPDIR/make/Makefile; then
27211      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
27212    fi
27213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
27214$as_echo_n "checking if JDK should be overridden... " >&6; }
27215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
27216$as_echo "yes with $JDK_TOPDIR" >&6; }
27217  fi
27218
27219
27220  BUILD_OUTPUT="$OUTPUT_ROOT"
27221
27222
27223  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
27224  BUILD_HOTSPOT=true
27225
27226
27227
27228# Check whether --with-import-hotspot was given.
27229if test "${with_import_hotspot+set}" = set; then :
27230  withval=$with_import_hotspot;
27231fi
27232
27233  if test "x$with_import_hotspot" != x; then
27234    CURDIR="$PWD"
27235    cd "$with_import_hotspot"
27236    HOTSPOT_DIST="`pwd`"
27237    cd "$CURDIR"
27238    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27239      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27240    fi
27241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27242$as_echo_n "checking if hotspot should be imported... " >&6; }
27243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27244$as_echo "yes from $HOTSPOT_DIST" >&6; }
27245    BUILD_HOTSPOT=false
27246  fi
27247
27248  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27249
27250
27251###############################################################################
27252#
27253# Setup the toolchain (compilers etc), i.e. tools used to compile and process
27254# native code.
27255#
27256###############################################################################
27257
27258# See if we are doing a complete static build or not
27259
27260  # Check whether --enable-static-build was given.
27261if test "${enable_static_build+set}" = set; then :
27262  enableval=$enable_static_build;
27263fi
27264
27265  STATIC_BUILD=false
27266  if test "x$enable_static_build" = "xyes"; then
27267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
27268$as_echo_n "checking if static build is enabled... " >&6; }
27269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27270$as_echo "yes" >&6; }
27271    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
27272      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
27273    fi
27274    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
27275    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
27276    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
27277    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
27278    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
27279    STATIC_BUILD=true
27280  elif test "x$enable_static_build" = "xno"; then
27281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
27282$as_echo_n "checking if static build is enabled... " >&6; }
27283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27284$as_echo "no" >&6; }
27285  elif test "x$enable_static_build" != "x"; then
27286    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
27287  fi
27288
27289
27290
27291
27292# First determine the toolchain type (compiler family)
27293
27294
27295# Check whether --with-toolchain-type was given.
27296if test "${with_toolchain_type+set}" = set; then :
27297  withval=$with_toolchain_type;
27298fi
27299
27300
27301  # Use indirect variable referencing
27302  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27303  VALID_TOOLCHAINS=${!toolchain_var_name}
27304
27305  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27306    if test -n "$XCODEBUILD"; then
27307      # On Mac OS X, default toolchain to clang after Xcode 5
27308      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27309      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27310      if test $? -ne 0; then
27311        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27312      fi
27313      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
27314          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
27315          $CUT -f 1 -d .`
27316      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
27317$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
27318      if test $XCODE_MAJOR_VERSION -ge 5; then
27319          DEFAULT_TOOLCHAIN="clang"
27320      else
27321          DEFAULT_TOOLCHAIN="gcc"
27322      fi
27323    else
27324      # If Xcode is not installed, but the command line tools are
27325      # then we can't run xcodebuild. On these systems we should
27326      # default to clang
27327      DEFAULT_TOOLCHAIN="clang"
27328    fi
27329  else
27330    # First toolchain type in the list is the default
27331    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27332  fi
27333
27334  if test "x$with_toolchain_type" = xlist; then
27335    # List all toolchains
27336    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27337$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27338    for toolchain in $VALID_TOOLCHAINS; do
27339      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27340      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27341      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27342    done
27343
27344    exit 0
27345  elif test "x$with_toolchain_type" != x; then
27346    # User override; check that it is valid
27347    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27348      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27349$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27350      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27351$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27352      as_fn_error $? "Cannot continue." "$LINENO" 5
27353    fi
27354    TOOLCHAIN_TYPE=$with_toolchain_type
27355  else
27356    # No flag given, use default
27357    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27358  fi
27359
27360
27361  TOOLCHAIN_CC_BINARY_clang="clang"
27362  TOOLCHAIN_CC_BINARY_gcc="gcc"
27363  TOOLCHAIN_CC_BINARY_microsoft="cl"
27364  TOOLCHAIN_CC_BINARY_solstudio="cc"
27365  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27366
27367  TOOLCHAIN_CXX_BINARY_clang="clang++"
27368  TOOLCHAIN_CXX_BINARY_gcc="g++"
27369  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27370  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27371  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27372
27373  # Use indirect variable referencing
27374  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27375  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27376  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27377  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27378  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27379  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27380
27381
27382  # Define filename patterns
27383  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27384    LIBRARY_PREFIX=
27385    SHARED_LIBRARY_SUFFIX='.dll'
27386    STATIC_LIBRARY_SUFFIX='.lib'
27387    SHARED_LIBRARY='$1.dll'
27388    STATIC_LIBRARY='$1.lib'
27389    OBJ_SUFFIX='.obj'
27390    EXE_SUFFIX='.exe'
27391  else
27392    LIBRARY_PREFIX=lib
27393    SHARED_LIBRARY_SUFFIX='.so'
27394    STATIC_LIBRARY_SUFFIX='.a'
27395    SHARED_LIBRARY='lib$1.so'
27396    STATIC_LIBRARY='lib$1.a'
27397    OBJ_SUFFIX='.o'
27398    EXE_SUFFIX=''
27399    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27400      # For full static builds, we're overloading the SHARED_LIBRARY
27401      # variables in order to limit the amount of changes required.
27402      # It would be better to remove SHARED and just use LIBRARY and
27403      # LIBRARY_SUFFIX for libraries that can be built either
27404      # shared or static and use STATIC_* for libraries that are
27405      # always built statically.
27406      if test "x$STATIC_BUILD" = xtrue; then
27407        SHARED_LIBRARY='lib$1.a'
27408        SHARED_LIBRARY_SUFFIX='.a'
27409      else
27410        SHARED_LIBRARY='lib$1.dylib'
27411        SHARED_LIBRARY_SUFFIX='.dylib'
27412      fi
27413    fi
27414  fi
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27426    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27427$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27428  else
27429    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27430$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27431  fi
27432
27433
27434# User supplied flags should be used when configure detects compilers
27435
27436  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27438$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27439  fi
27440
27441  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27443$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27444  fi
27445
27446  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27448$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27449  fi
27450
27451
27452# Check whether --with-extra-cflags was given.
27453if test "${with_extra_cflags+set}" = set; then :
27454  withval=$with_extra_cflags;
27455fi
27456
27457
27458
27459# Check whether --with-extra-cxxflags was given.
27460if test "${with_extra_cxxflags+set}" = set; then :
27461  withval=$with_extra_cxxflags;
27462fi
27463
27464
27465
27466# Check whether --with-extra-ldflags was given.
27467if test "${with_extra_ldflags+set}" = set; then :
27468  withval=$with_extra_ldflags;
27469fi
27470
27471
27472  EXTRA_CFLAGS="$with_extra_cflags"
27473  EXTRA_CXXFLAGS="$with_extra_cxxflags"
27474  EXTRA_LDFLAGS="$with_extra_ldflags"
27475
27476  # Hotspot needs these set in their legacy form
27477  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
27478  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
27479  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
27480
27481
27482
27483
27484
27485  # The global CFLAGS and LDLAGS variables are used by configure tests and
27486  # should include the extra parameters
27487  CFLAGS="$EXTRA_CFLAGS"
27488  CXXFLAGS="$EXTRA_CXXFLAGS"
27489  LDFLAGS="$EXTRA_LDFLAGS"
27490  CPPFLAGS=""
27491
27492# The sysroot cflags are needed for configure to be able to run the compilers
27493
27494  if test "x$SYSROOT" != "x"; then
27495    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27496      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27497        # Solaris Studio does not have a concept of sysroot. Instead we must
27498        # make sure the default include and lib dirs are appended to each
27499        # compile and link command line.
27500        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
27501        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
27502            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
27503            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
27504      fi
27505    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
27506      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
27507      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
27508    elif test "x$TOOLCHAIN_TYPE" = xclang; then
27509      SYSROOT_CFLAGS="-isysroot $SYSROOT"
27510      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
27511    fi
27512    # Propagate the sysroot args to hotspot
27513    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
27514    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
27515    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
27516    # The global CFLAGS and LDFLAGS variables need these for configure to function
27517    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
27518    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
27519    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
27520    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
27521  fi
27522
27523  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27524    # We also need -iframework<path>/System/Library/Frameworks
27525    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27526    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27527    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
27528    # set this here so it doesn't have to be peppered throughout the forest
27529    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27530    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27531  fi
27532
27533
27534
27535
27536
27537# Then detect the actual binaries needed
27538
27539  # FIXME: Is this needed?
27540  ac_ext=cpp
27541ac_cpp='$CXXCPP $CPPFLAGS'
27542ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27543ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27544ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27545
27546
27547  # Store the CFLAGS etc passed to the configure script.
27548  ORG_CFLAGS="$CFLAGS"
27549  ORG_CXXFLAGS="$CXXFLAGS"
27550
27551  # autoconf magic only relies on PATH, so update it if tools dir is specified
27552  OLD_PATH="$PATH"
27553
27554  # On Windows, we need to detect the visual studio installation first.
27555  # This will change the PATH, but we need to keep that new PATH even
27556  # after toolchain detection is done, since the compiler (on x86) uses
27557  # it for DLL resolution in runtime.
27558  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27559      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27560
27561  # Store path to cygwin link.exe to help excluding it when searching for
27562  # VS linker. This must be done before changing the PATH when looking for VS.
27563  # Extract the first word of "link", so it can be a program name with args.
27564set dummy link; ac_word=$2
27565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27566$as_echo_n "checking for $ac_word... " >&6; }
27567if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27568  $as_echo_n "(cached) " >&6
27569else
27570  case $CYGWIN_LINK in
27571  [\\/]* | ?:[\\/]*)
27572  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27573  ;;
27574  *)
27575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27576for as_dir in $PATH
27577do
27578  IFS=$as_save_IFS
27579  test -z "$as_dir" && as_dir=.
27580    for ac_exec_ext in '' $ac_executable_extensions; do
27581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27582    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27584    break 2
27585  fi
27586done
27587  done
27588IFS=$as_save_IFS
27589
27590  ;;
27591esac
27592fi
27593CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27594if test -n "$CYGWIN_LINK"; then
27595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27596$as_echo "$CYGWIN_LINK" >&6; }
27597else
27598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27599$as_echo "no" >&6; }
27600fi
27601
27602
27603  if test "x$CYGWIN_LINK" != x; then
27604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27605$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27606    "$CYGWIN_LINK" --version > /dev/null
27607    if test $? -eq 0 ; then
27608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27609$as_echo "yes" >&6; }
27610    else
27611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27612$as_echo "no" >&6; }
27613      # This might be the VS linker. Don't exclude it later on.
27614      CYGWIN_LINK=""
27615    fi
27616  fi
27617
27618  # First-hand choice is to locate and run the vsvars bat file.
27619
27620
27621# Check whether --with-toolchain-version was given.
27622if test "${with_toolchain_version+set}" = set; then :
27623  withval=$with_toolchain_version;
27624fi
27625
27626
27627  if test "x$with_toolchain_version" = xlist; then
27628    # List all toolchains
27629    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27630$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27631    for version in $VALID_VS_VERSIONS; do
27632      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27633      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27634    done
27635
27636    exit 0
27637  elif test "x$DEVKIT_VS_VERSION" != x; then
27638    VS_VERSION=$DEVKIT_VS_VERSION
27639    TOOLCHAIN_VERSION=$VS_VERSION
27640    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27641    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27642    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27643    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27644    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27645    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27646
27647    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27648    # can still be exported as INCLUDE for compiler invocations without
27649    # SYSROOT_CFLAGS
27650    OLDIFS="$IFS"
27651    IFS=";"
27652    for i in $DEVKIT_VS_INCLUDE; do
27653      ipath=$i
27654
27655  unix_path="$ipath"
27656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27657    windows_path=`$CYGPATH -m "$unix_path"`
27658    ipath="$windows_path"
27659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27660    windows_path=`cmd //c echo $unix_path`
27661    ipath="$windows_path"
27662  fi
27663
27664      VS_INCLUDE="$VS_INCLUDE;$ipath"
27665    done
27666    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27667    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27668    for i in $DEVKIT_VS_LIB; do
27669      libpath=$i
27670
27671  unix_path="$libpath"
27672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27673    windows_path=`$CYGPATH -m "$unix_path"`
27674    libpath="$windows_path"
27675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27676    windows_path=`cmd //c echo $unix_path`
27677    libpath="$windows_path"
27678  fi
27679
27680      VS_LIB="$VS_LIB;$libpath"
27681    done
27682    IFS="$OLDIFS"
27683
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27685$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27686
27687  elif test "x$with_toolchain_version" != x; then
27688    # User override; check that it is valid
27689    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27690      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27691$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27692      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27693$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27694      as_fn_error $? "Cannot continue." "$LINENO" 5
27695    fi
27696    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27697  else
27698    # No flag given, use default
27699    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27700  fi
27701
27702  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27703
27704  VS_VERSION="$VS_VERSION"
27705  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27706  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27707  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27708  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27709
27710  # When using --with-tools-dir, assume it points to the correct and default
27711  # version of Visual Studio or that --with-toolchain-version was also set.
27712  if test "x$with_tools_dir" != x; then
27713
27714  if test "x$VS_ENV_CMD" = x; then
27715    VS_VERSION="${VS_VERSION}"
27716    VS_BASE="$with_tools_dir/../.."
27717    METHOD="--with-tools-dir"
27718
27719    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27720      VCVARSFILE="vc/bin/vcvars32.bat"
27721    else
27722      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27723    fi
27724
27725
27726  windows_path="$VS_BASE"
27727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27728    unix_path=`$CYGPATH -u "$windows_path"`
27729    VS_BASE="$unix_path"
27730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27732    VS_BASE="$unix_path"
27733  fi
27734
27735    if test -d "$VS_BASE"; then
27736      if test -f "$VS_BASE/$VCVARSFILE"; then
27737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27738$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27739        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27740        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27741        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27742        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27743      else
27744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27745$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27746        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27747$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27748      fi
27749    fi
27750  fi
27751
27752
27753  if test "x$VS_ENV_CMD" = x; then
27754    VS_VERSION="${VS_VERSION}"
27755    VS_BASE="$with_tools_dir/../../.."
27756    METHOD="--with-tools-dir"
27757
27758    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27759      VCVARSFILE="vc/bin/vcvars32.bat"
27760    else
27761      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27762    fi
27763
27764
27765  windows_path="$VS_BASE"
27766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27767    unix_path=`$CYGPATH -u "$windows_path"`
27768    VS_BASE="$unix_path"
27769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27771    VS_BASE="$unix_path"
27772  fi
27773
27774    if test -d "$VS_BASE"; then
27775      if test -f "$VS_BASE/$VCVARSFILE"; then
27776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27777$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27778        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27779        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27780        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27781        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27782      else
27783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27785        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27786$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27787      fi
27788    fi
27789  fi
27790
27791    if test "x$VS_ENV_CMD" = x; then
27792      # Having specified an argument which is incorrect will produce an instant failure;
27793      # we should not go on looking
27794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27795$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27796      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27797$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27798      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27799$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27800      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27801    fi
27802  fi
27803
27804  VS_ENV_CMD=""
27805  VS_ENV_ARGS=""
27806
27807  if test "x$VS_COMNTOOLS" != x; then
27808
27809  if test "x$VS_ENV_CMD" = x; then
27810    VS_VERSION="${VS_VERSION}"
27811    VS_BASE="$VS_COMNTOOLS/../.."
27812    METHOD="$VS_COMNTOOLS_VAR variable"
27813
27814    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27815      VCVARSFILE="vc/bin/vcvars32.bat"
27816    else
27817      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27818    fi
27819
27820
27821  windows_path="$VS_BASE"
27822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27823    unix_path=`$CYGPATH -u "$windows_path"`
27824    VS_BASE="$unix_path"
27825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27827    VS_BASE="$unix_path"
27828  fi
27829
27830    if test -d "$VS_BASE"; then
27831      if test -f "$VS_BASE/$VCVARSFILE"; then
27832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27833$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27834        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27835        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27836        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27837        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27838      else
27839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27840$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27841        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27842$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27843      fi
27844    fi
27845  fi
27846
27847  fi
27848  if test "x$PROGRAMFILES" != x; then
27849
27850  if test "x$VS_ENV_CMD" = x; then
27851    VS_VERSION="${VS_VERSION}"
27852    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27853    METHOD="well-known name"
27854
27855    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27856      VCVARSFILE="vc/bin/vcvars32.bat"
27857    else
27858      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27859    fi
27860
27861
27862  windows_path="$VS_BASE"
27863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27864    unix_path=`$CYGPATH -u "$windows_path"`
27865    VS_BASE="$unix_path"
27866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27868    VS_BASE="$unix_path"
27869  fi
27870
27871    if test -d "$VS_BASE"; then
27872      if test -f "$VS_BASE/$VCVARSFILE"; then
27873        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27874$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27875        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27876        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27877        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27878        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27879      else
27880        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27881$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27882        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27883$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27884      fi
27885    fi
27886  fi
27887
27888  fi
27889  # Work around the insanely named ProgramFiles(x86) env variable
27890  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27891  if test "x$PROGRAMFILES_X86" != x; then
27892
27893  if test "x$VS_ENV_CMD" = x; then
27894    VS_VERSION="${VS_VERSION}"
27895    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27896    METHOD="well-known name"
27897
27898    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27899      VCVARSFILE="vc/bin/vcvars32.bat"
27900    else
27901      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27902    fi
27903
27904
27905  windows_path="$VS_BASE"
27906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27907    unix_path=`$CYGPATH -u "$windows_path"`
27908    VS_BASE="$unix_path"
27909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27911    VS_BASE="$unix_path"
27912  fi
27913
27914    if test -d "$VS_BASE"; then
27915      if test -f "$VS_BASE/$VCVARSFILE"; then
27916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27917$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27918        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27919        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27920        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27921        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27922      else
27923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27924$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27926$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27927      fi
27928    fi
27929  fi
27930
27931  fi
27932
27933  if test "x$VS_ENV_CMD" = x; then
27934    VS_VERSION="${VS_VERSION}"
27935    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27936    METHOD="well-known name"
27937
27938    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27939      VCVARSFILE="vc/bin/vcvars32.bat"
27940    else
27941      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27942    fi
27943
27944
27945  windows_path="$VS_BASE"
27946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27947    unix_path=`$CYGPATH -u "$windows_path"`
27948    VS_BASE="$unix_path"
27949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27951    VS_BASE="$unix_path"
27952  fi
27953
27954    if test -d "$VS_BASE"; then
27955      if test -f "$VS_BASE/$VCVARSFILE"; then
27956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27957$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27958        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27959        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27960        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27961        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27962      else
27963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27964$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27965        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27966$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27967      fi
27968    fi
27969  fi
27970
27971
27972  if test "x$VS_ENV_CMD" = x; then
27973    VS_VERSION="${VS_VERSION}"
27974    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27975    METHOD="well-known name"
27976
27977    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27978      VCVARSFILE="vc/bin/vcvars32.bat"
27979    else
27980      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27981    fi
27982
27983
27984  windows_path="$VS_BASE"
27985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27986    unix_path=`$CYGPATH -u "$windows_path"`
27987    VS_BASE="$unix_path"
27988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27990    VS_BASE="$unix_path"
27991  fi
27992
27993    if test -d "$VS_BASE"; then
27994      if test -f "$VS_BASE/$VCVARSFILE"; then
27995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27996$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27997        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27998        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27999        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28000        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28001      else
28002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28003$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28005$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28006      fi
28007    fi
28008  fi
28009
28010
28011  if test "x$SDK_INSTALL_DIR" != x; then
28012    if test "x$ProgramW6432" != x; then
28013
28014  if test "x$VS_ENV_CMD" = x; then
28015    VS_VERSION="${VS_VERSION}"
28016    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
28017    METHOD="well-known name"
28018
28019  windows_path="$WIN_SDK_BASE"
28020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28021    unix_path=`$CYGPATH -u "$windows_path"`
28022    WIN_SDK_BASE="$unix_path"
28023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28025    WIN_SDK_BASE="$unix_path"
28026  fi
28027
28028    if test -d "$WIN_SDK_BASE"; then
28029      # There have been cases of partial or broken SDK installations. A missing
28030      # lib dir is not going to work.
28031      if test ! -d "$WIN_SDK_BASE/lib"; then
28032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28033$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28034        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28035$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28036      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28038$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28039        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28040        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28041          VS_ENV_ARGS="/x86"
28042        else
28043          VS_ENV_ARGS="/x64"
28044        fi
28045        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28046        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28047        # TODO: improve detection for other versions of SDK
28048        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28049      else
28050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28053$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28054      fi
28055    fi
28056  fi
28057
28058    fi
28059    if test "x$PROGRAMW6432" != x; then
28060
28061  if test "x$VS_ENV_CMD" = x; then
28062    VS_VERSION="${VS_VERSION}"
28063    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
28064    METHOD="well-known name"
28065
28066  windows_path="$WIN_SDK_BASE"
28067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28068    unix_path=`$CYGPATH -u "$windows_path"`
28069    WIN_SDK_BASE="$unix_path"
28070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28072    WIN_SDK_BASE="$unix_path"
28073  fi
28074
28075    if test -d "$WIN_SDK_BASE"; then
28076      # There have been cases of partial or broken SDK installations. A missing
28077      # lib dir is not going to work.
28078      if test ! -d "$WIN_SDK_BASE/lib"; then
28079        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28080$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28081        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28082$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28083      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28085$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28086        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28087        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28088          VS_ENV_ARGS="/x86"
28089        else
28090          VS_ENV_ARGS="/x64"
28091        fi
28092        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28093        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28094        # TODO: improve detection for other versions of SDK
28095        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28096      else
28097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28100$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28101      fi
28102    fi
28103  fi
28104
28105    fi
28106    if test "x$PROGRAMFILES" != x; then
28107
28108  if test "x$VS_ENV_CMD" = x; then
28109    VS_VERSION="${VS_VERSION}"
28110    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
28111    METHOD="well-known name"
28112
28113  windows_path="$WIN_SDK_BASE"
28114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28115    unix_path=`$CYGPATH -u "$windows_path"`
28116    WIN_SDK_BASE="$unix_path"
28117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28119    WIN_SDK_BASE="$unix_path"
28120  fi
28121
28122    if test -d "$WIN_SDK_BASE"; then
28123      # There have been cases of partial or broken SDK installations. A missing
28124      # lib dir is not going to work.
28125      if test ! -d "$WIN_SDK_BASE/lib"; then
28126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28127$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28128        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28129$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28130      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28131        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28132$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28133        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28134        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28135          VS_ENV_ARGS="/x86"
28136        else
28137          VS_ENV_ARGS="/x64"
28138        fi
28139        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28140        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28141        # TODO: improve detection for other versions of SDK
28142        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28143      else
28144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28146        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28147$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28148      fi
28149    fi
28150  fi
28151
28152    fi
28153
28154  if test "x$VS_ENV_CMD" = x; then
28155    VS_VERSION="${VS_VERSION}"
28156    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
28157    METHOD="well-known name"
28158
28159  windows_path="$WIN_SDK_BASE"
28160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28161    unix_path=`$CYGPATH -u "$windows_path"`
28162    WIN_SDK_BASE="$unix_path"
28163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28165    WIN_SDK_BASE="$unix_path"
28166  fi
28167
28168    if test -d "$WIN_SDK_BASE"; then
28169      # There have been cases of partial or broken SDK installations. A missing
28170      # lib dir is not going to work.
28171      if test ! -d "$WIN_SDK_BASE/lib"; then
28172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28175$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28176      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28179        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28180        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28181          VS_ENV_ARGS="/x86"
28182        else
28183          VS_ENV_ARGS="/x64"
28184        fi
28185        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28186        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28187        # TODO: improve detection for other versions of SDK
28188        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28189      else
28190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28191$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28192        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28193$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28194      fi
28195    fi
28196  fi
28197
28198
28199  if test "x$VS_ENV_CMD" = x; then
28200    VS_VERSION="${VS_VERSION}"
28201    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
28202    METHOD="well-known name"
28203
28204  windows_path="$WIN_SDK_BASE"
28205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206    unix_path=`$CYGPATH -u "$windows_path"`
28207    WIN_SDK_BASE="$unix_path"
28208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28210    WIN_SDK_BASE="$unix_path"
28211  fi
28212
28213    if test -d "$WIN_SDK_BASE"; then
28214      # There have been cases of partial or broken SDK installations. A missing
28215      # lib dir is not going to work.
28216      if test ! -d "$WIN_SDK_BASE/lib"; then
28217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28219        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28220$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28221      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28224        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28225        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28226          VS_ENV_ARGS="/x86"
28227        else
28228          VS_ENV_ARGS="/x64"
28229        fi
28230        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28231        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28232        # TODO: improve detection for other versions of SDK
28233        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28234      else
28235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28237        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28238$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28239      fi
28240    fi
28241  fi
28242
28243  fi
28244
28245    if test "x$VS_ENV_CMD" != x; then
28246      TOOLCHAIN_VERSION=$VS_VERSION
28247      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
28248      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
28249      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
28250      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
28251      # The rest of the variables are already evaled while probing
28252      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
28253$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
28254      break
28255    fi
28256  done
28257
28258
28259  # If we have a devkit, skip all of the below.
28260  if test "x$DEVKIT_VS_VERSION" = x; then
28261    if test "x$VS_ENV_CMD" != x; then
28262      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
28263
28264  # Only process if variable expands to non-empty
28265
28266  if test "x$VS_ENV_CMD" != x; then
28267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28268
28269  # First separate the path from the arguments. This will split at the first
28270  # space.
28271  complete="$VS_ENV_CMD"
28272  path="${complete%% *}"
28273  tmp="$complete EOL"
28274  arguments="${tmp#* }"
28275
28276  # Input might be given as Windows format, start by converting to
28277  # unix format.
28278  new_path=`$CYGPATH -u "$path"`
28279
28280  # Now try to locate executable using which
28281  new_path=`$WHICH "$new_path" 2> /dev/null`
28282  # bat and cmd files are not always considered executable in cygwin causing which
28283  # to not find them
28284  if test "x$new_path" = x \
28285      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28286      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28287    new_path=`$CYGPATH -u "$path"`
28288  fi
28289  if test "x$new_path" = x; then
28290    # Oops. Which didn't find the executable.
28291    # The splitting of arguments from the executable at a space might have been incorrect,
28292    # since paths with space are more likely in Windows. Give it another try with the whole
28293    # argument.
28294    path="$complete"
28295    arguments="EOL"
28296    new_path=`$CYGPATH -u "$path"`
28297    new_path=`$WHICH "$new_path" 2> /dev/null`
28298    # bat and cmd files are not always considered executable in cygwin causing which
28299    # to not find them
28300    if test "x$new_path" = x \
28301        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28302        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28303      new_path=`$CYGPATH -u "$path"`
28304    fi
28305    if test "x$new_path" = x; then
28306      # It's still not found. Now this is an unrecoverable error.
28307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28308$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28309      has_space=`$ECHO "$complete" | $GREP " "`
28310      if test "x$has_space" != x; then
28311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28313      fi
28314      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28315    fi
28316  fi
28317
28318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28321  # "foo.exe" is OK but "foo" is an error.
28322  #
28323  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28324  # It is also a way to make sure we got the proper file name for the real test later on.
28325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28326  if test "x$test_shortpath" = x; then
28327    # Short path failed, file does not exist as specified.
28328    # Try adding .exe or .cmd
28329    if test -f "${new_path}.exe"; then
28330      input_to_shortpath="${new_path}.exe"
28331    elif test -f "${new_path}.cmd"; then
28332      input_to_shortpath="${new_path}.cmd"
28333    else
28334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
28335$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
28336      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28337$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28338      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28339    fi
28340  else
28341    input_to_shortpath="$new_path"
28342  fi
28343
28344  # Call helper function which possibly converts this using DOS-style short mode.
28345  # If so, the updated path is stored in $new_path.
28346  new_path="$input_to_shortpath"
28347
28348  input_path="$input_to_shortpath"
28349  # Check if we need to convert this using DOS-style short mode. If the path
28350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28351  # take no chances and rewrite it.
28352  # Note: m4 eats our [], so we need to use [ and ] instead.
28353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28354  if test "x$has_forbidden_chars" != x; then
28355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28359      # Going to short mode and back again did indeed matter. Since short mode is
28360      # case insensitive, let's make it lowercase to improve readability.
28361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28362      # Now convert it back to Unix-style (cygpath)
28363      input_path=`$CYGPATH -u "$shortmode_path"`
28364      new_path="$input_path"
28365    fi
28366  fi
28367
28368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28369  if test "x$test_cygdrive_prefix" = x; then
28370    # As a simple fix, exclude /usr/bin since it's not a real path.
28371    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28373      # a path prefixed by /cygdrive for fixpath to work.
28374      new_path="$CYGWIN_ROOT_PATH$input_path"
28375    fi
28376  fi
28377
28378  # remove trailing .exe if any
28379  new_path="${new_path/%.exe/}"
28380
28381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382
28383  # First separate the path from the arguments. This will split at the first
28384  # space.
28385  complete="$VS_ENV_CMD"
28386  path="${complete%% *}"
28387  tmp="$complete EOL"
28388  arguments="${tmp#* }"
28389
28390  # Input might be given as Windows format, start by converting to
28391  # unix format.
28392  new_path="$path"
28393
28394  windows_path="$new_path"
28395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396    unix_path=`$CYGPATH -u "$windows_path"`
28397    new_path="$unix_path"
28398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28400    new_path="$unix_path"
28401  fi
28402
28403
28404  # Now try to locate executable using which
28405  new_path=`$WHICH "$new_path" 2> /dev/null`
28406
28407  if test "x$new_path" = x; then
28408    # Oops. Which didn't find the executable.
28409    # The splitting of arguments from the executable at a space might have been incorrect,
28410    # since paths with space are more likely in Windows. Give it another try with the whole
28411    # argument.
28412    path="$complete"
28413    arguments="EOL"
28414    new_path="$path"
28415
28416  windows_path="$new_path"
28417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28418    unix_path=`$CYGPATH -u "$windows_path"`
28419    new_path="$unix_path"
28420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28422    new_path="$unix_path"
28423  fi
28424
28425
28426    new_path=`$WHICH "$new_path" 2> /dev/null`
28427    # bat and cmd files are not always considered executable in MSYS causing which
28428    # to not find them
28429    if test "x$new_path" = x \
28430        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28431        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28432      new_path="$path"
28433
28434  windows_path="$new_path"
28435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28436    unix_path=`$CYGPATH -u "$windows_path"`
28437    new_path="$unix_path"
28438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28440    new_path="$unix_path"
28441  fi
28442
28443    fi
28444
28445    if test "x$new_path" = x; then
28446      # It's still not found. Now this is an unrecoverable error.
28447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28448$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28449      has_space=`$ECHO "$complete" | $GREP " "`
28450      if test "x$has_space" != x; then
28451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28453      fi
28454      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28455    fi
28456  fi
28457
28458  # Now new_path has a complete unix path to the binary
28459  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28460    # Keep paths in /bin as-is, but remove trailing .exe if any
28461    new_path="${new_path/%.exe/}"
28462    # Do not save /bin paths to all_fixpath_prefixes!
28463  else
28464    # Not in mixed or Windows style, start by that.
28465    new_path=`cmd //c echo $new_path`
28466
28467  input_path="$new_path"
28468  # Check if we need to convert this using DOS-style short mode. If the path
28469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28470  # take no chances and rewrite it.
28471  # Note: m4 eats our [], so we need to use [ and ] instead.
28472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28473  if test "x$has_forbidden_chars" != x; then
28474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28476  fi
28477
28478    # Output is in $new_path
28479
28480  windows_path="$new_path"
28481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28482    unix_path=`$CYGPATH -u "$windows_path"`
28483    new_path="$unix_path"
28484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28486    new_path="$unix_path"
28487  fi
28488
28489    # remove trailing .exe if any
28490    new_path="${new_path/%.exe/}"
28491
28492    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28493    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28494  fi
28495
28496    else
28497      # We're on a unix platform. Hooray! :)
28498      # First separate the path from the arguments. This will split at the first
28499      # space.
28500      complete="$VS_ENV_CMD"
28501      path="${complete%% *}"
28502      tmp="$complete EOL"
28503      arguments="${tmp#* }"
28504
28505      # Cannot rely on the command "which" here since it doesn't always work.
28506      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28507      if test -z "$is_absolute_path"; then
28508        # Path to executable is not absolute. Find it.
28509        IFS_save="$IFS"
28510        IFS=:
28511        for p in $PATH; do
28512          if test -f "$p/$path" && test -x "$p/$path"; then
28513            new_path="$p/$path"
28514            break
28515          fi
28516        done
28517        IFS="$IFS_save"
28518      else
28519        # This is an absolute path, we can use it without further modifications.
28520        new_path="$path"
28521      fi
28522
28523      if test "x$new_path" = x; then
28524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28525$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28526        has_space=`$ECHO "$complete" | $GREP " "`
28527        if test "x$has_space" != x; then
28528          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28529$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28530        fi
28531        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28532      fi
28533    fi
28534
28535    # Now join together the path and the arguments once again
28536    if test "x$arguments" != xEOL; then
28537      new_complete="$new_path ${arguments% *}"
28538    else
28539      new_complete="$new_path"
28540    fi
28541
28542    if test "x$complete" != "x$new_complete"; then
28543      VS_ENV_CMD="$new_complete"
28544      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28545$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28546    fi
28547  fi
28548
28549
28550      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28551      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28552$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28553
28554      # We need to create a couple of temporary files.
28555      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28556      $MKDIR -p $VS_ENV_TMP_DIR
28557
28558      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28559      # Instead create a shell script which will set the relevant variables when run.
28560      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28561
28562  unix_path="$WINPATH_VS_ENV_CMD"
28563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28564    windows_path=`$CYGPATH -m "$unix_path"`
28565    WINPATH_VS_ENV_CMD="$windows_path"
28566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567    windows_path=`cmd //c echo $unix_path`
28568    WINPATH_VS_ENV_CMD="$windows_path"
28569  fi
28570
28571      WINPATH_BASH="$BASH"
28572
28573  unix_path="$WINPATH_BASH"
28574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28575    windows_path=`$CYGPATH -m "$unix_path"`
28576    WINPATH_BASH="$windows_path"
28577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28578    windows_path=`cmd //c echo $unix_path`
28579    WINPATH_BASH="$windows_path"
28580  fi
28581
28582
28583      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28584      # script (executable by bash) that will setup the important variables.
28585      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28586      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28587      # This will end up something like:
28588      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28589      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28590      # These will end up something like:
28591      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28592      # The trailing space for everyone except PATH is no typo, but is needed due
28593      # to trailing \ in the Windows paths. These will be stripped later.
28594      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28595          >> $EXTRACT_VC_ENV_BAT_FILE
28596      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28597          >> $EXTRACT_VC_ENV_BAT_FILE
28598      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28599          >> $EXTRACT_VC_ENV_BAT_FILE
28600      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28601          >> $EXTRACT_VC_ENV_BAT_FILE
28602      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28603          >> $EXTRACT_VC_ENV_BAT_FILE
28604      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28605          >> $EXTRACT_VC_ENV_BAT_FILE
28606
28607      # Now execute the newly created bat file.
28608      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28609      # Change directory so we don't need to mess with Windows paths in redirects.
28610      cd $VS_ENV_TMP_DIR
28611      cmd /c extract-vs-env.bat | $CAT
28612      cd $CURDIR
28613
28614      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28615        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28616$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28617        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28618$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28619        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28620$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28621        as_fn_error $? "Cannot continue" "$LINENO" 5
28622      fi
28623
28624      # Now set all paths and other env variables. This will allow the rest of
28625      # the configure script to find and run the compiler in the proper way.
28626      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28627$as_echo "$as_me: Setting extracted environment variables" >&6;}
28628      . $VS_ENV_TMP_DIR/set-vs-env.sh
28629      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28630      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28631    else
28632      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28633      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28634$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28635    fi
28636  fi
28637
28638  # At this point, we should have correct variables in the environment, or we can't continue.
28639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28640$as_echo_n "checking for Visual Studio variables... " >&6; }
28641
28642  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28643      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28644    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28646$as_echo "present but broken" >&6; }
28647      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28648    else
28649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28650$as_echo "ok" >&6; }
28651      # Remove any trailing "\" ";" and " " from the variables.
28652      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28653      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28654      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28655      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28656      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28657      # Remove any paths containing # (typically F#) as that messes up make. This
28658      # is needed if visual studio was installed with F# support.
28659      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28660
28661
28662
28663
28664
28665      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28666      OLDIFS="$IFS"
28667      IFS=";"
28668      for i in $VS_INCLUDE; do
28669        ipath=$i
28670        # Only process non-empty elements
28671        if test "x$ipath" != x; then
28672          IFS="$OLDIFS"
28673          # Check that directory exists before calling fixup_path
28674          testpath=$ipath
28675
28676  windows_path="$testpath"
28677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28678    unix_path=`$CYGPATH -u "$windows_path"`
28679    testpath="$unix_path"
28680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28682    testpath="$unix_path"
28683  fi
28684
28685          if test -d "$testpath"; then
28686
28687  # Only process if variable expands to non-empty
28688
28689  if test "x$ipath" != x; then
28690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28691
28692  # Input might be given as Windows format, start by converting to
28693  # unix format.
28694  path="$ipath"
28695  new_path=`$CYGPATH -u "$path"`
28696
28697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28700  # "foo.exe" is OK but "foo" is an error.
28701  #
28702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28703  # It is also a way to make sure we got the proper file name for the real test later on.
28704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28705  if test "x$test_shortpath" = x; then
28706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28708    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28709  fi
28710
28711  # Call helper function which possibly converts this using DOS-style short mode.
28712  # If so, the updated path is stored in $new_path.
28713
28714  input_path="$new_path"
28715  # Check if we need to convert this using DOS-style short mode. If the path
28716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28717  # take no chances and rewrite it.
28718  # Note: m4 eats our [], so we need to use [ and ] instead.
28719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28720  if test "x$has_forbidden_chars" != x; then
28721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28725      # Going to short mode and back again did indeed matter. Since short mode is
28726      # case insensitive, let's make it lowercase to improve readability.
28727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28728      # Now convert it back to Unix-style (cygpath)
28729      input_path=`$CYGPATH -u "$shortmode_path"`
28730      new_path="$input_path"
28731    fi
28732  fi
28733
28734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28735  if test "x$test_cygdrive_prefix" = x; then
28736    # As a simple fix, exclude /usr/bin since it's not a real path.
28737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28739      # a path prefixed by /cygdrive for fixpath to work.
28740      new_path="$CYGWIN_ROOT_PATH$input_path"
28741    fi
28742  fi
28743
28744
28745  if test "x$path" != "x$new_path"; then
28746    ipath="$new_path"
28747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28748$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28749  fi
28750
28751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28752
28753  path="$ipath"
28754  has_colon=`$ECHO $path | $GREP ^.:`
28755  new_path="$path"
28756  if test "x$has_colon" = x; then
28757    # Not in mixed or Windows style, start by that.
28758    new_path=`cmd //c echo $path`
28759  fi
28760
28761
28762  input_path="$new_path"
28763  # Check if we need to convert this using DOS-style short mode. If the path
28764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28765  # take no chances and rewrite it.
28766  # Note: m4 eats our [], so we need to use [ and ] instead.
28767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28768  if test "x$has_forbidden_chars" != x; then
28769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28771  fi
28772
28773
28774  windows_path="$new_path"
28775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776    unix_path=`$CYGPATH -u "$windows_path"`
28777    new_path="$unix_path"
28778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28780    new_path="$unix_path"
28781  fi
28782
28783  if test "x$path" != "x$new_path"; then
28784    ipath="$new_path"
28785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28786$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28787  fi
28788
28789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28791
28792    else
28793      # We're on a unix platform. Hooray! :)
28794      path="$ipath"
28795      has_space=`$ECHO "$path" | $GREP " "`
28796      if test "x$has_space" != x; then
28797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28798$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28800      fi
28801
28802      # Use eval to expand a potential ~
28803      eval path="$path"
28804      if test ! -f "$path" && test ! -d "$path"; then
28805        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28806      fi
28807
28808      ipath="`cd "$path"; $THEPWDCMD -L`"
28809    fi
28810  fi
28811
28812            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28813          fi
28814          IFS=";"
28815        fi
28816      done
28817      # Convert VS_LIB into SYSROOT_LDFLAGS
28818      for i in $VS_LIB; do
28819        libpath=$i
28820        # Only process non-empty elements
28821        if test "x$libpath" != x; then
28822          IFS="$OLDIFS"
28823          # Check that directory exists before calling fixup_path
28824          testpath=$libpath
28825
28826  windows_path="$testpath"
28827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28828    unix_path=`$CYGPATH -u "$windows_path"`
28829    testpath="$unix_path"
28830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28832    testpath="$unix_path"
28833  fi
28834
28835          if test -d "$testpath"; then
28836
28837  # Only process if variable expands to non-empty
28838
28839  if test "x$libpath" != x; then
28840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28841
28842  # Input might be given as Windows format, start by converting to
28843  # unix format.
28844  path="$libpath"
28845  new_path=`$CYGPATH -u "$path"`
28846
28847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28850  # "foo.exe" is OK but "foo" is an error.
28851  #
28852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28853  # It is also a way to make sure we got the proper file name for the real test later on.
28854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28855  if test "x$test_shortpath" = x; then
28856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28857$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28858    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28859  fi
28860
28861  # Call helper function which possibly converts this using DOS-style short mode.
28862  # If so, the updated path is stored in $new_path.
28863
28864  input_path="$new_path"
28865  # Check if we need to convert this using DOS-style short mode. If the path
28866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28867  # take no chances and rewrite it.
28868  # Note: m4 eats our [], so we need to use [ and ] instead.
28869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28870  if test "x$has_forbidden_chars" != x; then
28871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28875      # Going to short mode and back again did indeed matter. Since short mode is
28876      # case insensitive, let's make it lowercase to improve readability.
28877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28878      # Now convert it back to Unix-style (cygpath)
28879      input_path=`$CYGPATH -u "$shortmode_path"`
28880      new_path="$input_path"
28881    fi
28882  fi
28883
28884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28885  if test "x$test_cygdrive_prefix" = x; then
28886    # As a simple fix, exclude /usr/bin since it's not a real path.
28887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28889      # a path prefixed by /cygdrive for fixpath to work.
28890      new_path="$CYGWIN_ROOT_PATH$input_path"
28891    fi
28892  fi
28893
28894
28895  if test "x$path" != "x$new_path"; then
28896    libpath="$new_path"
28897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28898$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28899  fi
28900
28901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28902
28903  path="$libpath"
28904  has_colon=`$ECHO $path | $GREP ^.:`
28905  new_path="$path"
28906  if test "x$has_colon" = x; then
28907    # Not in mixed or Windows style, start by that.
28908    new_path=`cmd //c echo $path`
28909  fi
28910
28911
28912  input_path="$new_path"
28913  # Check if we need to convert this using DOS-style short mode. If the path
28914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28915  # take no chances and rewrite it.
28916  # Note: m4 eats our [], so we need to use [ and ] instead.
28917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28918  if test "x$has_forbidden_chars" != x; then
28919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28921  fi
28922
28923
28924  windows_path="$new_path"
28925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28926    unix_path=`$CYGPATH -u "$windows_path"`
28927    new_path="$unix_path"
28928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28930    new_path="$unix_path"
28931  fi
28932
28933  if test "x$path" != "x$new_path"; then
28934    libpath="$new_path"
28935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28936$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28937  fi
28938
28939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28941
28942    else
28943      # We're on a unix platform. Hooray! :)
28944      path="$libpath"
28945      has_space=`$ECHO "$path" | $GREP " "`
28946      if test "x$has_space" != x; then
28947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28948$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28950      fi
28951
28952      # Use eval to expand a potential ~
28953      eval path="$path"
28954      if test ! -f "$path" && test ! -d "$path"; then
28955        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28956      fi
28957
28958      libpath="`cd "$path"; $THEPWDCMD -L`"
28959    fi
28960  fi
28961
28962            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28963          fi
28964          IFS=";"
28965        fi
28966      done
28967      IFS="$OLDIFS"
28968    fi
28969  else
28970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28971$as_echo "not found" >&6; }
28972
28973    if test "x$VS_ENV_CMD" = x; then
28974      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28975$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28976      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28977$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28978    else
28979      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28980$as_echo "$as_me: Running the extraction script failed." >&6;}
28981    fi
28982    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28983$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28984    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28985$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28986    as_fn_error $? "Cannot continue" "$LINENO" 5
28987  fi
28988
28989    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28990    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28991    PATH="$VS_PATH"
28992    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28993    export INCLUDE="$VS_INCLUDE"
28994    export LIB="$VS_LIB"
28995  fi
28996
28997  # For solaris we really need solaris tools, and not the GNU equivalent.
28998  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28999  # so add that to path before starting to probe.
29000  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
29001  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
29002    PATH="/usr/ccs/bin:$PATH"
29003  fi
29004
29005  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
29006  # override all other locations.
29007  if test "x$TOOLCHAIN_PATH" != x; then
29008    PATH=$TOOLCHAIN_PATH:$PATH
29009  fi
29010
29011
29012  #
29013  # Setup the compilers (CC and CXX)
29014  #
29015
29016  COMPILER_NAME=C
29017  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
29018
29019  if test "x$CC" != x; then
29020    # User has supplied compiler name already, always let that override.
29021    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29022$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29023    if test "x`basename $CC`" = "x$CC"; then
29024      # A command without a complete path is provided, search $PATH.
29025
29026      for ac_prog in $CC
29027do
29028  # Extract the first word of "$ac_prog", so it can be a program name with args.
29029set dummy $ac_prog; ac_word=$2
29030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29031$as_echo_n "checking for $ac_word... " >&6; }
29032if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29033  $as_echo_n "(cached) " >&6
29034else
29035  case $POTENTIAL_CC in
29036  [\\/]* | ?:[\\/]*)
29037  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29038  ;;
29039  *)
29040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29041for as_dir in $PATH
29042do
29043  IFS=$as_save_IFS
29044  test -z "$as_dir" && as_dir=.
29045    for ac_exec_ext in '' $ac_executable_extensions; do
29046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29047    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29049    break 2
29050  fi
29051done
29052  done
29053IFS=$as_save_IFS
29054
29055  ;;
29056esac
29057fi
29058POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29059if test -n "$POTENTIAL_CC"; then
29060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29061$as_echo "$POTENTIAL_CC" >&6; }
29062else
29063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29064$as_echo "no" >&6; }
29065fi
29066
29067
29068  test -n "$POTENTIAL_CC" && break
29069done
29070
29071      if test "x$POTENTIAL_CC" != x; then
29072        CC=$POTENTIAL_CC
29073      else
29074        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29075      fi
29076    else
29077      # Otherwise it might already be a complete path
29078      if test ! -x "$CC"; then
29079        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29080      fi
29081    fi
29082  else
29083    # No user supplied value. Locate compiler ourselves.
29084
29085    # If we are cross compiling, assume cross compilation tools follows the
29086    # cross compilation standard where they are prefixed with the autoconf
29087    # standard name for the target. For example the binary
29088    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29089    # If we are not cross compiling, then the default compiler name will be
29090    # used.
29091
29092    CC=
29093    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29094    # before checking the rest of the PATH.
29095    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29096    # step, this should not be necessary.
29097    if test -n "$TOOLCHAIN_PATH"; then
29098      PATH_save="$PATH"
29099      PATH="$TOOLCHAIN_PATH"
29100      for ac_prog in $SEARCH_LIST
29101do
29102  # Extract the first word of "$ac_prog", so it can be a program name with args.
29103set dummy $ac_prog; ac_word=$2
29104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29105$as_echo_n "checking for $ac_word... " >&6; }
29106if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
29107  $as_echo_n "(cached) " >&6
29108else
29109  case $TOOLCHAIN_PATH_CC in
29110  [\\/]* | ?:[\\/]*)
29111  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
29112  ;;
29113  *)
29114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29115for as_dir in $PATH
29116do
29117  IFS=$as_save_IFS
29118  test -z "$as_dir" && as_dir=.
29119    for ac_exec_ext in '' $ac_executable_extensions; do
29120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29121    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
29122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29123    break 2
29124  fi
29125done
29126  done
29127IFS=$as_save_IFS
29128
29129  ;;
29130esac
29131fi
29132TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
29133if test -n "$TOOLCHAIN_PATH_CC"; then
29134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
29135$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
29136else
29137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29138$as_echo "no" >&6; }
29139fi
29140
29141
29142  test -n "$TOOLCHAIN_PATH_CC" && break
29143done
29144
29145      CC=$TOOLCHAIN_PATH_CC
29146      PATH="$PATH_save"
29147    fi
29148
29149    # AC_PATH_PROGS can't be run multiple times with the same variable,
29150    # so create a new name for this run.
29151    if test "x$CC" = x; then
29152      for ac_prog in $SEARCH_LIST
29153do
29154  # Extract the first word of "$ac_prog", so it can be a program name with args.
29155set dummy $ac_prog; ac_word=$2
29156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29157$as_echo_n "checking for $ac_word... " >&6; }
29158if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29159  $as_echo_n "(cached) " >&6
29160else
29161  case $POTENTIAL_CC in
29162  [\\/]* | ?:[\\/]*)
29163  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29164  ;;
29165  *)
29166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29167for as_dir in $PATH
29168do
29169  IFS=$as_save_IFS
29170  test -z "$as_dir" && as_dir=.
29171    for ac_exec_ext in '' $ac_executable_extensions; do
29172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29173    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29175    break 2
29176  fi
29177done
29178  done
29179IFS=$as_save_IFS
29180
29181  ;;
29182esac
29183fi
29184POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29185if test -n "$POTENTIAL_CC"; then
29186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29187$as_echo "$POTENTIAL_CC" >&6; }
29188else
29189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29190$as_echo "no" >&6; }
29191fi
29192
29193
29194  test -n "$POTENTIAL_CC" && break
29195done
29196
29197      CC=$POTENTIAL_CC
29198    fi
29199
29200    if test "x$CC" = x; then
29201
29202  # Print a helpful message on how to acquire the necessary build dependency.
29203  # devkit is the help tag: freetype, cups, alsa etc
29204  MISSING_DEPENDENCY=devkit
29205
29206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29207    cygwin_help $MISSING_DEPENDENCY
29208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29209    msys_help $MISSING_DEPENDENCY
29210  else
29211    PKGHANDLER_COMMAND=
29212
29213    case $PKGHANDLER in
29214      apt-get)
29215        apt_help     $MISSING_DEPENDENCY ;;
29216      yum)
29217        yum_help     $MISSING_DEPENDENCY ;;
29218      port)
29219        port_help    $MISSING_DEPENDENCY ;;
29220      pkgutil)
29221        pkgutil_help $MISSING_DEPENDENCY ;;
29222      pkgadd)
29223        pkgadd_help  $MISSING_DEPENDENCY ;;
29224    esac
29225
29226    if test "x$PKGHANDLER_COMMAND" != x; then
29227      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29228    fi
29229  fi
29230
29231      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29232    fi
29233  fi
29234
29235  # Now we have a compiler binary in CC. Make sure it's okay.
29236
29237  # Only process if variable expands to non-empty
29238
29239  if test "x$CC" != x; then
29240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29241
29242  # First separate the path from the arguments. This will split at the first
29243  # space.
29244  complete="$CC"
29245  path="${complete%% *}"
29246  tmp="$complete EOL"
29247  arguments="${tmp#* }"
29248
29249  # Input might be given as Windows format, start by converting to
29250  # unix format.
29251  new_path=`$CYGPATH -u "$path"`
29252
29253  # Now try to locate executable using which
29254  new_path=`$WHICH "$new_path" 2> /dev/null`
29255  # bat and cmd files are not always considered executable in cygwin causing which
29256  # to not find them
29257  if test "x$new_path" = x \
29258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29260    new_path=`$CYGPATH -u "$path"`
29261  fi
29262  if test "x$new_path" = x; then
29263    # Oops. Which didn't find the executable.
29264    # The splitting of arguments from the executable at a space might have been incorrect,
29265    # since paths with space are more likely in Windows. Give it another try with the whole
29266    # argument.
29267    path="$complete"
29268    arguments="EOL"
29269    new_path=`$CYGPATH -u "$path"`
29270    new_path=`$WHICH "$new_path" 2> /dev/null`
29271    # bat and cmd files are not always considered executable in cygwin causing which
29272    # to not find them
29273    if test "x$new_path" = x \
29274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29276      new_path=`$CYGPATH -u "$path"`
29277    fi
29278    if test "x$new_path" = x; then
29279      # It's still not found. Now this is an unrecoverable error.
29280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29281$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29282      has_space=`$ECHO "$complete" | $GREP " "`
29283      if test "x$has_space" != x; then
29284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29286      fi
29287      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29288    fi
29289  fi
29290
29291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29294  # "foo.exe" is OK but "foo" is an error.
29295  #
29296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29297  # It is also a way to make sure we got the proper file name for the real test later on.
29298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29299  if test "x$test_shortpath" = x; then
29300    # Short path failed, file does not exist as specified.
29301    # Try adding .exe or .cmd
29302    if test -f "${new_path}.exe"; then
29303      input_to_shortpath="${new_path}.exe"
29304    elif test -f "${new_path}.cmd"; then
29305      input_to_shortpath="${new_path}.cmd"
29306    else
29307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29308$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29311      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29312    fi
29313  else
29314    input_to_shortpath="$new_path"
29315  fi
29316
29317  # Call helper function which possibly converts this using DOS-style short mode.
29318  # If so, the updated path is stored in $new_path.
29319  new_path="$input_to_shortpath"
29320
29321  input_path="$input_to_shortpath"
29322  # Check if we need to convert this using DOS-style short mode. If the path
29323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29324  # take no chances and rewrite it.
29325  # Note: m4 eats our [], so we need to use [ and ] instead.
29326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29327  if test "x$has_forbidden_chars" != x; then
29328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29332      # Going to short mode and back again did indeed matter. Since short mode is
29333      # case insensitive, let's make it lowercase to improve readability.
29334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29335      # Now convert it back to Unix-style (cygpath)
29336      input_path=`$CYGPATH -u "$shortmode_path"`
29337      new_path="$input_path"
29338    fi
29339  fi
29340
29341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29342  if test "x$test_cygdrive_prefix" = x; then
29343    # As a simple fix, exclude /usr/bin since it's not a real path.
29344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29346      # a path prefixed by /cygdrive for fixpath to work.
29347      new_path="$CYGWIN_ROOT_PATH$input_path"
29348    fi
29349  fi
29350
29351  # remove trailing .exe if any
29352  new_path="${new_path/%.exe/}"
29353
29354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29355
29356  # First separate the path from the arguments. This will split at the first
29357  # space.
29358  complete="$CC"
29359  path="${complete%% *}"
29360  tmp="$complete EOL"
29361  arguments="${tmp#* }"
29362
29363  # Input might be given as Windows format, start by converting to
29364  # unix format.
29365  new_path="$path"
29366
29367  windows_path="$new_path"
29368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29369    unix_path=`$CYGPATH -u "$windows_path"`
29370    new_path="$unix_path"
29371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29373    new_path="$unix_path"
29374  fi
29375
29376
29377  # Now try to locate executable using which
29378  new_path=`$WHICH "$new_path" 2> /dev/null`
29379
29380  if test "x$new_path" = x; then
29381    # Oops. Which didn't find the executable.
29382    # The splitting of arguments from the executable at a space might have been incorrect,
29383    # since paths with space are more likely in Windows. Give it another try with the whole
29384    # argument.
29385    path="$complete"
29386    arguments="EOL"
29387    new_path="$path"
29388
29389  windows_path="$new_path"
29390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29391    unix_path=`$CYGPATH -u "$windows_path"`
29392    new_path="$unix_path"
29393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29395    new_path="$unix_path"
29396  fi
29397
29398
29399    new_path=`$WHICH "$new_path" 2> /dev/null`
29400    # bat and cmd files are not always considered executable in MSYS causing which
29401    # to not find them
29402    if test "x$new_path" = x \
29403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29405      new_path="$path"
29406
29407  windows_path="$new_path"
29408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29409    unix_path=`$CYGPATH -u "$windows_path"`
29410    new_path="$unix_path"
29411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29413    new_path="$unix_path"
29414  fi
29415
29416    fi
29417
29418    if test "x$new_path" = x; then
29419      # It's still not found. Now this is an unrecoverable error.
29420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29421$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29422      has_space=`$ECHO "$complete" | $GREP " "`
29423      if test "x$has_space" != x; then
29424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29426      fi
29427      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29428    fi
29429  fi
29430
29431  # Now new_path has a complete unix path to the binary
29432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29433    # Keep paths in /bin as-is, but remove trailing .exe if any
29434    new_path="${new_path/%.exe/}"
29435    # Do not save /bin paths to all_fixpath_prefixes!
29436  else
29437    # Not in mixed or Windows style, start by that.
29438    new_path=`cmd //c echo $new_path`
29439
29440  input_path="$new_path"
29441  # Check if we need to convert this using DOS-style short mode. If the path
29442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29443  # take no chances and rewrite it.
29444  # Note: m4 eats our [], so we need to use [ and ] instead.
29445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29446  if test "x$has_forbidden_chars" != x; then
29447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29449  fi
29450
29451    # Output is in $new_path
29452
29453  windows_path="$new_path"
29454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29455    unix_path=`$CYGPATH -u "$windows_path"`
29456    new_path="$unix_path"
29457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29459    new_path="$unix_path"
29460  fi
29461
29462    # remove trailing .exe if any
29463    new_path="${new_path/%.exe/}"
29464
29465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29467  fi
29468
29469    else
29470      # We're on a unix platform. Hooray! :)
29471      # First separate the path from the arguments. This will split at the first
29472      # space.
29473      complete="$CC"
29474      path="${complete%% *}"
29475      tmp="$complete EOL"
29476      arguments="${tmp#* }"
29477
29478      # Cannot rely on the command "which" here since it doesn't always work.
29479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29480      if test -z "$is_absolute_path"; then
29481        # Path to executable is not absolute. Find it.
29482        IFS_save="$IFS"
29483        IFS=:
29484        for p in $PATH; do
29485          if test -f "$p/$path" && test -x "$p/$path"; then
29486            new_path="$p/$path"
29487            break
29488          fi
29489        done
29490        IFS="$IFS_save"
29491      else
29492        # This is an absolute path, we can use it without further modifications.
29493        new_path="$path"
29494      fi
29495
29496      if test "x$new_path" = x; then
29497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29498$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29499        has_space=`$ECHO "$complete" | $GREP " "`
29500        if test "x$has_space" != x; then
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29503        fi
29504        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29505      fi
29506    fi
29507
29508    # Now join together the path and the arguments once again
29509    if test "x$arguments" != xEOL; then
29510      new_complete="$new_path ${arguments% *}"
29511    else
29512      new_complete="$new_path"
29513    fi
29514
29515    if test "x$complete" != "x$new_complete"; then
29516      CC="$new_complete"
29517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29518$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29519    fi
29520  fi
29521
29522  TEST_COMPILER="$CC"
29523  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29524  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29525  if test "x$OPENJDK_BUILD_OS" != xaix; then
29526    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29528$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29529
29530  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29531    # Follow a chain of symbolic links. Use readlink
29532    # where it exists, else fall back to horribly
29533    # complicated shell code.
29534    if test "x$READLINK_TESTED" != yes; then
29535      # On MacOSX there is a readlink tool with a different
29536      # purpose than the GNU readlink tool. Check the found readlink.
29537      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29538      if test "x$ISGNU" = x; then
29539        # A readlink that we do not know how to use.
29540        # Are there other non-GNU readlinks out there?
29541        READLINK_TESTED=yes
29542        READLINK=
29543      fi
29544    fi
29545
29546    if test "x$READLINK" != x; then
29547      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29548    else
29549      # Save the current directory for restoring afterwards
29550      STARTDIR=$PWD
29551      COUNTER=0
29552      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29553      sym_link_file=`$BASENAME $TEST_COMPILER`
29554      cd $sym_link_dir
29555      # Use -P flag to resolve symlinks in directories.
29556      cd `$THEPWDCMD -P`
29557      sym_link_dir=`$THEPWDCMD -P`
29558      # Resolve file symlinks
29559      while test $COUNTER -lt 20; do
29560        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29561        if test "x$ISLINK" == x; then
29562          # This is not a symbolic link! We are done!
29563          break
29564        fi
29565        # Again resolve directory symlinks since the target of the just found
29566        # link could be in a different directory
29567        cd `$DIRNAME $ISLINK`
29568        sym_link_dir=`$THEPWDCMD -P`
29569        sym_link_file=`$BASENAME $ISLINK`
29570        let COUNTER=COUNTER+1
29571      done
29572      cd $STARTDIR
29573      TEST_COMPILER=$sym_link_dir/$sym_link_file
29574    fi
29575  fi
29576
29577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29578$as_echo "$TEST_COMPILER" >&6; }
29579  fi
29580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29581$as_echo_n "checking if CC is disguised ccache... " >&6; }
29582
29583  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29584  if test "x$COMPILER_BASENAME" = "xccache"; then
29585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29586$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29587    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29588    # We want to control ccache invocation ourselves, so ignore this cc and try
29589    # searching again.
29590
29591    # Remove the path to the fake ccache cc from the PATH
29592    RETRY_COMPILER_SAVED_PATH="$PATH"
29593    COMPILER_DIRNAME=`$DIRNAME $CC`
29594    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29595
29596    # Try again looking for our compiler
29597    if test -n "$ac_tool_prefix"; then
29598  for ac_prog in $TOOLCHAIN_CC_BINARY
29599  do
29600    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29601set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29603$as_echo_n "checking for $ac_word... " >&6; }
29604if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29605  $as_echo_n "(cached) " >&6
29606else
29607  if test -n "$PROPER_COMPILER_CC"; then
29608  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29609else
29610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29611for as_dir in $PATH
29612do
29613  IFS=$as_save_IFS
29614  test -z "$as_dir" && as_dir=.
29615    for ac_exec_ext in '' $ac_executable_extensions; do
29616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29617    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29619    break 2
29620  fi
29621done
29622  done
29623IFS=$as_save_IFS
29624
29625fi
29626fi
29627PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29628if test -n "$PROPER_COMPILER_CC"; then
29629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29630$as_echo "$PROPER_COMPILER_CC" >&6; }
29631else
29632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29633$as_echo "no" >&6; }
29634fi
29635
29636
29637    test -n "$PROPER_COMPILER_CC" && break
29638  done
29639fi
29640if test -z "$PROPER_COMPILER_CC"; then
29641  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29642  for ac_prog in $TOOLCHAIN_CC_BINARY
29643do
29644  # Extract the first word of "$ac_prog", so it can be a program name with args.
29645set dummy $ac_prog; ac_word=$2
29646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29647$as_echo_n "checking for $ac_word... " >&6; }
29648if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29649  $as_echo_n "(cached) " >&6
29650else
29651  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29652  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29653else
29654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29655for as_dir in $PATH
29656do
29657  IFS=$as_save_IFS
29658  test -z "$as_dir" && as_dir=.
29659    for ac_exec_ext in '' $ac_executable_extensions; do
29660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29661    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29663    break 2
29664  fi
29665done
29666  done
29667IFS=$as_save_IFS
29668
29669fi
29670fi
29671ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29672if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29674$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29675else
29676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29677$as_echo "no" >&6; }
29678fi
29679
29680
29681  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29682done
29683
29684  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29685    PROPER_COMPILER_CC=""
29686  else
29687    case $cross_compiling:$ac_tool_warned in
29688yes:)
29689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29691ac_tool_warned=yes ;;
29692esac
29693    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29694  fi
29695fi
29696
29697
29698  # Only process if variable expands to non-empty
29699
29700  if test "x$PROPER_COMPILER_CC" != x; then
29701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29702
29703  # First separate the path from the arguments. This will split at the first
29704  # space.
29705  complete="$PROPER_COMPILER_CC"
29706  path="${complete%% *}"
29707  tmp="$complete EOL"
29708  arguments="${tmp#* }"
29709
29710  # Input might be given as Windows format, start by converting to
29711  # unix format.
29712  new_path=`$CYGPATH -u "$path"`
29713
29714  # Now try to locate executable using which
29715  new_path=`$WHICH "$new_path" 2> /dev/null`
29716  # bat and cmd files are not always considered executable in cygwin causing which
29717  # to not find them
29718  if test "x$new_path" = x \
29719      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29720      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29721    new_path=`$CYGPATH -u "$path"`
29722  fi
29723  if test "x$new_path" = x; then
29724    # Oops. Which didn't find the executable.
29725    # The splitting of arguments from the executable at a space might have been incorrect,
29726    # since paths with space are more likely in Windows. Give it another try with the whole
29727    # argument.
29728    path="$complete"
29729    arguments="EOL"
29730    new_path=`$CYGPATH -u "$path"`
29731    new_path=`$WHICH "$new_path" 2> /dev/null`
29732    # bat and cmd files are not always considered executable in cygwin causing which
29733    # to not find them
29734    if test "x$new_path" = x \
29735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29737      new_path=`$CYGPATH -u "$path"`
29738    fi
29739    if test "x$new_path" = x; then
29740      # It's still not found. Now this is an unrecoverable error.
29741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29742$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29743      has_space=`$ECHO "$complete" | $GREP " "`
29744      if test "x$has_space" != x; then
29745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29747      fi
29748      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29749    fi
29750  fi
29751
29752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29755  # "foo.exe" is OK but "foo" is an error.
29756  #
29757  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29758  # It is also a way to make sure we got the proper file name for the real test later on.
29759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29760  if test "x$test_shortpath" = x; then
29761    # Short path failed, file does not exist as specified.
29762    # Try adding .exe or .cmd
29763    if test -f "${new_path}.exe"; then
29764      input_to_shortpath="${new_path}.exe"
29765    elif test -f "${new_path}.cmd"; then
29766      input_to_shortpath="${new_path}.cmd"
29767    else
29768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29769$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29772      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29773    fi
29774  else
29775    input_to_shortpath="$new_path"
29776  fi
29777
29778  # Call helper function which possibly converts this using DOS-style short mode.
29779  # If so, the updated path is stored in $new_path.
29780  new_path="$input_to_shortpath"
29781
29782  input_path="$input_to_shortpath"
29783  # Check if we need to convert this using DOS-style short mode. If the path
29784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29785  # take no chances and rewrite it.
29786  # Note: m4 eats our [], so we need to use [ and ] instead.
29787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29788  if test "x$has_forbidden_chars" != x; then
29789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29793      # Going to short mode and back again did indeed matter. Since short mode is
29794      # case insensitive, let's make it lowercase to improve readability.
29795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29796      # Now convert it back to Unix-style (cygpath)
29797      input_path=`$CYGPATH -u "$shortmode_path"`
29798      new_path="$input_path"
29799    fi
29800  fi
29801
29802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29803  if test "x$test_cygdrive_prefix" = x; then
29804    # As a simple fix, exclude /usr/bin since it's not a real path.
29805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29807      # a path prefixed by /cygdrive for fixpath to work.
29808      new_path="$CYGWIN_ROOT_PATH$input_path"
29809    fi
29810  fi
29811
29812  # remove trailing .exe if any
29813  new_path="${new_path/%.exe/}"
29814
29815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29816
29817  # First separate the path from the arguments. This will split at the first
29818  # space.
29819  complete="$PROPER_COMPILER_CC"
29820  path="${complete%% *}"
29821  tmp="$complete EOL"
29822  arguments="${tmp#* }"
29823
29824  # Input might be given as Windows format, start by converting to
29825  # unix format.
29826  new_path="$path"
29827
29828  windows_path="$new_path"
29829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29830    unix_path=`$CYGPATH -u "$windows_path"`
29831    new_path="$unix_path"
29832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29834    new_path="$unix_path"
29835  fi
29836
29837
29838  # Now try to locate executable using which
29839  new_path=`$WHICH "$new_path" 2> /dev/null`
29840
29841  if test "x$new_path" = x; then
29842    # Oops. Which didn't find the executable.
29843    # The splitting of arguments from the executable at a space might have been incorrect,
29844    # since paths with space are more likely in Windows. Give it another try with the whole
29845    # argument.
29846    path="$complete"
29847    arguments="EOL"
29848    new_path="$path"
29849
29850  windows_path="$new_path"
29851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29852    unix_path=`$CYGPATH -u "$windows_path"`
29853    new_path="$unix_path"
29854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29856    new_path="$unix_path"
29857  fi
29858
29859
29860    new_path=`$WHICH "$new_path" 2> /dev/null`
29861    # bat and cmd files are not always considered executable in MSYS causing which
29862    # to not find them
29863    if test "x$new_path" = x \
29864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29866      new_path="$path"
29867
29868  windows_path="$new_path"
29869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29870    unix_path=`$CYGPATH -u "$windows_path"`
29871    new_path="$unix_path"
29872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29874    new_path="$unix_path"
29875  fi
29876
29877    fi
29878
29879    if test "x$new_path" = x; then
29880      # It's still not found. Now this is an unrecoverable error.
29881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29882$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29883      has_space=`$ECHO "$complete" | $GREP " "`
29884      if test "x$has_space" != x; then
29885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29887      fi
29888      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29889    fi
29890  fi
29891
29892  # Now new_path has a complete unix path to the binary
29893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29894    # Keep paths in /bin as-is, but remove trailing .exe if any
29895    new_path="${new_path/%.exe/}"
29896    # Do not save /bin paths to all_fixpath_prefixes!
29897  else
29898    # Not in mixed or Windows style, start by that.
29899    new_path=`cmd //c echo $new_path`
29900
29901  input_path="$new_path"
29902  # Check if we need to convert this using DOS-style short mode. If the path
29903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29904  # take no chances and rewrite it.
29905  # Note: m4 eats our [], so we need to use [ and ] instead.
29906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29907  if test "x$has_forbidden_chars" != x; then
29908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29910  fi
29911
29912    # Output is in $new_path
29913
29914  windows_path="$new_path"
29915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29916    unix_path=`$CYGPATH -u "$windows_path"`
29917    new_path="$unix_path"
29918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29920    new_path="$unix_path"
29921  fi
29922
29923    # remove trailing .exe if any
29924    new_path="${new_path/%.exe/}"
29925
29926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29928  fi
29929
29930    else
29931      # We're on a unix platform. Hooray! :)
29932      # First separate the path from the arguments. This will split at the first
29933      # space.
29934      complete="$PROPER_COMPILER_CC"
29935      path="${complete%% *}"
29936      tmp="$complete EOL"
29937      arguments="${tmp#* }"
29938
29939      # Cannot rely on the command "which" here since it doesn't always work.
29940      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29941      if test -z "$is_absolute_path"; then
29942        # Path to executable is not absolute. Find it.
29943        IFS_save="$IFS"
29944        IFS=:
29945        for p in $PATH; do
29946          if test -f "$p/$path" && test -x "$p/$path"; then
29947            new_path="$p/$path"
29948            break
29949          fi
29950        done
29951        IFS="$IFS_save"
29952      else
29953        # This is an absolute path, we can use it without further modifications.
29954        new_path="$path"
29955      fi
29956
29957      if test "x$new_path" = x; then
29958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29959$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29960        has_space=`$ECHO "$complete" | $GREP " "`
29961        if test "x$has_space" != x; then
29962          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29964        fi
29965        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29966      fi
29967    fi
29968
29969    # Now join together the path and the arguments once again
29970    if test "x$arguments" != xEOL; then
29971      new_complete="$new_path ${arguments% *}"
29972    else
29973      new_complete="$new_path"
29974    fi
29975
29976    if test "x$complete" != "x$new_complete"; then
29977      PROPER_COMPILER_CC="$new_complete"
29978      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29979$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29980    fi
29981  fi
29982
29983    PATH="$RETRY_COMPILER_SAVED_PATH"
29984
29985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29986$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29987
29988  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29989    # Follow a chain of symbolic links. Use readlink
29990    # where it exists, else fall back to horribly
29991    # complicated shell code.
29992    if test "x$READLINK_TESTED" != yes; then
29993      # On MacOSX there is a readlink tool with a different
29994      # purpose than the GNU readlink tool. Check the found readlink.
29995      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29996      if test "x$ISGNU" = x; then
29997        # A readlink that we do not know how to use.
29998        # Are there other non-GNU readlinks out there?
29999        READLINK_TESTED=yes
30000        READLINK=
30001      fi
30002    fi
30003
30004    if test "x$READLINK" != x; then
30005      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30006    else
30007      # Save the current directory for restoring afterwards
30008      STARTDIR=$PWD
30009      COUNTER=0
30010      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30011      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30012      cd $sym_link_dir
30013      # Use -P flag to resolve symlinks in directories.
30014      cd `$THEPWDCMD -P`
30015      sym_link_dir=`$THEPWDCMD -P`
30016      # Resolve file symlinks
30017      while test $COUNTER -lt 20; do
30018        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30019        if test "x$ISLINK" == x; then
30020          # This is not a symbolic link! We are done!
30021          break
30022        fi
30023        # Again resolve directory symlinks since the target of the just found
30024        # link could be in a different directory
30025        cd `$DIRNAME $ISLINK`
30026        sym_link_dir=`$THEPWDCMD -P`
30027        sym_link_file=`$BASENAME $ISLINK`
30028        let COUNTER=COUNTER+1
30029      done
30030      cd $STARTDIR
30031      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30032    fi
30033  fi
30034
30035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30036$as_echo "$PROPER_COMPILER_CC" >&6; }
30037    CC="$PROPER_COMPILER_CC"
30038  else
30039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30040$as_echo "no, keeping CC" >&6; }
30041  fi
30042
30043
30044  COMPILER=$CC
30045  COMPILER_NAME=$COMPILER_NAME
30046
30047  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30048    # cc -V output typically looks like
30049    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30050    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30051    # Check that this is likely to be the Solaris Studio cc.
30052    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30053    if test $? -ne 0; then
30054      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30055      { $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
30056$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30058$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30059      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30060$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30061      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30062    fi
30063    # Remove usage instructions (if present), and
30064    # collapse compiler output into a single line
30065    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30066        $SED -e 's/ *[Uu]sage:.*//'`
30067    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30068        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30069  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30070    # xlc -qversion output typically looks like
30071    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30072    #     Version: 11.01.0000.0015
30073    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30074    # Check that this is likely to be the IBM XL C compiler.
30075    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30076    if test $? -ne 0; then
30077      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30078      { $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
30079$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30081$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30082      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30083$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30084      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30085    fi
30086    # Collapse compiler output into a single line
30087    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30088    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30089        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30090  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30091    # There is no specific version flag, but all output starts with a version string.
30092    # First line typically looks something like:
30093    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30094    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30095    # Check that this is likely to be Microsoft CL.EXE.
30096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30097    if test $? -ne 0; then
30098      { $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
30099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30101$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30103    fi
30104    # Collapse compiler output into a single line
30105    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30107        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30108  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30109    # gcc --version output typically looks like
30110    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30111    #     Copyright (C) 2013 Free Software Foundation, Inc.
30112    #     This is free software; see the source for copying conditions.  There is NO
30113    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30114    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30115    # Check that this is likely to be GCC.
30116    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30117    if test $? -ne 0; then
30118      { $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
30119$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30120      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30121$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30122      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30123    fi
30124    # Remove Copyright and legalese from version string, and
30125    # collapse into a single line
30126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30127        $SED -e 's/ *Copyright .*//'`
30128    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30129        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30130  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30131    # clang --version output typically looks like
30132    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30133    #    clang version 3.3 (tags/RELEASE_33/final)
30134    # or
30135    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30136    #    Target: x86_64-pc-linux-gnu
30137    #    Thread model: posix
30138    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30139    # Check that this is likely to be clang
30140    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30141    if test $? -ne 0; then
30142      { $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
30143$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30144      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30145$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30146      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30147    fi
30148    # Collapse compiler output into a single line
30149    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30150    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30151        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30152  else
30153      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30154  fi
30155  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30156  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30157  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30158  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
30159
30160  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30161$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30162
30163
30164  # Now that we have resolved CC ourself, let autoconf have its go at it
30165  ac_ext=c
30166ac_cpp='$CPP $CPPFLAGS'
30167ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30168ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30169ac_compiler_gnu=$ac_cv_c_compiler_gnu
30170if test -n "$ac_tool_prefix"; then
30171  for ac_prog in $CC
30172  do
30173    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30174set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30176$as_echo_n "checking for $ac_word... " >&6; }
30177if ${ac_cv_prog_CC+:} false; then :
30178  $as_echo_n "(cached) " >&6
30179else
30180  if test -n "$CC"; then
30181  ac_cv_prog_CC="$CC" # Let the user override the test.
30182else
30183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30184for as_dir in $PATH
30185do
30186  IFS=$as_save_IFS
30187  test -z "$as_dir" && as_dir=.
30188    for ac_exec_ext in '' $ac_executable_extensions; do
30189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30190    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30192    break 2
30193  fi
30194done
30195  done
30196IFS=$as_save_IFS
30197
30198fi
30199fi
30200CC=$ac_cv_prog_CC
30201if test -n "$CC"; then
30202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30203$as_echo "$CC" >&6; }
30204else
30205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30206$as_echo "no" >&6; }
30207fi
30208
30209
30210    test -n "$CC" && break
30211  done
30212fi
30213if test -z "$CC"; then
30214  ac_ct_CC=$CC
30215  for ac_prog in $CC
30216do
30217  # Extract the first word of "$ac_prog", so it can be a program name with args.
30218set dummy $ac_prog; ac_word=$2
30219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30220$as_echo_n "checking for $ac_word... " >&6; }
30221if ${ac_cv_prog_ac_ct_CC+:} false; then :
30222  $as_echo_n "(cached) " >&6
30223else
30224  if test -n "$ac_ct_CC"; then
30225  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30226else
30227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30228for as_dir in $PATH
30229do
30230  IFS=$as_save_IFS
30231  test -z "$as_dir" && as_dir=.
30232    for ac_exec_ext in '' $ac_executable_extensions; do
30233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30234    ac_cv_prog_ac_ct_CC="$ac_prog"
30235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30236    break 2
30237  fi
30238done
30239  done
30240IFS=$as_save_IFS
30241
30242fi
30243fi
30244ac_ct_CC=$ac_cv_prog_ac_ct_CC
30245if test -n "$ac_ct_CC"; then
30246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30247$as_echo "$ac_ct_CC" >&6; }
30248else
30249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30250$as_echo "no" >&6; }
30251fi
30252
30253
30254  test -n "$ac_ct_CC" && break
30255done
30256
30257  if test "x$ac_ct_CC" = x; then
30258    CC=""
30259  else
30260    case $cross_compiling:$ac_tool_warned in
30261yes:)
30262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30264ac_tool_warned=yes ;;
30265esac
30266    CC=$ac_ct_CC
30267  fi
30268fi
30269
30270
30271test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30273as_fn_error $? "no acceptable C compiler found in \$PATH
30274See \`config.log' for more details" "$LINENO" 5; }
30275
30276# Provide some information about the compiler.
30277$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30278set X $ac_compile
30279ac_compiler=$2
30280for ac_option in --version -v -V -qversion; do
30281  { { ac_try="$ac_compiler $ac_option >&5"
30282case "(($ac_try" in
30283  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30284  *) ac_try_echo=$ac_try;;
30285esac
30286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30287$as_echo "$ac_try_echo"; } >&5
30288  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30289  ac_status=$?
30290  if test -s conftest.err; then
30291    sed '10a\
30292... rest of stderr output deleted ...
30293         10q' conftest.err >conftest.er1
30294    cat conftest.er1 >&5
30295  fi
30296  rm -f conftest.er1 conftest.err
30297  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30298  test $ac_status = 0; }
30299done
30300
30301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30302/* end confdefs.h.  */
30303
30304int
30305main ()
30306{
30307
30308  ;
30309  return 0;
30310}
30311_ACEOF
30312ac_clean_files_save=$ac_clean_files
30313ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30314# Try to create an executable without -o first, disregard a.out.
30315# It will help us diagnose broken compilers, and finding out an intuition
30316# of exeext.
30317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30318$as_echo_n "checking whether the C compiler works... " >&6; }
30319ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30320
30321# The possible output files:
30322ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30323
30324ac_rmfiles=
30325for ac_file in $ac_files
30326do
30327  case $ac_file in
30328    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30329    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30330  esac
30331done
30332rm -f $ac_rmfiles
30333
30334if { { ac_try="$ac_link_default"
30335case "(($ac_try" in
30336  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30337  *) ac_try_echo=$ac_try;;
30338esac
30339eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30340$as_echo "$ac_try_echo"; } >&5
30341  (eval "$ac_link_default") 2>&5
30342  ac_status=$?
30343  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30344  test $ac_status = 0; }; then :
30345  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30346# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30347# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30348# so that the user can short-circuit this test for compilers unknown to
30349# Autoconf.
30350for ac_file in $ac_files ''
30351do
30352  test -f "$ac_file" || continue
30353  case $ac_file in
30354    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30355	;;
30356    [ab].out )
30357	# We found the default executable, but exeext='' is most
30358	# certainly right.
30359	break;;
30360    *.* )
30361	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30362	then :; else
30363	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30364	fi
30365	# We set ac_cv_exeext here because the later test for it is not
30366	# safe: cross compilers may not add the suffix if given an `-o'
30367	# argument, so we may need to know it at that point already.
30368	# Even if this section looks crufty: it has the advantage of
30369	# actually working.
30370	break;;
30371    * )
30372	break;;
30373  esac
30374done
30375test "$ac_cv_exeext" = no && ac_cv_exeext=
30376
30377else
30378  ac_file=''
30379fi
30380if test -z "$ac_file"; then :
30381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30382$as_echo "no" >&6; }
30383$as_echo "$as_me: failed program was:" >&5
30384sed 's/^/| /' conftest.$ac_ext >&5
30385
30386{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30388as_fn_error 77 "C compiler cannot create executables
30389See \`config.log' for more details" "$LINENO" 5; }
30390else
30391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30392$as_echo "yes" >&6; }
30393fi
30394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30395$as_echo_n "checking for C compiler default output file name... " >&6; }
30396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30397$as_echo "$ac_file" >&6; }
30398ac_exeext=$ac_cv_exeext
30399
30400rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30401ac_clean_files=$ac_clean_files_save
30402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30403$as_echo_n "checking for suffix of executables... " >&6; }
30404if { { ac_try="$ac_link"
30405case "(($ac_try" in
30406  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30407  *) ac_try_echo=$ac_try;;
30408esac
30409eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30410$as_echo "$ac_try_echo"; } >&5
30411  (eval "$ac_link") 2>&5
30412  ac_status=$?
30413  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30414  test $ac_status = 0; }; then :
30415  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30416# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30417# work properly (i.e., refer to `conftest.exe'), while it won't with
30418# `rm'.
30419for ac_file in conftest.exe conftest conftest.*; do
30420  test -f "$ac_file" || continue
30421  case $ac_file in
30422    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30423    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30424	  break;;
30425    * ) break;;
30426  esac
30427done
30428else
30429  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30431as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30432See \`config.log' for more details" "$LINENO" 5; }
30433fi
30434rm -f conftest conftest$ac_cv_exeext
30435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30436$as_echo "$ac_cv_exeext" >&6; }
30437
30438rm -f conftest.$ac_ext
30439EXEEXT=$ac_cv_exeext
30440ac_exeext=$EXEEXT
30441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30442/* end confdefs.h.  */
30443#include <stdio.h>
30444int
30445main ()
30446{
30447FILE *f = fopen ("conftest.out", "w");
30448 return ferror (f) || fclose (f) != 0;
30449
30450  ;
30451  return 0;
30452}
30453_ACEOF
30454ac_clean_files="$ac_clean_files conftest.out"
30455# Check that the compiler produces executables we can run.  If not, either
30456# the compiler is broken, or we cross compile.
30457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30458$as_echo_n "checking whether we are cross compiling... " >&6; }
30459if test "$cross_compiling" != yes; then
30460  { { ac_try="$ac_link"
30461case "(($ac_try" in
30462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30463  *) ac_try_echo=$ac_try;;
30464esac
30465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30466$as_echo "$ac_try_echo"; } >&5
30467  (eval "$ac_link") 2>&5
30468  ac_status=$?
30469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30470  test $ac_status = 0; }
30471  if { ac_try='./conftest$ac_cv_exeext'
30472  { { case "(($ac_try" in
30473  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30474  *) ac_try_echo=$ac_try;;
30475esac
30476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30477$as_echo "$ac_try_echo"; } >&5
30478  (eval "$ac_try") 2>&5
30479  ac_status=$?
30480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30481  test $ac_status = 0; }; }; then
30482    cross_compiling=no
30483  else
30484    if test "$cross_compiling" = maybe; then
30485	cross_compiling=yes
30486    else
30487	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30489as_fn_error $? "cannot run C compiled programs.
30490If you meant to cross compile, use \`--host'.
30491See \`config.log' for more details" "$LINENO" 5; }
30492    fi
30493  fi
30494fi
30495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30496$as_echo "$cross_compiling" >&6; }
30497
30498rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30499ac_clean_files=$ac_clean_files_save
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30501$as_echo_n "checking for suffix of object files... " >&6; }
30502if ${ac_cv_objext+:} false; then :
30503  $as_echo_n "(cached) " >&6
30504else
30505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30506/* end confdefs.h.  */
30507
30508int
30509main ()
30510{
30511
30512  ;
30513  return 0;
30514}
30515_ACEOF
30516rm -f conftest.o conftest.obj
30517if { { ac_try="$ac_compile"
30518case "(($ac_try" in
30519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30520  *) ac_try_echo=$ac_try;;
30521esac
30522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30523$as_echo "$ac_try_echo"; } >&5
30524  (eval "$ac_compile") 2>&5
30525  ac_status=$?
30526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30527  test $ac_status = 0; }; then :
30528  for ac_file in conftest.o conftest.obj conftest.*; do
30529  test -f "$ac_file" || continue;
30530  case $ac_file in
30531    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30532    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30533       break;;
30534  esac
30535done
30536else
30537  $as_echo "$as_me: failed program was:" >&5
30538sed 's/^/| /' conftest.$ac_ext >&5
30539
30540{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30542as_fn_error $? "cannot compute suffix of object files: cannot compile
30543See \`config.log' for more details" "$LINENO" 5; }
30544fi
30545rm -f conftest.$ac_cv_objext conftest.$ac_ext
30546fi
30547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30548$as_echo "$ac_cv_objext" >&6; }
30549OBJEXT=$ac_cv_objext
30550ac_objext=$OBJEXT
30551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30552$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30553if ${ac_cv_c_compiler_gnu+:} false; then :
30554  $as_echo_n "(cached) " >&6
30555else
30556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30557/* end confdefs.h.  */
30558
30559int
30560main ()
30561{
30562#ifndef __GNUC__
30563       choke me
30564#endif
30565
30566  ;
30567  return 0;
30568}
30569_ACEOF
30570if ac_fn_c_try_compile "$LINENO"; then :
30571  ac_compiler_gnu=yes
30572else
30573  ac_compiler_gnu=no
30574fi
30575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30576ac_cv_c_compiler_gnu=$ac_compiler_gnu
30577
30578fi
30579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30580$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30581if test $ac_compiler_gnu = yes; then
30582  GCC=yes
30583else
30584  GCC=
30585fi
30586ac_test_CFLAGS=${CFLAGS+set}
30587ac_save_CFLAGS=$CFLAGS
30588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30589$as_echo_n "checking whether $CC accepts -g... " >&6; }
30590if ${ac_cv_prog_cc_g+:} false; then :
30591  $as_echo_n "(cached) " >&6
30592else
30593  ac_save_c_werror_flag=$ac_c_werror_flag
30594   ac_c_werror_flag=yes
30595   ac_cv_prog_cc_g=no
30596   CFLAGS="-g"
30597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30598/* end confdefs.h.  */
30599
30600int
30601main ()
30602{
30603
30604  ;
30605  return 0;
30606}
30607_ACEOF
30608if ac_fn_c_try_compile "$LINENO"; then :
30609  ac_cv_prog_cc_g=yes
30610else
30611  CFLAGS=""
30612      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30613/* end confdefs.h.  */
30614
30615int
30616main ()
30617{
30618
30619  ;
30620  return 0;
30621}
30622_ACEOF
30623if ac_fn_c_try_compile "$LINENO"; then :
30624
30625else
30626  ac_c_werror_flag=$ac_save_c_werror_flag
30627	 CFLAGS="-g"
30628	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30629/* end confdefs.h.  */
30630
30631int
30632main ()
30633{
30634
30635  ;
30636  return 0;
30637}
30638_ACEOF
30639if ac_fn_c_try_compile "$LINENO"; then :
30640  ac_cv_prog_cc_g=yes
30641fi
30642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30643fi
30644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30645fi
30646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30647   ac_c_werror_flag=$ac_save_c_werror_flag
30648fi
30649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30650$as_echo "$ac_cv_prog_cc_g" >&6; }
30651if test "$ac_test_CFLAGS" = set; then
30652  CFLAGS=$ac_save_CFLAGS
30653elif test $ac_cv_prog_cc_g = yes; then
30654  if test "$GCC" = yes; then
30655    CFLAGS="-g -O2"
30656  else
30657    CFLAGS="-g"
30658  fi
30659else
30660  if test "$GCC" = yes; then
30661    CFLAGS="-O2"
30662  else
30663    CFLAGS=
30664  fi
30665fi
30666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30667$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30668if ${ac_cv_prog_cc_c89+:} false; then :
30669  $as_echo_n "(cached) " >&6
30670else
30671  ac_cv_prog_cc_c89=no
30672ac_save_CC=$CC
30673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30674/* end confdefs.h.  */
30675#include <stdarg.h>
30676#include <stdio.h>
30677struct stat;
30678/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30679struct buf { int x; };
30680FILE * (*rcsopen) (struct buf *, struct stat *, int);
30681static char *e (p, i)
30682     char **p;
30683     int i;
30684{
30685  return p[i];
30686}
30687static char *f (char * (*g) (char **, int), char **p, ...)
30688{
30689  char *s;
30690  va_list v;
30691  va_start (v,p);
30692  s = g (p, va_arg (v,int));
30693  va_end (v);
30694  return s;
30695}
30696
30697/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30698   function prototypes and stuff, but not '\xHH' hex character constants.
30699   These don't provoke an error unfortunately, instead are silently treated
30700   as 'x'.  The following induces an error, until -std is added to get
30701   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30702   array size at least.  It's necessary to write '\x00'==0 to get something
30703   that's true only with -std.  */
30704int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30705
30706/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30707   inside strings and character constants.  */
30708#define FOO(x) 'x'
30709int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30710
30711int test (int i, double x);
30712struct s1 {int (*f) (int a);};
30713struct s2 {int (*f) (double a);};
30714int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30715int argc;
30716char **argv;
30717int
30718main ()
30719{
30720return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30721  ;
30722  return 0;
30723}
30724_ACEOF
30725for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30726	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30727do
30728  CC="$ac_save_CC $ac_arg"
30729  if ac_fn_c_try_compile "$LINENO"; then :
30730  ac_cv_prog_cc_c89=$ac_arg
30731fi
30732rm -f core conftest.err conftest.$ac_objext
30733  test "x$ac_cv_prog_cc_c89" != "xno" && break
30734done
30735rm -f conftest.$ac_ext
30736CC=$ac_save_CC
30737
30738fi
30739# AC_CACHE_VAL
30740case "x$ac_cv_prog_cc_c89" in
30741  x)
30742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30743$as_echo "none needed" >&6; } ;;
30744  xno)
30745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30746$as_echo "unsupported" >&6; } ;;
30747  *)
30748    CC="$CC $ac_cv_prog_cc_c89"
30749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30750$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30751esac
30752if test "x$ac_cv_prog_cc_c89" != xno; then :
30753
30754fi
30755
30756ac_ext=cpp
30757ac_cpp='$CXXCPP $CPPFLAGS'
30758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30761
30762
30763
30764  COMPILER_NAME=C++
30765  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30766
30767  if test "x$CXX" != x; then
30768    # User has supplied compiler name already, always let that override.
30769    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30770$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30771    if test "x`basename $CXX`" = "x$CXX"; then
30772      # A command without a complete path is provided, search $PATH.
30773
30774      for ac_prog in $CXX
30775do
30776  # Extract the first word of "$ac_prog", so it can be a program name with args.
30777set dummy $ac_prog; ac_word=$2
30778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30779$as_echo_n "checking for $ac_word... " >&6; }
30780if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30781  $as_echo_n "(cached) " >&6
30782else
30783  case $POTENTIAL_CXX in
30784  [\\/]* | ?:[\\/]*)
30785  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30786  ;;
30787  *)
30788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30789for as_dir in $PATH
30790do
30791  IFS=$as_save_IFS
30792  test -z "$as_dir" && as_dir=.
30793    for ac_exec_ext in '' $ac_executable_extensions; do
30794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30795    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30797    break 2
30798  fi
30799done
30800  done
30801IFS=$as_save_IFS
30802
30803  ;;
30804esac
30805fi
30806POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30807if test -n "$POTENTIAL_CXX"; then
30808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30809$as_echo "$POTENTIAL_CXX" >&6; }
30810else
30811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30812$as_echo "no" >&6; }
30813fi
30814
30815
30816  test -n "$POTENTIAL_CXX" && break
30817done
30818
30819      if test "x$POTENTIAL_CXX" != x; then
30820        CXX=$POTENTIAL_CXX
30821      else
30822        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30823      fi
30824    else
30825      # Otherwise it might already be a complete path
30826      if test ! -x "$CXX"; then
30827        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30828      fi
30829    fi
30830  else
30831    # No user supplied value. Locate compiler ourselves.
30832
30833    # If we are cross compiling, assume cross compilation tools follows the
30834    # cross compilation standard where they are prefixed with the autoconf
30835    # standard name for the target. For example the binary
30836    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30837    # If we are not cross compiling, then the default compiler name will be
30838    # used.
30839
30840    CXX=
30841    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30842    # before checking the rest of the PATH.
30843    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30844    # step, this should not be necessary.
30845    if test -n "$TOOLCHAIN_PATH"; then
30846      PATH_save="$PATH"
30847      PATH="$TOOLCHAIN_PATH"
30848      for ac_prog in $SEARCH_LIST
30849do
30850  # Extract the first word of "$ac_prog", so it can be a program name with args.
30851set dummy $ac_prog; 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_TOOLCHAIN_PATH_CXX+:} false; then :
30855  $as_echo_n "(cached) " >&6
30856else
30857  case $TOOLCHAIN_PATH_CXX in
30858  [\\/]* | ?:[\\/]*)
30859  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # 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_TOOLCHAIN_PATH_CXX="$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
30880TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30881if test -n "$TOOLCHAIN_PATH_CXX"; then
30882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30883$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30884else
30885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30886$as_echo "no" >&6; }
30887fi
30888
30889
30890  test -n "$TOOLCHAIN_PATH_CXX" && break
30891done
30892
30893      CXX=$TOOLCHAIN_PATH_CXX
30894      PATH="$PATH_save"
30895    fi
30896
30897    # AC_PATH_PROGS can't be run multiple times with the same variable,
30898    # so create a new name for this run.
30899    if test "x$CXX" = x; then
30900      for ac_prog in $SEARCH_LIST
30901do
30902  # Extract the first word of "$ac_prog", so it can be a program name with args.
30903set dummy $ac_prog; ac_word=$2
30904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30905$as_echo_n "checking for $ac_word... " >&6; }
30906if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30907  $as_echo_n "(cached) " >&6
30908else
30909  case $POTENTIAL_CXX in
30910  [\\/]* | ?:[\\/]*)
30911  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30912  ;;
30913  *)
30914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30915for as_dir in $PATH
30916do
30917  IFS=$as_save_IFS
30918  test -z "$as_dir" && as_dir=.
30919    for ac_exec_ext in '' $ac_executable_extensions; do
30920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30921    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30923    break 2
30924  fi
30925done
30926  done
30927IFS=$as_save_IFS
30928
30929  ;;
30930esac
30931fi
30932POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30933if test -n "$POTENTIAL_CXX"; then
30934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30935$as_echo "$POTENTIAL_CXX" >&6; }
30936else
30937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30938$as_echo "no" >&6; }
30939fi
30940
30941
30942  test -n "$POTENTIAL_CXX" && break
30943done
30944
30945      CXX=$POTENTIAL_CXX
30946    fi
30947
30948    if test "x$CXX" = x; then
30949
30950  # Print a helpful message on how to acquire the necessary build dependency.
30951  # devkit is the help tag: freetype, cups, alsa etc
30952  MISSING_DEPENDENCY=devkit
30953
30954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30955    cygwin_help $MISSING_DEPENDENCY
30956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30957    msys_help $MISSING_DEPENDENCY
30958  else
30959    PKGHANDLER_COMMAND=
30960
30961    case $PKGHANDLER in
30962      apt-get)
30963        apt_help     $MISSING_DEPENDENCY ;;
30964      yum)
30965        yum_help     $MISSING_DEPENDENCY ;;
30966      port)
30967        port_help    $MISSING_DEPENDENCY ;;
30968      pkgutil)
30969        pkgutil_help $MISSING_DEPENDENCY ;;
30970      pkgadd)
30971        pkgadd_help  $MISSING_DEPENDENCY ;;
30972    esac
30973
30974    if test "x$PKGHANDLER_COMMAND" != x; then
30975      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30976    fi
30977  fi
30978
30979      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30980    fi
30981  fi
30982
30983  # Now we have a compiler binary in CXX. Make sure it's okay.
30984
30985  # Only process if variable expands to non-empty
30986
30987  if test "x$CXX" != x; then
30988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30989
30990  # First separate the path from the arguments. This will split at the first
30991  # space.
30992  complete="$CXX"
30993  path="${complete%% *}"
30994  tmp="$complete EOL"
30995  arguments="${tmp#* }"
30996
30997  # Input might be given as Windows format, start by converting to
30998  # unix format.
30999  new_path=`$CYGPATH -u "$path"`
31000
31001  # Now try to locate executable using which
31002  new_path=`$WHICH "$new_path" 2> /dev/null`
31003  # bat and cmd files are not always considered executable in cygwin causing which
31004  # to not find them
31005  if test "x$new_path" = x \
31006      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31007      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31008    new_path=`$CYGPATH -u "$path"`
31009  fi
31010  if test "x$new_path" = x; then
31011    # Oops. Which didn't find the executable.
31012    # The splitting of arguments from the executable at a space might have been incorrect,
31013    # since paths with space are more likely in Windows. Give it another try with the whole
31014    # argument.
31015    path="$complete"
31016    arguments="EOL"
31017    new_path=`$CYGPATH -u "$path"`
31018    new_path=`$WHICH "$new_path" 2> /dev/null`
31019    # bat and cmd files are not always considered executable in cygwin causing which
31020    # to not find them
31021    if test "x$new_path" = x \
31022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31024      new_path=`$CYGPATH -u "$path"`
31025    fi
31026    if test "x$new_path" = x; then
31027      # It's still not found. Now this is an unrecoverable error.
31028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31029$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31030      has_space=`$ECHO "$complete" | $GREP " "`
31031      if test "x$has_space" != x; then
31032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31034      fi
31035      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31036    fi
31037  fi
31038
31039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31042  # "foo.exe" is OK but "foo" is an error.
31043  #
31044  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31045  # It is also a way to make sure we got the proper file name for the real test later on.
31046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31047  if test "x$test_shortpath" = x; then
31048    # Short path failed, file does not exist as specified.
31049    # Try adding .exe or .cmd
31050    if test -f "${new_path}.exe"; then
31051      input_to_shortpath="${new_path}.exe"
31052    elif test -f "${new_path}.cmd"; then
31053      input_to_shortpath="${new_path}.cmd"
31054    else
31055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31056$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31059      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31060    fi
31061  else
31062    input_to_shortpath="$new_path"
31063  fi
31064
31065  # Call helper function which possibly converts this using DOS-style short mode.
31066  # If so, the updated path is stored in $new_path.
31067  new_path="$input_to_shortpath"
31068
31069  input_path="$input_to_shortpath"
31070  # Check if we need to convert this using DOS-style short mode. If the path
31071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31072  # take no chances and rewrite it.
31073  # Note: m4 eats our [], so we need to use [ and ] instead.
31074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31075  if test "x$has_forbidden_chars" != x; then
31076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31080      # Going to short mode and back again did indeed matter. Since short mode is
31081      # case insensitive, let's make it lowercase to improve readability.
31082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31083      # Now convert it back to Unix-style (cygpath)
31084      input_path=`$CYGPATH -u "$shortmode_path"`
31085      new_path="$input_path"
31086    fi
31087  fi
31088
31089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31090  if test "x$test_cygdrive_prefix" = x; then
31091    # As a simple fix, exclude /usr/bin since it's not a real path.
31092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31094      # a path prefixed by /cygdrive for fixpath to work.
31095      new_path="$CYGWIN_ROOT_PATH$input_path"
31096    fi
31097  fi
31098
31099  # remove trailing .exe if any
31100  new_path="${new_path/%.exe/}"
31101
31102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31103
31104  # First separate the path from the arguments. This will split at the first
31105  # space.
31106  complete="$CXX"
31107  path="${complete%% *}"
31108  tmp="$complete EOL"
31109  arguments="${tmp#* }"
31110
31111  # Input might be given as Windows format, start by converting to
31112  # unix format.
31113  new_path="$path"
31114
31115  windows_path="$new_path"
31116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31117    unix_path=`$CYGPATH -u "$windows_path"`
31118    new_path="$unix_path"
31119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31121    new_path="$unix_path"
31122  fi
31123
31124
31125  # Now try to locate executable using which
31126  new_path=`$WHICH "$new_path" 2> /dev/null`
31127
31128  if test "x$new_path" = x; then
31129    # Oops. Which didn't find the executable.
31130    # The splitting of arguments from the executable at a space might have been incorrect,
31131    # since paths with space are more likely in Windows. Give it another try with the whole
31132    # argument.
31133    path="$complete"
31134    arguments="EOL"
31135    new_path="$path"
31136
31137  windows_path="$new_path"
31138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31139    unix_path=`$CYGPATH -u "$windows_path"`
31140    new_path="$unix_path"
31141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31143    new_path="$unix_path"
31144  fi
31145
31146
31147    new_path=`$WHICH "$new_path" 2> /dev/null`
31148    # bat and cmd files are not always considered executable in MSYS causing which
31149    # to not find them
31150    if test "x$new_path" = x \
31151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31153      new_path="$path"
31154
31155  windows_path="$new_path"
31156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31157    unix_path=`$CYGPATH -u "$windows_path"`
31158    new_path="$unix_path"
31159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31161    new_path="$unix_path"
31162  fi
31163
31164    fi
31165
31166    if test "x$new_path" = x; then
31167      # It's still not found. Now this is an unrecoverable error.
31168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31169$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31170      has_space=`$ECHO "$complete" | $GREP " "`
31171      if test "x$has_space" != x; then
31172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31174      fi
31175      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31176    fi
31177  fi
31178
31179  # Now new_path has a complete unix path to the binary
31180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31181    # Keep paths in /bin as-is, but remove trailing .exe if any
31182    new_path="${new_path/%.exe/}"
31183    # Do not save /bin paths to all_fixpath_prefixes!
31184  else
31185    # Not in mixed or Windows style, start by that.
31186    new_path=`cmd //c echo $new_path`
31187
31188  input_path="$new_path"
31189  # Check if we need to convert this using DOS-style short mode. If the path
31190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31191  # take no chances and rewrite it.
31192  # Note: m4 eats our [], so we need to use [ and ] instead.
31193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31194  if test "x$has_forbidden_chars" != x; then
31195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31197  fi
31198
31199    # Output is in $new_path
31200
31201  windows_path="$new_path"
31202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31203    unix_path=`$CYGPATH -u "$windows_path"`
31204    new_path="$unix_path"
31205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31207    new_path="$unix_path"
31208  fi
31209
31210    # remove trailing .exe if any
31211    new_path="${new_path/%.exe/}"
31212
31213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31215  fi
31216
31217    else
31218      # We're on a unix platform. Hooray! :)
31219      # First separate the path from the arguments. This will split at the first
31220      # space.
31221      complete="$CXX"
31222      path="${complete%% *}"
31223      tmp="$complete EOL"
31224      arguments="${tmp#* }"
31225
31226      # Cannot rely on the command "which" here since it doesn't always work.
31227      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31228      if test -z "$is_absolute_path"; then
31229        # Path to executable is not absolute. Find it.
31230        IFS_save="$IFS"
31231        IFS=:
31232        for p in $PATH; do
31233          if test -f "$p/$path" && test -x "$p/$path"; then
31234            new_path="$p/$path"
31235            break
31236          fi
31237        done
31238        IFS="$IFS_save"
31239      else
31240        # This is an absolute path, we can use it without further modifications.
31241        new_path="$path"
31242      fi
31243
31244      if test "x$new_path" = x; then
31245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31246$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31247        has_space=`$ECHO "$complete" | $GREP " "`
31248        if test "x$has_space" != x; then
31249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31251        fi
31252        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31253      fi
31254    fi
31255
31256    # Now join together the path and the arguments once again
31257    if test "x$arguments" != xEOL; then
31258      new_complete="$new_path ${arguments% *}"
31259    else
31260      new_complete="$new_path"
31261    fi
31262
31263    if test "x$complete" != "x$new_complete"; then
31264      CXX="$new_complete"
31265      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31266$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31267    fi
31268  fi
31269
31270  TEST_COMPILER="$CXX"
31271  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31272  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31273  if test "x$OPENJDK_BUILD_OS" != xaix; then
31274    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31276$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31277
31278  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31279    # Follow a chain of symbolic links. Use readlink
31280    # where it exists, else fall back to horribly
31281    # complicated shell code.
31282    if test "x$READLINK_TESTED" != yes; then
31283      # On MacOSX there is a readlink tool with a different
31284      # purpose than the GNU readlink tool. Check the found readlink.
31285      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31286      if test "x$ISGNU" = x; then
31287        # A readlink that we do not know how to use.
31288        # Are there other non-GNU readlinks out there?
31289        READLINK_TESTED=yes
31290        READLINK=
31291      fi
31292    fi
31293
31294    if test "x$READLINK" != x; then
31295      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31296    else
31297      # Save the current directory for restoring afterwards
31298      STARTDIR=$PWD
31299      COUNTER=0
31300      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31301      sym_link_file=`$BASENAME $TEST_COMPILER`
31302      cd $sym_link_dir
31303      # Use -P flag to resolve symlinks in directories.
31304      cd `$THEPWDCMD -P`
31305      sym_link_dir=`$THEPWDCMD -P`
31306      # Resolve file symlinks
31307      while test $COUNTER -lt 20; do
31308        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31309        if test "x$ISLINK" == x; then
31310          # This is not a symbolic link! We are done!
31311          break
31312        fi
31313        # Again resolve directory symlinks since the target of the just found
31314        # link could be in a different directory
31315        cd `$DIRNAME $ISLINK`
31316        sym_link_dir=`$THEPWDCMD -P`
31317        sym_link_file=`$BASENAME $ISLINK`
31318        let COUNTER=COUNTER+1
31319      done
31320      cd $STARTDIR
31321      TEST_COMPILER=$sym_link_dir/$sym_link_file
31322    fi
31323  fi
31324
31325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31326$as_echo "$TEST_COMPILER" >&6; }
31327  fi
31328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31329$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31330
31331  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31332  if test "x$COMPILER_BASENAME" = "xccache"; then
31333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31334$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31335    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31336    # We want to control ccache invocation ourselves, so ignore this cc and try
31337    # searching again.
31338
31339    # Remove the path to the fake ccache cc from the PATH
31340    RETRY_COMPILER_SAVED_PATH="$PATH"
31341    COMPILER_DIRNAME=`$DIRNAME $CXX`
31342    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31343
31344    # Try again looking for our compiler
31345    if test -n "$ac_tool_prefix"; then
31346  for ac_prog in $TOOLCHAIN_CXX_BINARY
31347  do
31348    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31349set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31351$as_echo_n "checking for $ac_word... " >&6; }
31352if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31353  $as_echo_n "(cached) " >&6
31354else
31355  if test -n "$PROPER_COMPILER_CXX"; then
31356  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31357else
31358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31359for as_dir in $PATH
31360do
31361  IFS=$as_save_IFS
31362  test -z "$as_dir" && as_dir=.
31363    for ac_exec_ext in '' $ac_executable_extensions; do
31364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31365    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31367    break 2
31368  fi
31369done
31370  done
31371IFS=$as_save_IFS
31372
31373fi
31374fi
31375PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31376if test -n "$PROPER_COMPILER_CXX"; then
31377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31378$as_echo "$PROPER_COMPILER_CXX" >&6; }
31379else
31380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31381$as_echo "no" >&6; }
31382fi
31383
31384
31385    test -n "$PROPER_COMPILER_CXX" && break
31386  done
31387fi
31388if test -z "$PROPER_COMPILER_CXX"; then
31389  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31390  for ac_prog in $TOOLCHAIN_CXX_BINARY
31391do
31392  # Extract the first word of "$ac_prog", so it can be a program name with args.
31393set dummy $ac_prog; ac_word=$2
31394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31395$as_echo_n "checking for $ac_word... " >&6; }
31396if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31397  $as_echo_n "(cached) " >&6
31398else
31399  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31400  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31401else
31402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31403for as_dir in $PATH
31404do
31405  IFS=$as_save_IFS
31406  test -z "$as_dir" && as_dir=.
31407    for ac_exec_ext in '' $ac_executable_extensions; do
31408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31409    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31411    break 2
31412  fi
31413done
31414  done
31415IFS=$as_save_IFS
31416
31417fi
31418fi
31419ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31420if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31422$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31423else
31424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31425$as_echo "no" >&6; }
31426fi
31427
31428
31429  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31430done
31431
31432  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31433    PROPER_COMPILER_CXX=""
31434  else
31435    case $cross_compiling:$ac_tool_warned in
31436yes:)
31437{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31438$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31439ac_tool_warned=yes ;;
31440esac
31441    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31442  fi
31443fi
31444
31445
31446  # Only process if variable expands to non-empty
31447
31448  if test "x$PROPER_COMPILER_CXX" != x; then
31449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31450
31451  # First separate the path from the arguments. This will split at the first
31452  # space.
31453  complete="$PROPER_COMPILER_CXX"
31454  path="${complete%% *}"
31455  tmp="$complete EOL"
31456  arguments="${tmp#* }"
31457
31458  # Input might be given as Windows format, start by converting to
31459  # unix format.
31460  new_path=`$CYGPATH -u "$path"`
31461
31462  # Now try to locate executable using which
31463  new_path=`$WHICH "$new_path" 2> /dev/null`
31464  # bat and cmd files are not always considered executable in cygwin causing which
31465  # to not find them
31466  if test "x$new_path" = x \
31467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31469    new_path=`$CYGPATH -u "$path"`
31470  fi
31471  if test "x$new_path" = x; then
31472    # Oops. Which didn't find the executable.
31473    # The splitting of arguments from the executable at a space might have been incorrect,
31474    # since paths with space are more likely in Windows. Give it another try with the whole
31475    # argument.
31476    path="$complete"
31477    arguments="EOL"
31478    new_path=`$CYGPATH -u "$path"`
31479    new_path=`$WHICH "$new_path" 2> /dev/null`
31480    # bat and cmd files are not always considered executable in cygwin causing which
31481    # to not find them
31482    if test "x$new_path" = x \
31483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31485      new_path=`$CYGPATH -u "$path"`
31486    fi
31487    if test "x$new_path" = x; then
31488      # It's still not found. Now this is an unrecoverable error.
31489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31490$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31491      has_space=`$ECHO "$complete" | $GREP " "`
31492      if test "x$has_space" != x; then
31493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31495      fi
31496      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31497    fi
31498  fi
31499
31500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31503  # "foo.exe" is OK but "foo" is an error.
31504  #
31505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31506  # It is also a way to make sure we got the proper file name for the real test later on.
31507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31508  if test "x$test_shortpath" = x; then
31509    # Short path failed, file does not exist as specified.
31510    # Try adding .exe or .cmd
31511    if test -f "${new_path}.exe"; then
31512      input_to_shortpath="${new_path}.exe"
31513    elif test -f "${new_path}.cmd"; then
31514      input_to_shortpath="${new_path}.cmd"
31515    else
31516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31517$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31520      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31521    fi
31522  else
31523    input_to_shortpath="$new_path"
31524  fi
31525
31526  # Call helper function which possibly converts this using DOS-style short mode.
31527  # If so, the updated path is stored in $new_path.
31528  new_path="$input_to_shortpath"
31529
31530  input_path="$input_to_shortpath"
31531  # Check if we need to convert this using DOS-style short mode. If the path
31532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31533  # take no chances and rewrite it.
31534  # Note: m4 eats our [], so we need to use [ and ] instead.
31535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31536  if test "x$has_forbidden_chars" != x; then
31537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31541      # Going to short mode and back again did indeed matter. Since short mode is
31542      # case insensitive, let's make it lowercase to improve readability.
31543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31544      # Now convert it back to Unix-style (cygpath)
31545      input_path=`$CYGPATH -u "$shortmode_path"`
31546      new_path="$input_path"
31547    fi
31548  fi
31549
31550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31551  if test "x$test_cygdrive_prefix" = x; then
31552    # As a simple fix, exclude /usr/bin since it's not a real path.
31553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31555      # a path prefixed by /cygdrive for fixpath to work.
31556      new_path="$CYGWIN_ROOT_PATH$input_path"
31557    fi
31558  fi
31559
31560  # remove trailing .exe if any
31561  new_path="${new_path/%.exe/}"
31562
31563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31564
31565  # First separate the path from the arguments. This will split at the first
31566  # space.
31567  complete="$PROPER_COMPILER_CXX"
31568  path="${complete%% *}"
31569  tmp="$complete EOL"
31570  arguments="${tmp#* }"
31571
31572  # Input might be given as Windows format, start by converting to
31573  # unix format.
31574  new_path="$path"
31575
31576  windows_path="$new_path"
31577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578    unix_path=`$CYGPATH -u "$windows_path"`
31579    new_path="$unix_path"
31580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31582    new_path="$unix_path"
31583  fi
31584
31585
31586  # Now try to locate executable using which
31587  new_path=`$WHICH "$new_path" 2> /dev/null`
31588
31589  if test "x$new_path" = x; then
31590    # Oops. Which didn't find the executable.
31591    # The splitting of arguments from the executable at a space might have been incorrect,
31592    # since paths with space are more likely in Windows. Give it another try with the whole
31593    # argument.
31594    path="$complete"
31595    arguments="EOL"
31596    new_path="$path"
31597
31598  windows_path="$new_path"
31599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31600    unix_path=`$CYGPATH -u "$windows_path"`
31601    new_path="$unix_path"
31602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31604    new_path="$unix_path"
31605  fi
31606
31607
31608    new_path=`$WHICH "$new_path" 2> /dev/null`
31609    # bat and cmd files are not always considered executable in MSYS causing which
31610    # to not find them
31611    if test "x$new_path" = x \
31612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31614      new_path="$path"
31615
31616  windows_path="$new_path"
31617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31618    unix_path=`$CYGPATH -u "$windows_path"`
31619    new_path="$unix_path"
31620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31622    new_path="$unix_path"
31623  fi
31624
31625    fi
31626
31627    if test "x$new_path" = x; then
31628      # It's still not found. Now this is an unrecoverable error.
31629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31630$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31631      has_space=`$ECHO "$complete" | $GREP " "`
31632      if test "x$has_space" != x; then
31633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31635      fi
31636      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31637    fi
31638  fi
31639
31640  # Now new_path has a complete unix path to the binary
31641  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31642    # Keep paths in /bin as-is, but remove trailing .exe if any
31643    new_path="${new_path/%.exe/}"
31644    # Do not save /bin paths to all_fixpath_prefixes!
31645  else
31646    # Not in mixed or Windows style, start by that.
31647    new_path=`cmd //c echo $new_path`
31648
31649  input_path="$new_path"
31650  # Check if we need to convert this using DOS-style short mode. If the path
31651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31652  # take no chances and rewrite it.
31653  # Note: m4 eats our [], so we need to use [ and ] instead.
31654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31655  if test "x$has_forbidden_chars" != x; then
31656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31658  fi
31659
31660    # Output is in $new_path
31661
31662  windows_path="$new_path"
31663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31664    unix_path=`$CYGPATH -u "$windows_path"`
31665    new_path="$unix_path"
31666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31668    new_path="$unix_path"
31669  fi
31670
31671    # remove trailing .exe if any
31672    new_path="${new_path/%.exe/}"
31673
31674    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31675    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31676  fi
31677
31678    else
31679      # We're on a unix platform. Hooray! :)
31680      # First separate the path from the arguments. This will split at the first
31681      # space.
31682      complete="$PROPER_COMPILER_CXX"
31683      path="${complete%% *}"
31684      tmp="$complete EOL"
31685      arguments="${tmp#* }"
31686
31687      # Cannot rely on the command "which" here since it doesn't always work.
31688      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31689      if test -z "$is_absolute_path"; then
31690        # Path to executable is not absolute. Find it.
31691        IFS_save="$IFS"
31692        IFS=:
31693        for p in $PATH; do
31694          if test -f "$p/$path" && test -x "$p/$path"; then
31695            new_path="$p/$path"
31696            break
31697          fi
31698        done
31699        IFS="$IFS_save"
31700      else
31701        # This is an absolute path, we can use it without further modifications.
31702        new_path="$path"
31703      fi
31704
31705      if test "x$new_path" = x; then
31706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31707$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31708        has_space=`$ECHO "$complete" | $GREP " "`
31709        if test "x$has_space" != x; then
31710          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31711$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31712        fi
31713        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31714      fi
31715    fi
31716
31717    # Now join together the path and the arguments once again
31718    if test "x$arguments" != xEOL; then
31719      new_complete="$new_path ${arguments% *}"
31720    else
31721      new_complete="$new_path"
31722    fi
31723
31724    if test "x$complete" != "x$new_complete"; then
31725      PROPER_COMPILER_CXX="$new_complete"
31726      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31727$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31728    fi
31729  fi
31730
31731    PATH="$RETRY_COMPILER_SAVED_PATH"
31732
31733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31734$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31735
31736  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31737    # Follow a chain of symbolic links. Use readlink
31738    # where it exists, else fall back to horribly
31739    # complicated shell code.
31740    if test "x$READLINK_TESTED" != yes; then
31741      # On MacOSX there is a readlink tool with a different
31742      # purpose than the GNU readlink tool. Check the found readlink.
31743      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31744      if test "x$ISGNU" = x; then
31745        # A readlink that we do not know how to use.
31746        # Are there other non-GNU readlinks out there?
31747        READLINK_TESTED=yes
31748        READLINK=
31749      fi
31750    fi
31751
31752    if test "x$READLINK" != x; then
31753      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31754    else
31755      # Save the current directory for restoring afterwards
31756      STARTDIR=$PWD
31757      COUNTER=0
31758      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31759      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31760      cd $sym_link_dir
31761      # Use -P flag to resolve symlinks in directories.
31762      cd `$THEPWDCMD -P`
31763      sym_link_dir=`$THEPWDCMD -P`
31764      # Resolve file symlinks
31765      while test $COUNTER -lt 20; do
31766        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31767        if test "x$ISLINK" == x; then
31768          # This is not a symbolic link! We are done!
31769          break
31770        fi
31771        # Again resolve directory symlinks since the target of the just found
31772        # link could be in a different directory
31773        cd `$DIRNAME $ISLINK`
31774        sym_link_dir=`$THEPWDCMD -P`
31775        sym_link_file=`$BASENAME $ISLINK`
31776        let COUNTER=COUNTER+1
31777      done
31778      cd $STARTDIR
31779      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31780    fi
31781  fi
31782
31783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31784$as_echo "$PROPER_COMPILER_CXX" >&6; }
31785    CXX="$PROPER_COMPILER_CXX"
31786  else
31787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31788$as_echo "no, keeping CXX" >&6; }
31789  fi
31790
31791
31792  COMPILER=$CXX
31793  COMPILER_NAME=$COMPILER_NAME
31794
31795  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31796    # cc -V output typically looks like
31797    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31798    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31799    # Check that this is likely to be the Solaris Studio cc.
31800    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31801    if test $? -ne 0; then
31802      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31803      { $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
31804$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31805      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31806$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31807      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31808$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31809      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31810    fi
31811    # Remove usage instructions (if present), and
31812    # collapse compiler output into a single line
31813    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31814        $SED -e 's/ *[Uu]sage:.*//'`
31815    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31816        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31817  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31818    # xlc -qversion output typically looks like
31819    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31820    #     Version: 11.01.0000.0015
31821    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31822    # Check that this is likely to be the IBM XL C compiler.
31823    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31824    if test $? -ne 0; then
31825      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31826      { $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
31827$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31828      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31829$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31830      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31831$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31832      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31833    fi
31834    # Collapse compiler output into a single line
31835    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31836    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31837        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31838  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31839    # There is no specific version flag, but all output starts with a version string.
31840    # First line typically looks something like:
31841    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31842    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31843    # Check that this is likely to be Microsoft CL.EXE.
31844    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31845    if test $? -ne 0; then
31846      { $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
31847$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31848      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31849$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31850      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31851    fi
31852    # Collapse compiler output into a single line
31853    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31854    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31855        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31856  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31857    # gcc --version output typically looks like
31858    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31859    #     Copyright (C) 2013 Free Software Foundation, Inc.
31860    #     This is free software; see the source for copying conditions.  There is NO
31861    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31862    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31863    # Check that this is likely to be GCC.
31864    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31865    if test $? -ne 0; then
31866      { $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
31867$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31868      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31869$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31870      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31871    fi
31872    # Remove Copyright and legalese from version string, and
31873    # collapse into a single line
31874    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31875        $SED -e 's/ *Copyright .*//'`
31876    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31877        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31878  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31879    # clang --version output typically looks like
31880    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31881    #    clang version 3.3 (tags/RELEASE_33/final)
31882    # or
31883    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31884    #    Target: x86_64-pc-linux-gnu
31885    #    Thread model: posix
31886    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31887    # Check that this is likely to be clang
31888    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31889    if test $? -ne 0; then
31890      { $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
31891$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31892      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31893$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31894      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31895    fi
31896    # Collapse compiler output into a single line
31897    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31898    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31899        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31900  else
31901      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31902  fi
31903  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31904  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31905  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31906  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31907
31908  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31909$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31910
31911
31912  # Now that we have resolved CXX ourself, let autoconf have its go at it
31913  ac_ext=cpp
31914ac_cpp='$CXXCPP $CPPFLAGS'
31915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31918if test -z "$CXX"; then
31919  if test -n "$CCC"; then
31920    CXX=$CCC
31921  else
31922    if test -n "$ac_tool_prefix"; then
31923  for ac_prog in $CXX
31924  do
31925    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31926set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31928$as_echo_n "checking for $ac_word... " >&6; }
31929if ${ac_cv_prog_CXX+:} false; then :
31930  $as_echo_n "(cached) " >&6
31931else
31932  if test -n "$CXX"; then
31933  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31934else
31935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31936for as_dir in $PATH
31937do
31938  IFS=$as_save_IFS
31939  test -z "$as_dir" && as_dir=.
31940    for ac_exec_ext in '' $ac_executable_extensions; do
31941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31942    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31944    break 2
31945  fi
31946done
31947  done
31948IFS=$as_save_IFS
31949
31950fi
31951fi
31952CXX=$ac_cv_prog_CXX
31953if test -n "$CXX"; then
31954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31955$as_echo "$CXX" >&6; }
31956else
31957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31958$as_echo "no" >&6; }
31959fi
31960
31961
31962    test -n "$CXX" && break
31963  done
31964fi
31965if test -z "$CXX"; then
31966  ac_ct_CXX=$CXX
31967  for ac_prog in $CXX
31968do
31969  # Extract the first word of "$ac_prog", so it can be a program name with args.
31970set dummy $ac_prog; ac_word=$2
31971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31972$as_echo_n "checking for $ac_word... " >&6; }
31973if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31974  $as_echo_n "(cached) " >&6
31975else
31976  if test -n "$ac_ct_CXX"; then
31977  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31978else
31979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31980for as_dir in $PATH
31981do
31982  IFS=$as_save_IFS
31983  test -z "$as_dir" && as_dir=.
31984    for ac_exec_ext in '' $ac_executable_extensions; do
31985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31986    ac_cv_prog_ac_ct_CXX="$ac_prog"
31987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31988    break 2
31989  fi
31990done
31991  done
31992IFS=$as_save_IFS
31993
31994fi
31995fi
31996ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31997if test -n "$ac_ct_CXX"; then
31998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31999$as_echo "$ac_ct_CXX" >&6; }
32000else
32001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32002$as_echo "no" >&6; }
32003fi
32004
32005
32006  test -n "$ac_ct_CXX" && break
32007done
32008
32009  if test "x$ac_ct_CXX" = x; then
32010    CXX="g++"
32011  else
32012    case $cross_compiling:$ac_tool_warned in
32013yes:)
32014{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32015$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32016ac_tool_warned=yes ;;
32017esac
32018    CXX=$ac_ct_CXX
32019  fi
32020fi
32021
32022  fi
32023fi
32024# Provide some information about the compiler.
32025$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32026set X $ac_compile
32027ac_compiler=$2
32028for ac_option in --version -v -V -qversion; do
32029  { { ac_try="$ac_compiler $ac_option >&5"
32030case "(($ac_try" in
32031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32032  *) ac_try_echo=$ac_try;;
32033esac
32034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32035$as_echo "$ac_try_echo"; } >&5
32036  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32037  ac_status=$?
32038  if test -s conftest.err; then
32039    sed '10a\
32040... rest of stderr output deleted ...
32041         10q' conftest.err >conftest.er1
32042    cat conftest.er1 >&5
32043  fi
32044  rm -f conftest.er1 conftest.err
32045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32046  test $ac_status = 0; }
32047done
32048
32049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32050$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32051if ${ac_cv_cxx_compiler_gnu+:} false; then :
32052  $as_echo_n "(cached) " >&6
32053else
32054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32055/* end confdefs.h.  */
32056
32057int
32058main ()
32059{
32060#ifndef __GNUC__
32061       choke me
32062#endif
32063
32064  ;
32065  return 0;
32066}
32067_ACEOF
32068if ac_fn_cxx_try_compile "$LINENO"; then :
32069  ac_compiler_gnu=yes
32070else
32071  ac_compiler_gnu=no
32072fi
32073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32074ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32075
32076fi
32077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32078$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32079if test $ac_compiler_gnu = yes; then
32080  GXX=yes
32081else
32082  GXX=
32083fi
32084ac_test_CXXFLAGS=${CXXFLAGS+set}
32085ac_save_CXXFLAGS=$CXXFLAGS
32086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32087$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32088if ${ac_cv_prog_cxx_g+:} false; then :
32089  $as_echo_n "(cached) " >&6
32090else
32091  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32092   ac_cxx_werror_flag=yes
32093   ac_cv_prog_cxx_g=no
32094   CXXFLAGS="-g"
32095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32096/* end confdefs.h.  */
32097
32098int
32099main ()
32100{
32101
32102  ;
32103  return 0;
32104}
32105_ACEOF
32106if ac_fn_cxx_try_compile "$LINENO"; then :
32107  ac_cv_prog_cxx_g=yes
32108else
32109  CXXFLAGS=""
32110      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32111/* end confdefs.h.  */
32112
32113int
32114main ()
32115{
32116
32117  ;
32118  return 0;
32119}
32120_ACEOF
32121if ac_fn_cxx_try_compile "$LINENO"; then :
32122
32123else
32124  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32125	 CXXFLAGS="-g"
32126	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32127/* end confdefs.h.  */
32128
32129int
32130main ()
32131{
32132
32133  ;
32134  return 0;
32135}
32136_ACEOF
32137if ac_fn_cxx_try_compile "$LINENO"; then :
32138  ac_cv_prog_cxx_g=yes
32139fi
32140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32141fi
32142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32143fi
32144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32145   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32146fi
32147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32148$as_echo "$ac_cv_prog_cxx_g" >&6; }
32149if test "$ac_test_CXXFLAGS" = set; then
32150  CXXFLAGS=$ac_save_CXXFLAGS
32151elif test $ac_cv_prog_cxx_g = yes; then
32152  if test "$GXX" = yes; then
32153    CXXFLAGS="-g -O2"
32154  else
32155    CXXFLAGS="-g"
32156  fi
32157else
32158  if test "$GXX" = yes; then
32159    CXXFLAGS="-O2"
32160  else
32161    CXXFLAGS=
32162  fi
32163fi
32164ac_ext=cpp
32165ac_cpp='$CXXCPP $CPPFLAGS'
32166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32169
32170
32171  #
32172  # Setup the preprocessor (CPP and CXXCPP)
32173  #
32174  ac_ext=c
32175ac_cpp='$CPP $CPPFLAGS'
32176ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32177ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32178ac_compiler_gnu=$ac_cv_c_compiler_gnu
32179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
32180$as_echo_n "checking how to run the C preprocessor... " >&6; }
32181# On Suns, sometimes $CPP names a directory.
32182if test -n "$CPP" && test -d "$CPP"; then
32183  CPP=
32184fi
32185if test -z "$CPP"; then
32186  if ${ac_cv_prog_CPP+:} false; then :
32187  $as_echo_n "(cached) " >&6
32188else
32189      # Double quotes because CPP needs to be expanded
32190    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
32191    do
32192      ac_preproc_ok=false
32193for ac_c_preproc_warn_flag in '' yes
32194do
32195  # Use a header file that comes with gcc, so configuring glibc
32196  # with a fresh cross-compiler works.
32197  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32198  # <limits.h> exists even on freestanding compilers.
32199  # On the NeXT, cc -E runs the code through the compiler's parser,
32200  # not just through cpp. "Syntax error" is here to catch this case.
32201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32202/* end confdefs.h.  */
32203#ifdef __STDC__
32204# include <limits.h>
32205#else
32206# include <assert.h>
32207#endif
32208		     Syntax error
32209_ACEOF
32210if ac_fn_c_try_cpp "$LINENO"; then :
32211
32212else
32213  # Broken: fails on valid input.
32214continue
32215fi
32216rm -f conftest.err conftest.i conftest.$ac_ext
32217
32218  # OK, works on sane cases.  Now check whether nonexistent headers
32219  # can be detected and how.
32220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32221/* end confdefs.h.  */
32222#include <ac_nonexistent.h>
32223_ACEOF
32224if ac_fn_c_try_cpp "$LINENO"; then :
32225  # Broken: success on invalid input.
32226continue
32227else
32228  # Passes both tests.
32229ac_preproc_ok=:
32230break
32231fi
32232rm -f conftest.err conftest.i conftest.$ac_ext
32233
32234done
32235# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32236rm -f conftest.i conftest.err conftest.$ac_ext
32237if $ac_preproc_ok; then :
32238  break
32239fi
32240
32241    done
32242    ac_cv_prog_CPP=$CPP
32243
32244fi
32245  CPP=$ac_cv_prog_CPP
32246else
32247  ac_cv_prog_CPP=$CPP
32248fi
32249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
32250$as_echo "$CPP" >&6; }
32251ac_preproc_ok=false
32252for ac_c_preproc_warn_flag in '' yes
32253do
32254  # Use a header file that comes with gcc, so configuring glibc
32255  # with a fresh cross-compiler works.
32256  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32257  # <limits.h> exists even on freestanding compilers.
32258  # On the NeXT, cc -E runs the code through the compiler's parser,
32259  # not just through cpp. "Syntax error" is here to catch this case.
32260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32261/* end confdefs.h.  */
32262#ifdef __STDC__
32263# include <limits.h>
32264#else
32265# include <assert.h>
32266#endif
32267		     Syntax error
32268_ACEOF
32269if ac_fn_c_try_cpp "$LINENO"; then :
32270
32271else
32272  # Broken: fails on valid input.
32273continue
32274fi
32275rm -f conftest.err conftest.i conftest.$ac_ext
32276
32277  # OK, works on sane cases.  Now check whether nonexistent headers
32278  # can be detected and how.
32279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32280/* end confdefs.h.  */
32281#include <ac_nonexistent.h>
32282_ACEOF
32283if ac_fn_c_try_cpp "$LINENO"; then :
32284  # Broken: success on invalid input.
32285continue
32286else
32287  # Passes both tests.
32288ac_preproc_ok=:
32289break
32290fi
32291rm -f conftest.err conftest.i conftest.$ac_ext
32292
32293done
32294# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32295rm -f conftest.i conftest.err conftest.$ac_ext
32296if $ac_preproc_ok; then :
32297
32298else
32299  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32301as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
32302See \`config.log' for more details" "$LINENO" 5; }
32303fi
32304
32305ac_ext=cpp
32306ac_cpp='$CXXCPP $CPPFLAGS'
32307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32310
32311
32312  # Only process if variable expands to non-empty
32313
32314  if test "x$CPP" != x; then
32315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32316
32317  # First separate the path from the arguments. This will split at the first
32318  # space.
32319  complete="$CPP"
32320  path="${complete%% *}"
32321  tmp="$complete EOL"
32322  arguments="${tmp#* }"
32323
32324  # Input might be given as Windows format, start by converting to
32325  # unix format.
32326  new_path=`$CYGPATH -u "$path"`
32327
32328  # Now try to locate executable using which
32329  new_path=`$WHICH "$new_path" 2> /dev/null`
32330  # bat and cmd files are not always considered executable in cygwin causing which
32331  # to not find them
32332  if test "x$new_path" = x \
32333      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32334      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32335    new_path=`$CYGPATH -u "$path"`
32336  fi
32337  if test "x$new_path" = x; then
32338    # Oops. Which didn't find the executable.
32339    # The splitting of arguments from the executable at a space might have been incorrect,
32340    # since paths with space are more likely in Windows. Give it another try with the whole
32341    # argument.
32342    path="$complete"
32343    arguments="EOL"
32344    new_path=`$CYGPATH -u "$path"`
32345    new_path=`$WHICH "$new_path" 2> /dev/null`
32346    # bat and cmd files are not always considered executable in cygwin causing which
32347    # to not find them
32348    if test "x$new_path" = x \
32349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32351      new_path=`$CYGPATH -u "$path"`
32352    fi
32353    if test "x$new_path" = x; then
32354      # It's still not found. Now this is an unrecoverable error.
32355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32356$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32357      has_space=`$ECHO "$complete" | $GREP " "`
32358      if test "x$has_space" != x; then
32359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32361      fi
32362      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32363    fi
32364  fi
32365
32366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32369  # "foo.exe" is OK but "foo" is an error.
32370  #
32371  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32372  # It is also a way to make sure we got the proper file name for the real test later on.
32373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32374  if test "x$test_shortpath" = x; then
32375    # Short path failed, file does not exist as specified.
32376    # Try adding .exe or .cmd
32377    if test -f "${new_path}.exe"; then
32378      input_to_shortpath="${new_path}.exe"
32379    elif test -f "${new_path}.cmd"; then
32380      input_to_shortpath="${new_path}.cmd"
32381    else
32382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
32383$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
32384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32386      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32387    fi
32388  else
32389    input_to_shortpath="$new_path"
32390  fi
32391
32392  # Call helper function which possibly converts this using DOS-style short mode.
32393  # If so, the updated path is stored in $new_path.
32394  new_path="$input_to_shortpath"
32395
32396  input_path="$input_to_shortpath"
32397  # Check if we need to convert this using DOS-style short mode. If the path
32398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32399  # take no chances and rewrite it.
32400  # Note: m4 eats our [], so we need to use [ and ] instead.
32401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32402  if test "x$has_forbidden_chars" != x; then
32403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32407      # Going to short mode and back again did indeed matter. Since short mode is
32408      # case insensitive, let's make it lowercase to improve readability.
32409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32410      # Now convert it back to Unix-style (cygpath)
32411      input_path=`$CYGPATH -u "$shortmode_path"`
32412      new_path="$input_path"
32413    fi
32414  fi
32415
32416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32417  if test "x$test_cygdrive_prefix" = x; then
32418    # As a simple fix, exclude /usr/bin since it's not a real path.
32419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32421      # a path prefixed by /cygdrive for fixpath to work.
32422      new_path="$CYGWIN_ROOT_PATH$input_path"
32423    fi
32424  fi
32425
32426  # remove trailing .exe if any
32427  new_path="${new_path/%.exe/}"
32428
32429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32430
32431  # First separate the path from the arguments. This will split at the first
32432  # space.
32433  complete="$CPP"
32434  path="${complete%% *}"
32435  tmp="$complete EOL"
32436  arguments="${tmp#* }"
32437
32438  # Input might be given as Windows format, start by converting to
32439  # unix format.
32440  new_path="$path"
32441
32442  windows_path="$new_path"
32443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32444    unix_path=`$CYGPATH -u "$windows_path"`
32445    new_path="$unix_path"
32446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32448    new_path="$unix_path"
32449  fi
32450
32451
32452  # Now try to locate executable using which
32453  new_path=`$WHICH "$new_path" 2> /dev/null`
32454
32455  if test "x$new_path" = x; then
32456    # Oops. Which didn't find the executable.
32457    # The splitting of arguments from the executable at a space might have been incorrect,
32458    # since paths with space are more likely in Windows. Give it another try with the whole
32459    # argument.
32460    path="$complete"
32461    arguments="EOL"
32462    new_path="$path"
32463
32464  windows_path="$new_path"
32465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32466    unix_path=`$CYGPATH -u "$windows_path"`
32467    new_path="$unix_path"
32468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32470    new_path="$unix_path"
32471  fi
32472
32473
32474    new_path=`$WHICH "$new_path" 2> /dev/null`
32475    # bat and cmd files are not always considered executable in MSYS causing which
32476    # to not find them
32477    if test "x$new_path" = x \
32478        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32479        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32480      new_path="$path"
32481
32482  windows_path="$new_path"
32483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32484    unix_path=`$CYGPATH -u "$windows_path"`
32485    new_path="$unix_path"
32486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32488    new_path="$unix_path"
32489  fi
32490
32491    fi
32492
32493    if test "x$new_path" = x; then
32494      # It's still not found. Now this is an unrecoverable error.
32495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32496$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32497      has_space=`$ECHO "$complete" | $GREP " "`
32498      if test "x$has_space" != x; then
32499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32501      fi
32502      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32503    fi
32504  fi
32505
32506  # Now new_path has a complete unix path to the binary
32507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32508    # Keep paths in /bin as-is, but remove trailing .exe if any
32509    new_path="${new_path/%.exe/}"
32510    # Do not save /bin paths to all_fixpath_prefixes!
32511  else
32512    # Not in mixed or Windows style, start by that.
32513    new_path=`cmd //c echo $new_path`
32514
32515  input_path="$new_path"
32516  # Check if we need to convert this using DOS-style short mode. If the path
32517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32518  # take no chances and rewrite it.
32519  # Note: m4 eats our [], so we need to use [ and ] instead.
32520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32521  if test "x$has_forbidden_chars" != x; then
32522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32524  fi
32525
32526    # Output is in $new_path
32527
32528  windows_path="$new_path"
32529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32530    unix_path=`$CYGPATH -u "$windows_path"`
32531    new_path="$unix_path"
32532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32534    new_path="$unix_path"
32535  fi
32536
32537    # remove trailing .exe if any
32538    new_path="${new_path/%.exe/}"
32539
32540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32542  fi
32543
32544    else
32545      # We're on a unix platform. Hooray! :)
32546      # First separate the path from the arguments. This will split at the first
32547      # space.
32548      complete="$CPP"
32549      path="${complete%% *}"
32550      tmp="$complete EOL"
32551      arguments="${tmp#* }"
32552
32553      # Cannot rely on the command "which" here since it doesn't always work.
32554      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32555      if test -z "$is_absolute_path"; then
32556        # Path to executable is not absolute. Find it.
32557        IFS_save="$IFS"
32558        IFS=:
32559        for p in $PATH; do
32560          if test -f "$p/$path" && test -x "$p/$path"; then
32561            new_path="$p/$path"
32562            break
32563          fi
32564        done
32565        IFS="$IFS_save"
32566      else
32567        # This is an absolute path, we can use it without further modifications.
32568        new_path="$path"
32569      fi
32570
32571      if test "x$new_path" = x; then
32572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32573$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32574        has_space=`$ECHO "$complete" | $GREP " "`
32575        if test "x$has_space" != x; then
32576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32578        fi
32579        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32580      fi
32581    fi
32582
32583    # Now join together the path and the arguments once again
32584    if test "x$arguments" != xEOL; then
32585      new_complete="$new_path ${arguments% *}"
32586    else
32587      new_complete="$new_path"
32588    fi
32589
32590    if test "x$complete" != "x$new_complete"; then
32591      CPP="$new_complete"
32592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32593$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32594    fi
32595  fi
32596
32597  ac_ext=cpp
32598ac_cpp='$CXXCPP $CPPFLAGS'
32599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32603$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32604if test -z "$CXXCPP"; then
32605  if ${ac_cv_prog_CXXCPP+:} false; then :
32606  $as_echo_n "(cached) " >&6
32607else
32608      # Double quotes because CXXCPP needs to be expanded
32609    for CXXCPP in "$CXX -E" "/lib/cpp"
32610    do
32611      ac_preproc_ok=false
32612for ac_cxx_preproc_warn_flag in '' yes
32613do
32614  # Use a header file that comes with gcc, so configuring glibc
32615  # with a fresh cross-compiler works.
32616  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32617  # <limits.h> exists even on freestanding compilers.
32618  # On the NeXT, cc -E runs the code through the compiler's parser,
32619  # not just through cpp. "Syntax error" is here to catch this case.
32620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32621/* end confdefs.h.  */
32622#ifdef __STDC__
32623# include <limits.h>
32624#else
32625# include <assert.h>
32626#endif
32627		     Syntax error
32628_ACEOF
32629if ac_fn_cxx_try_cpp "$LINENO"; then :
32630
32631else
32632  # Broken: fails on valid input.
32633continue
32634fi
32635rm -f conftest.err conftest.i conftest.$ac_ext
32636
32637  # OK, works on sane cases.  Now check whether nonexistent headers
32638  # can be detected and how.
32639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32640/* end confdefs.h.  */
32641#include <ac_nonexistent.h>
32642_ACEOF
32643if ac_fn_cxx_try_cpp "$LINENO"; then :
32644  # Broken: success on invalid input.
32645continue
32646else
32647  # Passes both tests.
32648ac_preproc_ok=:
32649break
32650fi
32651rm -f conftest.err conftest.i conftest.$ac_ext
32652
32653done
32654# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32655rm -f conftest.i conftest.err conftest.$ac_ext
32656if $ac_preproc_ok; then :
32657  break
32658fi
32659
32660    done
32661    ac_cv_prog_CXXCPP=$CXXCPP
32662
32663fi
32664  CXXCPP=$ac_cv_prog_CXXCPP
32665else
32666  ac_cv_prog_CXXCPP=$CXXCPP
32667fi
32668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32669$as_echo "$CXXCPP" >&6; }
32670ac_preproc_ok=false
32671for ac_cxx_preproc_warn_flag in '' yes
32672do
32673  # Use a header file that comes with gcc, so configuring glibc
32674  # with a fresh cross-compiler works.
32675  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32676  # <limits.h> exists even on freestanding compilers.
32677  # On the NeXT, cc -E runs the code through the compiler's parser,
32678  # not just through cpp. "Syntax error" is here to catch this case.
32679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32680/* end confdefs.h.  */
32681#ifdef __STDC__
32682# include <limits.h>
32683#else
32684# include <assert.h>
32685#endif
32686		     Syntax error
32687_ACEOF
32688if ac_fn_cxx_try_cpp "$LINENO"; then :
32689
32690else
32691  # Broken: fails on valid input.
32692continue
32693fi
32694rm -f conftest.err conftest.i conftest.$ac_ext
32695
32696  # OK, works on sane cases.  Now check whether nonexistent headers
32697  # can be detected and how.
32698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32699/* end confdefs.h.  */
32700#include <ac_nonexistent.h>
32701_ACEOF
32702if ac_fn_cxx_try_cpp "$LINENO"; then :
32703  # Broken: success on invalid input.
32704continue
32705else
32706  # Passes both tests.
32707ac_preproc_ok=:
32708break
32709fi
32710rm -f conftest.err conftest.i conftest.$ac_ext
32711
32712done
32713# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32714rm -f conftest.i conftest.err conftest.$ac_ext
32715if $ac_preproc_ok; then :
32716
32717else
32718  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32720as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32721See \`config.log' for more details" "$LINENO" 5; }
32722fi
32723
32724ac_ext=cpp
32725ac_cpp='$CXXCPP $CPPFLAGS'
32726ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32727ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32728ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32729
32730
32731  # Only process if variable expands to non-empty
32732
32733  if test "x$CXXCPP" != x; then
32734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32735
32736  # First separate the path from the arguments. This will split at the first
32737  # space.
32738  complete="$CXXCPP"
32739  path="${complete%% *}"
32740  tmp="$complete EOL"
32741  arguments="${tmp#* }"
32742
32743  # Input might be given as Windows format, start by converting to
32744  # unix format.
32745  new_path=`$CYGPATH -u "$path"`
32746
32747  # Now try to locate executable using which
32748  new_path=`$WHICH "$new_path" 2> /dev/null`
32749  # bat and cmd files are not always considered executable in cygwin causing which
32750  # to not find them
32751  if test "x$new_path" = x \
32752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32754    new_path=`$CYGPATH -u "$path"`
32755  fi
32756  if test "x$new_path" = x; then
32757    # Oops. Which didn't find the executable.
32758    # The splitting of arguments from the executable at a space might have been incorrect,
32759    # since paths with space are more likely in Windows. Give it another try with the whole
32760    # argument.
32761    path="$complete"
32762    arguments="EOL"
32763    new_path=`$CYGPATH -u "$path"`
32764    new_path=`$WHICH "$new_path" 2> /dev/null`
32765    # bat and cmd files are not always considered executable in cygwin causing which
32766    # to not find them
32767    if test "x$new_path" = x \
32768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32770      new_path=`$CYGPATH -u "$path"`
32771    fi
32772    if test "x$new_path" = x; then
32773      # It's still not found. Now this is an unrecoverable error.
32774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32775$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32776      has_space=`$ECHO "$complete" | $GREP " "`
32777      if test "x$has_space" != x; then
32778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32780      fi
32781      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32782    fi
32783  fi
32784
32785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32788  # "foo.exe" is OK but "foo" is an error.
32789  #
32790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32791  # It is also a way to make sure we got the proper file name for the real test later on.
32792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32793  if test "x$test_shortpath" = x; then
32794    # Short path failed, file does not exist as specified.
32795    # Try adding .exe or .cmd
32796    if test -f "${new_path}.exe"; then
32797      input_to_shortpath="${new_path}.exe"
32798    elif test -f "${new_path}.cmd"; then
32799      input_to_shortpath="${new_path}.cmd"
32800    else
32801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32802$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32805      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32806    fi
32807  else
32808    input_to_shortpath="$new_path"
32809  fi
32810
32811  # Call helper function which possibly converts this using DOS-style short mode.
32812  # If so, the updated path is stored in $new_path.
32813  new_path="$input_to_shortpath"
32814
32815  input_path="$input_to_shortpath"
32816  # Check if we need to convert this using DOS-style short mode. If the path
32817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32818  # take no chances and rewrite it.
32819  # Note: m4 eats our [], so we need to use [ and ] instead.
32820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32821  if test "x$has_forbidden_chars" != x; then
32822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32826      # Going to short mode and back again did indeed matter. Since short mode is
32827      # case insensitive, let's make it lowercase to improve readability.
32828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32829      # Now convert it back to Unix-style (cygpath)
32830      input_path=`$CYGPATH -u "$shortmode_path"`
32831      new_path="$input_path"
32832    fi
32833  fi
32834
32835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32836  if test "x$test_cygdrive_prefix" = x; then
32837    # As a simple fix, exclude /usr/bin since it's not a real path.
32838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32840      # a path prefixed by /cygdrive for fixpath to work.
32841      new_path="$CYGWIN_ROOT_PATH$input_path"
32842    fi
32843  fi
32844
32845  # remove trailing .exe if any
32846  new_path="${new_path/%.exe/}"
32847
32848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32849
32850  # First separate the path from the arguments. This will split at the first
32851  # space.
32852  complete="$CXXCPP"
32853  path="${complete%% *}"
32854  tmp="$complete EOL"
32855  arguments="${tmp#* }"
32856
32857  # Input might be given as Windows format, start by converting to
32858  # unix format.
32859  new_path="$path"
32860
32861  windows_path="$new_path"
32862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863    unix_path=`$CYGPATH -u "$windows_path"`
32864    new_path="$unix_path"
32865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867    new_path="$unix_path"
32868  fi
32869
32870
32871  # Now try to locate executable using which
32872  new_path=`$WHICH "$new_path" 2> /dev/null`
32873
32874  if test "x$new_path" = x; then
32875    # Oops. Which didn't find the executable.
32876    # The splitting of arguments from the executable at a space might have been incorrect,
32877    # since paths with space are more likely in Windows. Give it another try with the whole
32878    # argument.
32879    path="$complete"
32880    arguments="EOL"
32881    new_path="$path"
32882
32883  windows_path="$new_path"
32884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32885    unix_path=`$CYGPATH -u "$windows_path"`
32886    new_path="$unix_path"
32887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32889    new_path="$unix_path"
32890  fi
32891
32892
32893    new_path=`$WHICH "$new_path" 2> /dev/null`
32894    # bat and cmd files are not always considered executable in MSYS causing which
32895    # to not find them
32896    if test "x$new_path" = x \
32897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32899      new_path="$path"
32900
32901  windows_path="$new_path"
32902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32903    unix_path=`$CYGPATH -u "$windows_path"`
32904    new_path="$unix_path"
32905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32907    new_path="$unix_path"
32908  fi
32909
32910    fi
32911
32912    if test "x$new_path" = x; then
32913      # It's still not found. Now this is an unrecoverable error.
32914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32915$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32916      has_space=`$ECHO "$complete" | $GREP " "`
32917      if test "x$has_space" != x; then
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32920      fi
32921      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32922    fi
32923  fi
32924
32925  # Now new_path has a complete unix path to the binary
32926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32927    # Keep paths in /bin as-is, but remove trailing .exe if any
32928    new_path="${new_path/%.exe/}"
32929    # Do not save /bin paths to all_fixpath_prefixes!
32930  else
32931    # Not in mixed or Windows style, start by that.
32932    new_path=`cmd //c echo $new_path`
32933
32934  input_path="$new_path"
32935  # Check if we need to convert this using DOS-style short mode. If the path
32936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32937  # take no chances and rewrite it.
32938  # Note: m4 eats our [], so we need to use [ and ] instead.
32939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32940  if test "x$has_forbidden_chars" != x; then
32941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32943  fi
32944
32945    # Output is in $new_path
32946
32947  windows_path="$new_path"
32948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32949    unix_path=`$CYGPATH -u "$windows_path"`
32950    new_path="$unix_path"
32951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32953    new_path="$unix_path"
32954  fi
32955
32956    # remove trailing .exe if any
32957    new_path="${new_path/%.exe/}"
32958
32959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32961  fi
32962
32963    else
32964      # We're on a unix platform. Hooray! :)
32965      # First separate the path from the arguments. This will split at the first
32966      # space.
32967      complete="$CXXCPP"
32968      path="${complete%% *}"
32969      tmp="$complete EOL"
32970      arguments="${tmp#* }"
32971
32972      # Cannot rely on the command "which" here since it doesn't always work.
32973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32974      if test -z "$is_absolute_path"; then
32975        # Path to executable is not absolute. Find it.
32976        IFS_save="$IFS"
32977        IFS=:
32978        for p in $PATH; do
32979          if test -f "$p/$path" && test -x "$p/$path"; then
32980            new_path="$p/$path"
32981            break
32982          fi
32983        done
32984        IFS="$IFS_save"
32985      else
32986        # This is an absolute path, we can use it without further modifications.
32987        new_path="$path"
32988      fi
32989
32990      if test "x$new_path" = x; then
32991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32992$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32993        has_space=`$ECHO "$complete" | $GREP " "`
32994        if test "x$has_space" != x; then
32995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32997        fi
32998        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32999      fi
33000    fi
33001
33002    # Now join together the path and the arguments once again
33003    if test "x$arguments" != xEOL; then
33004      new_complete="$new_path ${arguments% *}"
33005    else
33006      new_complete="$new_path"
33007    fi
33008
33009    if test "x$complete" != "x$new_complete"; then
33010      CXXCPP="$new_complete"
33011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
33012$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
33013    fi
33014  fi
33015
33016
33017  #
33018  # Setup the linker (LD)
33019  #
33020  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33021    # In the Microsoft toolchain we have a separate LD command "link".
33022    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
33023    # a cygwin program for something completely different.
33024    # Extract the first word of "link", so it can be a program name with args.
33025set dummy link; ac_word=$2
33026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33027$as_echo_n "checking for $ac_word... " >&6; }
33028if ${ac_cv_prog_LD+:} false; then :
33029  $as_echo_n "(cached) " >&6
33030else
33031  if test -n "$LD"; then
33032  ac_cv_prog_LD="$LD" # Let the user override the test.
33033else
33034  ac_prog_rejected=no
33035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33036for as_dir in $PATH
33037do
33038  IFS=$as_save_IFS
33039  test -z "$as_dir" && as_dir=.
33040    for ac_exec_ext in '' $ac_executable_extensions; do
33041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33042    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33043       ac_prog_rejected=yes
33044       continue
33045     fi
33046    ac_cv_prog_LD="link"
33047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33048    break 2
33049  fi
33050done
33051  done
33052IFS=$as_save_IFS
33053
33054if test $ac_prog_rejected = yes; then
33055  # We found a bogon in the path, so make sure we never use it.
33056  set dummy $ac_cv_prog_LD
33057  shift
33058  if test $# != 0; then
33059    # We chose a different compiler from the bogus one.
33060    # However, it has the same basename, so the bogon will be chosen
33061    # first if we set LD to just the basename; use the full file name.
33062    shift
33063    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
33064  fi
33065fi
33066fi
33067fi
33068LD=$ac_cv_prog_LD
33069if test -n "$LD"; then
33070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
33071$as_echo "$LD" >&6; }
33072else
33073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33074$as_echo "no" >&6; }
33075fi
33076
33077
33078
33079  # Only process if variable expands to non-empty
33080
33081  if test "x$LD" != x; then
33082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33083
33084  # First separate the path from the arguments. This will split at the first
33085  # space.
33086  complete="$LD"
33087  path="${complete%% *}"
33088  tmp="$complete EOL"
33089  arguments="${tmp#* }"
33090
33091  # Input might be given as Windows format, start by converting to
33092  # unix format.
33093  new_path=`$CYGPATH -u "$path"`
33094
33095  # Now try to locate executable using which
33096  new_path=`$WHICH "$new_path" 2> /dev/null`
33097  # bat and cmd files are not always considered executable in cygwin causing which
33098  # to not find them
33099  if test "x$new_path" = x \
33100      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33101      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33102    new_path=`$CYGPATH -u "$path"`
33103  fi
33104  if test "x$new_path" = x; then
33105    # Oops. Which didn't find the executable.
33106    # The splitting of arguments from the executable at a space might have been incorrect,
33107    # since paths with space are more likely in Windows. Give it another try with the whole
33108    # argument.
33109    path="$complete"
33110    arguments="EOL"
33111    new_path=`$CYGPATH -u "$path"`
33112    new_path=`$WHICH "$new_path" 2> /dev/null`
33113    # bat and cmd files are not always considered executable in cygwin causing which
33114    # to not find them
33115    if test "x$new_path" = x \
33116        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33117        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33118      new_path=`$CYGPATH -u "$path"`
33119    fi
33120    if test "x$new_path" = x; then
33121      # It's still not found. Now this is an unrecoverable error.
33122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33123$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33124      has_space=`$ECHO "$complete" | $GREP " "`
33125      if test "x$has_space" != x; then
33126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33128      fi
33129      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33130    fi
33131  fi
33132
33133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33136  # "foo.exe" is OK but "foo" is an error.
33137  #
33138  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33139  # It is also a way to make sure we got the proper file name for the real test later on.
33140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33141  if test "x$test_shortpath" = x; then
33142    # Short path failed, file does not exist as specified.
33143    # Try adding .exe or .cmd
33144    if test -f "${new_path}.exe"; then
33145      input_to_shortpath="${new_path}.exe"
33146    elif test -f "${new_path}.cmd"; then
33147      input_to_shortpath="${new_path}.cmd"
33148    else
33149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
33150$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
33151      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33152$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33153      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33154    fi
33155  else
33156    input_to_shortpath="$new_path"
33157  fi
33158
33159  # Call helper function which possibly converts this using DOS-style short mode.
33160  # If so, the updated path is stored in $new_path.
33161  new_path="$input_to_shortpath"
33162
33163  input_path="$input_to_shortpath"
33164  # Check if we need to convert this using DOS-style short mode. If the path
33165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33166  # take no chances and rewrite it.
33167  # Note: m4 eats our [], so we need to use [ and ] instead.
33168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33169  if test "x$has_forbidden_chars" != x; then
33170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33174      # Going to short mode and back again did indeed matter. Since short mode is
33175      # case insensitive, let's make it lowercase to improve readability.
33176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33177      # Now convert it back to Unix-style (cygpath)
33178      input_path=`$CYGPATH -u "$shortmode_path"`
33179      new_path="$input_path"
33180    fi
33181  fi
33182
33183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33184  if test "x$test_cygdrive_prefix" = x; then
33185    # As a simple fix, exclude /usr/bin since it's not a real path.
33186    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33188      # a path prefixed by /cygdrive for fixpath to work.
33189      new_path="$CYGWIN_ROOT_PATH$input_path"
33190    fi
33191  fi
33192
33193  # remove trailing .exe if any
33194  new_path="${new_path/%.exe/}"
33195
33196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33197
33198  # First separate the path from the arguments. This will split at the first
33199  # space.
33200  complete="$LD"
33201  path="${complete%% *}"
33202  tmp="$complete EOL"
33203  arguments="${tmp#* }"
33204
33205  # Input might be given as Windows format, start by converting to
33206  # unix format.
33207  new_path="$path"
33208
33209  windows_path="$new_path"
33210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33211    unix_path=`$CYGPATH -u "$windows_path"`
33212    new_path="$unix_path"
33213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33215    new_path="$unix_path"
33216  fi
33217
33218
33219  # Now try to locate executable using which
33220  new_path=`$WHICH "$new_path" 2> /dev/null`
33221
33222  if test "x$new_path" = x; then
33223    # Oops. Which didn't find the executable.
33224    # The splitting of arguments from the executable at a space might have been incorrect,
33225    # since paths with space are more likely in Windows. Give it another try with the whole
33226    # argument.
33227    path="$complete"
33228    arguments="EOL"
33229    new_path="$path"
33230
33231  windows_path="$new_path"
33232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33233    unix_path=`$CYGPATH -u "$windows_path"`
33234    new_path="$unix_path"
33235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33237    new_path="$unix_path"
33238  fi
33239
33240
33241    new_path=`$WHICH "$new_path" 2> /dev/null`
33242    # bat and cmd files are not always considered executable in MSYS causing which
33243    # to not find them
33244    if test "x$new_path" = x \
33245        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33246        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33247      new_path="$path"
33248
33249  windows_path="$new_path"
33250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33251    unix_path=`$CYGPATH -u "$windows_path"`
33252    new_path="$unix_path"
33253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33255    new_path="$unix_path"
33256  fi
33257
33258    fi
33259
33260    if test "x$new_path" = x; then
33261      # It's still not found. Now this is an unrecoverable error.
33262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33263$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33264      has_space=`$ECHO "$complete" | $GREP " "`
33265      if test "x$has_space" != x; then
33266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33268      fi
33269      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33270    fi
33271  fi
33272
33273  # Now new_path has a complete unix path to the binary
33274  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33275    # Keep paths in /bin as-is, but remove trailing .exe if any
33276    new_path="${new_path/%.exe/}"
33277    # Do not save /bin paths to all_fixpath_prefixes!
33278  else
33279    # Not in mixed or Windows style, start by that.
33280    new_path=`cmd //c echo $new_path`
33281
33282  input_path="$new_path"
33283  # Check if we need to convert this using DOS-style short mode. If the path
33284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33285  # take no chances and rewrite it.
33286  # Note: m4 eats our [], so we need to use [ and ] instead.
33287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33288  if test "x$has_forbidden_chars" != x; then
33289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33291  fi
33292
33293    # Output is in $new_path
33294
33295  windows_path="$new_path"
33296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33297    unix_path=`$CYGPATH -u "$windows_path"`
33298    new_path="$unix_path"
33299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33301    new_path="$unix_path"
33302  fi
33303
33304    # remove trailing .exe if any
33305    new_path="${new_path/%.exe/}"
33306
33307    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33308    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33309  fi
33310
33311    else
33312      # We're on a unix platform. Hooray! :)
33313      # First separate the path from the arguments. This will split at the first
33314      # space.
33315      complete="$LD"
33316      path="${complete%% *}"
33317      tmp="$complete EOL"
33318      arguments="${tmp#* }"
33319
33320      # Cannot rely on the command "which" here since it doesn't always work.
33321      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33322      if test -z "$is_absolute_path"; then
33323        # Path to executable is not absolute. Find it.
33324        IFS_save="$IFS"
33325        IFS=:
33326        for p in $PATH; do
33327          if test -f "$p/$path" && test -x "$p/$path"; then
33328            new_path="$p/$path"
33329            break
33330          fi
33331        done
33332        IFS="$IFS_save"
33333      else
33334        # This is an absolute path, we can use it without further modifications.
33335        new_path="$path"
33336      fi
33337
33338      if test "x$new_path" = x; then
33339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33340$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33341        has_space=`$ECHO "$complete" | $GREP " "`
33342        if test "x$has_space" != x; then
33343          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33344$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33345        fi
33346        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33347      fi
33348    fi
33349
33350    # Now join together the path and the arguments once again
33351    if test "x$arguments" != xEOL; then
33352      new_complete="$new_path ${arguments% *}"
33353    else
33354      new_complete="$new_path"
33355    fi
33356
33357    if test "x$complete" != "x$new_complete"; then
33358      LD="$new_complete"
33359      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
33360$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
33361    fi
33362  fi
33363
33364    # Verify that we indeed succeeded with this trick.
33365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33366$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33367    "$LD" --version > /dev/null
33368    if test $? -eq 0 ; then
33369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33370$as_echo "no" >&6; }
33371      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33372    else
33373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33374$as_echo "yes" >&6; }
33375    fi
33376    LDCXX="$LD"
33377  else
33378    # All other toolchains use the compiler to link.
33379    LD="$CC"
33380    LDCXX="$CXX"
33381  fi
33382
33383  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
33384
33385
33386  #
33387  # Setup the assembler (AS)
33388  #
33389  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
33390    # FIXME: should this really be solaris, or solstudio?
33391
33392
33393  # Publish this variable in the help.
33394
33395
33396  if [ -z "${AS+x}" ]; then
33397    # The variable is not set by user, try to locate tool using the code snippet
33398    for ac_prog in as
33399do
33400  # Extract the first word of "$ac_prog", so it can be a program name with args.
33401set dummy $ac_prog; ac_word=$2
33402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33403$as_echo_n "checking for $ac_word... " >&6; }
33404if ${ac_cv_path_AS+:} false; then :
33405  $as_echo_n "(cached) " >&6
33406else
33407  case $AS in
33408  [\\/]* | ?:[\\/]*)
33409  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33410  ;;
33411  *)
33412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33413for as_dir in $PATH
33414do
33415  IFS=$as_save_IFS
33416  test -z "$as_dir" && as_dir=.
33417    for ac_exec_ext in '' $ac_executable_extensions; do
33418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33419    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33421    break 2
33422  fi
33423done
33424  done
33425IFS=$as_save_IFS
33426
33427  ;;
33428esac
33429fi
33430AS=$ac_cv_path_AS
33431if test -n "$AS"; then
33432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33433$as_echo "$AS" >&6; }
33434else
33435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33436$as_echo "no" >&6; }
33437fi
33438
33439
33440  test -n "$AS" && break
33441done
33442
33443  else
33444    # The variable is set, but is it from the command line or the environment?
33445
33446    # Try to remove the string !AS! from our list.
33447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33449      # If it failed, the variable was not from the command line. Ignore it,
33450      # but warn the user (except for BASH, which is always set by the calling BASH).
33451      if test "xAS" != xBASH; then
33452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33453$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33454      fi
33455      # Try to locate tool using the code snippet
33456      for ac_prog in as
33457do
33458  # Extract the first word of "$ac_prog", so it can be a program name with args.
33459set dummy $ac_prog; ac_word=$2
33460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33461$as_echo_n "checking for $ac_word... " >&6; }
33462if ${ac_cv_path_AS+:} false; then :
33463  $as_echo_n "(cached) " >&6
33464else
33465  case $AS in
33466  [\\/]* | ?:[\\/]*)
33467  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33468  ;;
33469  *)
33470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33471for as_dir in $PATH
33472do
33473  IFS=$as_save_IFS
33474  test -z "$as_dir" && as_dir=.
33475    for ac_exec_ext in '' $ac_executable_extensions; do
33476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33477    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33479    break 2
33480  fi
33481done
33482  done
33483IFS=$as_save_IFS
33484
33485  ;;
33486esac
33487fi
33488AS=$ac_cv_path_AS
33489if test -n "$AS"; then
33490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33491$as_echo "$AS" >&6; }
33492else
33493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33494$as_echo "no" >&6; }
33495fi
33496
33497
33498  test -n "$AS" && break
33499done
33500
33501    else
33502      # If it succeeded, then it was overridden by the user. We will use it
33503      # for the tool.
33504
33505      # First remove it from the list of overridden variables, so we can test
33506      # for unknown variables in the end.
33507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33508
33509      # Check if we try to supply an empty value
33510      if test "x$AS" = x; then
33511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
33512$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
33513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33514$as_echo_n "checking for AS... " >&6; }
33515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
33516$as_echo "disabled" >&6; }
33517      else
33518        # Check if the provided tool contains a complete path.
33519        tool_specified="$AS"
33520        tool_basename="${tool_specified##*/}"
33521        if test "x$tool_basename" = "x$tool_specified"; then
33522          # A command without a complete path is provided, search $PATH.
33523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33524$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33525          # Extract the first word of "$tool_basename", so it can be a program name with args.
33526set dummy $tool_basename; ac_word=$2
33527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33528$as_echo_n "checking for $ac_word... " >&6; }
33529if ${ac_cv_path_AS+:} false; then :
33530  $as_echo_n "(cached) " >&6
33531else
33532  case $AS in
33533  [\\/]* | ?:[\\/]*)
33534  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33535  ;;
33536  *)
33537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33538for as_dir in $PATH
33539do
33540  IFS=$as_save_IFS
33541  test -z "$as_dir" && as_dir=.
33542    for ac_exec_ext in '' $ac_executable_extensions; do
33543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33544    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33546    break 2
33547  fi
33548done
33549  done
33550IFS=$as_save_IFS
33551
33552  ;;
33553esac
33554fi
33555AS=$ac_cv_path_AS
33556if test -n "$AS"; then
33557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33558$as_echo "$AS" >&6; }
33559else
33560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33561$as_echo "no" >&6; }
33562fi
33563
33564
33565          if test "x$AS" = x; then
33566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33567          fi
33568        else
33569          # Otherwise we believe it is a complete path. Use it as it is.
33570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33571$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33573$as_echo_n "checking for AS... " >&6; }
33574          if test ! -x "$tool_specified"; then
33575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33576$as_echo "not found" >&6; }
33577            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33578          fi
33579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33580$as_echo "$tool_specified" >&6; }
33581        fi
33582      fi
33583    fi
33584  fi
33585
33586
33587
33588  # Only process if variable expands to non-empty
33589
33590  if test "x$AS" != x; then
33591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33592
33593  # First separate the path from the arguments. This will split at the first
33594  # space.
33595  complete="$AS"
33596  path="${complete%% *}"
33597  tmp="$complete EOL"
33598  arguments="${tmp#* }"
33599
33600  # Input might be given as Windows format, start by converting to
33601  # unix format.
33602  new_path=`$CYGPATH -u "$path"`
33603
33604  # Now try to locate executable using which
33605  new_path=`$WHICH "$new_path" 2> /dev/null`
33606  # bat and cmd files are not always considered executable in cygwin causing which
33607  # to not find them
33608  if test "x$new_path" = x \
33609      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33610      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33611    new_path=`$CYGPATH -u "$path"`
33612  fi
33613  if test "x$new_path" = x; then
33614    # Oops. Which didn't find the executable.
33615    # The splitting of arguments from the executable at a space might have been incorrect,
33616    # since paths with space are more likely in Windows. Give it another try with the whole
33617    # argument.
33618    path="$complete"
33619    arguments="EOL"
33620    new_path=`$CYGPATH -u "$path"`
33621    new_path=`$WHICH "$new_path" 2> /dev/null`
33622    # bat and cmd files are not always considered executable in cygwin causing which
33623    # to not find them
33624    if test "x$new_path" = x \
33625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33627      new_path=`$CYGPATH -u "$path"`
33628    fi
33629    if test "x$new_path" = x; then
33630      # It's still not found. Now this is an unrecoverable error.
33631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33632$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33633      has_space=`$ECHO "$complete" | $GREP " "`
33634      if test "x$has_space" != x; then
33635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33637      fi
33638      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33639    fi
33640  fi
33641
33642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33645  # "foo.exe" is OK but "foo" is an error.
33646  #
33647  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33648  # It is also a way to make sure we got the proper file name for the real test later on.
33649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33650  if test "x$test_shortpath" = x; then
33651    # Short path failed, file does not exist as specified.
33652    # Try adding .exe or .cmd
33653    if test -f "${new_path}.exe"; then
33654      input_to_shortpath="${new_path}.exe"
33655    elif test -f "${new_path}.cmd"; then
33656      input_to_shortpath="${new_path}.cmd"
33657    else
33658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33659$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33662      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33663    fi
33664  else
33665    input_to_shortpath="$new_path"
33666  fi
33667
33668  # Call helper function which possibly converts this using DOS-style short mode.
33669  # If so, the updated path is stored in $new_path.
33670  new_path="$input_to_shortpath"
33671
33672  input_path="$input_to_shortpath"
33673  # Check if we need to convert this using DOS-style short mode. If the path
33674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33675  # take no chances and rewrite it.
33676  # Note: m4 eats our [], so we need to use [ and ] instead.
33677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33678  if test "x$has_forbidden_chars" != x; then
33679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33683      # Going to short mode and back again did indeed matter. Since short mode is
33684      # case insensitive, let's make it lowercase to improve readability.
33685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33686      # Now convert it back to Unix-style (cygpath)
33687      input_path=`$CYGPATH -u "$shortmode_path"`
33688      new_path="$input_path"
33689    fi
33690  fi
33691
33692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33693  if test "x$test_cygdrive_prefix" = x; then
33694    # As a simple fix, exclude /usr/bin since it's not a real path.
33695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33697      # a path prefixed by /cygdrive for fixpath to work.
33698      new_path="$CYGWIN_ROOT_PATH$input_path"
33699    fi
33700  fi
33701
33702  # remove trailing .exe if any
33703  new_path="${new_path/%.exe/}"
33704
33705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33706
33707  # First separate the path from the arguments. This will split at the first
33708  # space.
33709  complete="$AS"
33710  path="${complete%% *}"
33711  tmp="$complete EOL"
33712  arguments="${tmp#* }"
33713
33714  # Input might be given as Windows format, start by converting to
33715  # unix format.
33716  new_path="$path"
33717
33718  windows_path="$new_path"
33719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33720    unix_path=`$CYGPATH -u "$windows_path"`
33721    new_path="$unix_path"
33722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33724    new_path="$unix_path"
33725  fi
33726
33727
33728  # Now try to locate executable using which
33729  new_path=`$WHICH "$new_path" 2> /dev/null`
33730
33731  if test "x$new_path" = x; then
33732    # Oops. Which didn't find the executable.
33733    # The splitting of arguments from the executable at a space might have been incorrect,
33734    # since paths with space are more likely in Windows. Give it another try with the whole
33735    # argument.
33736    path="$complete"
33737    arguments="EOL"
33738    new_path="$path"
33739
33740  windows_path="$new_path"
33741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33742    unix_path=`$CYGPATH -u "$windows_path"`
33743    new_path="$unix_path"
33744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33746    new_path="$unix_path"
33747  fi
33748
33749
33750    new_path=`$WHICH "$new_path" 2> /dev/null`
33751    # bat and cmd files are not always considered executable in MSYS causing which
33752    # to not find them
33753    if test "x$new_path" = x \
33754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33756      new_path="$path"
33757
33758  windows_path="$new_path"
33759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33760    unix_path=`$CYGPATH -u "$windows_path"`
33761    new_path="$unix_path"
33762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33764    new_path="$unix_path"
33765  fi
33766
33767    fi
33768
33769    if test "x$new_path" = x; then
33770      # It's still not found. Now this is an unrecoverable error.
33771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33772$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33773      has_space=`$ECHO "$complete" | $GREP " "`
33774      if test "x$has_space" != x; then
33775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33777      fi
33778      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33779    fi
33780  fi
33781
33782  # Now new_path has a complete unix path to the binary
33783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33784    # Keep paths in /bin as-is, but remove trailing .exe if any
33785    new_path="${new_path/%.exe/}"
33786    # Do not save /bin paths to all_fixpath_prefixes!
33787  else
33788    # Not in mixed or Windows style, start by that.
33789    new_path=`cmd //c echo $new_path`
33790
33791  input_path="$new_path"
33792  # Check if we need to convert this using DOS-style short mode. If the path
33793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33794  # take no chances and rewrite it.
33795  # Note: m4 eats our [], so we need to use [ and ] instead.
33796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33797  if test "x$has_forbidden_chars" != x; then
33798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33800  fi
33801
33802    # Output is in $new_path
33803
33804  windows_path="$new_path"
33805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33806    unix_path=`$CYGPATH -u "$windows_path"`
33807    new_path="$unix_path"
33808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33810    new_path="$unix_path"
33811  fi
33812
33813    # remove trailing .exe if any
33814    new_path="${new_path/%.exe/}"
33815
33816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33818  fi
33819
33820    else
33821      # We're on a unix platform. Hooray! :)
33822      # First separate the path from the arguments. This will split at the first
33823      # space.
33824      complete="$AS"
33825      path="${complete%% *}"
33826      tmp="$complete EOL"
33827      arguments="${tmp#* }"
33828
33829      # Cannot rely on the command "which" here since it doesn't always work.
33830      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33831      if test -z "$is_absolute_path"; then
33832        # Path to executable is not absolute. Find it.
33833        IFS_save="$IFS"
33834        IFS=:
33835        for p in $PATH; do
33836          if test -f "$p/$path" && test -x "$p/$path"; then
33837            new_path="$p/$path"
33838            break
33839          fi
33840        done
33841        IFS="$IFS_save"
33842      else
33843        # This is an absolute path, we can use it without further modifications.
33844        new_path="$path"
33845      fi
33846
33847      if test "x$new_path" = x; then
33848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33849$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33850        has_space=`$ECHO "$complete" | $GREP " "`
33851        if test "x$has_space" != x; then
33852          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33853$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33854        fi
33855        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33856      fi
33857    fi
33858
33859    # Now join together the path and the arguments once again
33860    if test "x$arguments" != xEOL; then
33861      new_complete="$new_path ${arguments% *}"
33862    else
33863      new_complete="$new_path"
33864    fi
33865
33866    if test "x$complete" != "x$new_complete"; then
33867      AS="$new_complete"
33868      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33869$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33870    fi
33871  fi
33872
33873  else
33874    # FIXME: is this correct for microsoft?
33875    AS="$CC -c"
33876  fi
33877
33878
33879  #
33880  # Setup the archiver (AR)
33881  #
33882  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33883    # The corresponding ar tool is lib.exe (used to create static libraries)
33884    # Extract the first word of "lib", so it can be a program name with args.
33885set dummy lib; ac_word=$2
33886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33887$as_echo_n "checking for $ac_word... " >&6; }
33888if ${ac_cv_prog_AR+:} false; then :
33889  $as_echo_n "(cached) " >&6
33890else
33891  if test -n "$AR"; then
33892  ac_cv_prog_AR="$AR" # Let the user override the test.
33893else
33894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33895for as_dir in $PATH
33896do
33897  IFS=$as_save_IFS
33898  test -z "$as_dir" && as_dir=.
33899    for ac_exec_ext in '' $ac_executable_extensions; do
33900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33901    ac_cv_prog_AR="lib"
33902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33903    break 2
33904  fi
33905done
33906  done
33907IFS=$as_save_IFS
33908
33909fi
33910fi
33911AR=$ac_cv_prog_AR
33912if test -n "$AR"; then
33913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33914$as_echo "$AR" >&6; }
33915else
33916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917$as_echo "no" >&6; }
33918fi
33919
33920
33921  else
33922
33923
33924  # Publish this variable in the help.
33925
33926
33927  if [ -z "${AR+x}" ]; then
33928    # The variable is not set by user, try to locate tool using the code snippet
33929    if test -n "$ac_tool_prefix"; then
33930  for ac_prog in ar
33931  do
33932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33935$as_echo_n "checking for $ac_word... " >&6; }
33936if ${ac_cv_prog_AR+:} false; then :
33937  $as_echo_n "(cached) " >&6
33938else
33939  if test -n "$AR"; then
33940  ac_cv_prog_AR="$AR" # Let the user override the test.
33941else
33942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33943for as_dir in $PATH
33944do
33945  IFS=$as_save_IFS
33946  test -z "$as_dir" && as_dir=.
33947    for ac_exec_ext in '' $ac_executable_extensions; do
33948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33949    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33951    break 2
33952  fi
33953done
33954  done
33955IFS=$as_save_IFS
33956
33957fi
33958fi
33959AR=$ac_cv_prog_AR
33960if test -n "$AR"; then
33961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33962$as_echo "$AR" >&6; }
33963else
33964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33965$as_echo "no" >&6; }
33966fi
33967
33968
33969    test -n "$AR" && break
33970  done
33971fi
33972if test -z "$AR"; then
33973  ac_ct_AR=$AR
33974  for ac_prog in ar
33975do
33976  # Extract the first word of "$ac_prog", so it can be a program name with args.
33977set dummy $ac_prog; ac_word=$2
33978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33979$as_echo_n "checking for $ac_word... " >&6; }
33980if ${ac_cv_prog_ac_ct_AR+:} false; then :
33981  $as_echo_n "(cached) " >&6
33982else
33983  if test -n "$ac_ct_AR"; then
33984  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33985else
33986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33987for as_dir in $PATH
33988do
33989  IFS=$as_save_IFS
33990  test -z "$as_dir" && as_dir=.
33991    for ac_exec_ext in '' $ac_executable_extensions; do
33992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33993    ac_cv_prog_ac_ct_AR="$ac_prog"
33994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33995    break 2
33996  fi
33997done
33998  done
33999IFS=$as_save_IFS
34000
34001fi
34002fi
34003ac_ct_AR=$ac_cv_prog_ac_ct_AR
34004if test -n "$ac_ct_AR"; then
34005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34006$as_echo "$ac_ct_AR" >&6; }
34007else
34008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34009$as_echo "no" >&6; }
34010fi
34011
34012
34013  test -n "$ac_ct_AR" && break
34014done
34015
34016  if test "x$ac_ct_AR" = x; then
34017    AR=""
34018  else
34019    case $cross_compiling:$ac_tool_warned in
34020yes:)
34021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34023ac_tool_warned=yes ;;
34024esac
34025    AR=$ac_ct_AR
34026  fi
34027fi
34028
34029  else
34030    # The variable is set, but is it from the command line or the environment?
34031
34032    # Try to remove the string !AR! from our list.
34033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
34034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34035      # If it failed, the variable was not from the command line. Ignore it,
34036      # but warn the user (except for BASH, which is always set by the calling BASH).
34037      if test "xAR" != xBASH; then
34038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
34039$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
34040      fi
34041      # Try to locate tool using the code snippet
34042      if test -n "$ac_tool_prefix"; then
34043  for ac_prog in ar
34044  do
34045    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34048$as_echo_n "checking for $ac_word... " >&6; }
34049if ${ac_cv_prog_AR+:} false; then :
34050  $as_echo_n "(cached) " >&6
34051else
34052  if test -n "$AR"; then
34053  ac_cv_prog_AR="$AR" # Let the user override the test.
34054else
34055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34056for as_dir in $PATH
34057do
34058  IFS=$as_save_IFS
34059  test -z "$as_dir" && as_dir=.
34060    for ac_exec_ext in '' $ac_executable_extensions; do
34061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34062    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
34063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34064    break 2
34065  fi
34066done
34067  done
34068IFS=$as_save_IFS
34069
34070fi
34071fi
34072AR=$ac_cv_prog_AR
34073if test -n "$AR"; then
34074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34075$as_echo "$AR" >&6; }
34076else
34077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34078$as_echo "no" >&6; }
34079fi
34080
34081
34082    test -n "$AR" && break
34083  done
34084fi
34085if test -z "$AR"; then
34086  ac_ct_AR=$AR
34087  for ac_prog in ar
34088do
34089  # Extract the first word of "$ac_prog", so it can be a program name with args.
34090set dummy $ac_prog; ac_word=$2
34091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34092$as_echo_n "checking for $ac_word... " >&6; }
34093if ${ac_cv_prog_ac_ct_AR+:} false; then :
34094  $as_echo_n "(cached) " >&6
34095else
34096  if test -n "$ac_ct_AR"; then
34097  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
34098else
34099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34100for as_dir in $PATH
34101do
34102  IFS=$as_save_IFS
34103  test -z "$as_dir" && as_dir=.
34104    for ac_exec_ext in '' $ac_executable_extensions; do
34105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34106    ac_cv_prog_ac_ct_AR="$ac_prog"
34107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34108    break 2
34109  fi
34110done
34111  done
34112IFS=$as_save_IFS
34113
34114fi
34115fi
34116ac_ct_AR=$ac_cv_prog_ac_ct_AR
34117if test -n "$ac_ct_AR"; then
34118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34119$as_echo "$ac_ct_AR" >&6; }
34120else
34121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34122$as_echo "no" >&6; }
34123fi
34124
34125
34126  test -n "$ac_ct_AR" && break
34127done
34128
34129  if test "x$ac_ct_AR" = x; then
34130    AR=""
34131  else
34132    case $cross_compiling:$ac_tool_warned in
34133yes:)
34134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34136ac_tool_warned=yes ;;
34137esac
34138    AR=$ac_ct_AR
34139  fi
34140fi
34141
34142    else
34143      # If it succeeded, then it was overridden by the user. We will use it
34144      # for the tool.
34145
34146      # First remove it from the list of overridden variables, so we can test
34147      # for unknown variables in the end.
34148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34149
34150      # Check if we try to supply an empty value
34151      if test "x$AR" = x; then
34152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
34153$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
34154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34155$as_echo_n "checking for AR... " >&6; }
34156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34157$as_echo "disabled" >&6; }
34158      else
34159        # Check if the provided tool contains a complete path.
34160        tool_specified="$AR"
34161        tool_basename="${tool_specified##*/}"
34162        if test "x$tool_basename" = "x$tool_specified"; then
34163          # A command without a complete path is provided, search $PATH.
34164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
34165$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
34166          # Extract the first word of "$tool_basename", so it can be a program name with args.
34167set dummy $tool_basename; ac_word=$2
34168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34169$as_echo_n "checking for $ac_word... " >&6; }
34170if ${ac_cv_path_AR+:} false; then :
34171  $as_echo_n "(cached) " >&6
34172else
34173  case $AR in
34174  [\\/]* | ?:[\\/]*)
34175  ac_cv_path_AR="$AR" # Let the user override the test with a path.
34176  ;;
34177  *)
34178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34179for as_dir in $PATH
34180do
34181  IFS=$as_save_IFS
34182  test -z "$as_dir" && as_dir=.
34183    for ac_exec_ext in '' $ac_executable_extensions; do
34184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34185    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
34186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34187    break 2
34188  fi
34189done
34190  done
34191IFS=$as_save_IFS
34192
34193  ;;
34194esac
34195fi
34196AR=$ac_cv_path_AR
34197if test -n "$AR"; then
34198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34199$as_echo "$AR" >&6; }
34200else
34201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34202$as_echo "no" >&6; }
34203fi
34204
34205
34206          if test "x$AR" = x; then
34207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34208          fi
34209        else
34210          # Otherwise we believe it is a complete path. Use it as it is.
34211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
34212$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
34213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34214$as_echo_n "checking for AR... " >&6; }
34215          if test ! -x "$tool_specified"; then
34216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34217$as_echo "not found" >&6; }
34218            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
34219          fi
34220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34221$as_echo "$tool_specified" >&6; }
34222        fi
34223      fi
34224    fi
34225  fi
34226
34227
34228  fi
34229
34230  # Only process if variable expands to non-empty
34231
34232  if test "x$AR" != x; then
34233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34234
34235  # First separate the path from the arguments. This will split at the first
34236  # space.
34237  complete="$AR"
34238  path="${complete%% *}"
34239  tmp="$complete EOL"
34240  arguments="${tmp#* }"
34241
34242  # Input might be given as Windows format, start by converting to
34243  # unix format.
34244  new_path=`$CYGPATH -u "$path"`
34245
34246  # Now try to locate executable using which
34247  new_path=`$WHICH "$new_path" 2> /dev/null`
34248  # bat and cmd files are not always considered executable in cygwin causing which
34249  # to not find them
34250  if test "x$new_path" = x \
34251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34253    new_path=`$CYGPATH -u "$path"`
34254  fi
34255  if test "x$new_path" = x; then
34256    # Oops. Which didn't find the executable.
34257    # The splitting of arguments from the executable at a space might have been incorrect,
34258    # since paths with space are more likely in Windows. Give it another try with the whole
34259    # argument.
34260    path="$complete"
34261    arguments="EOL"
34262    new_path=`$CYGPATH -u "$path"`
34263    new_path=`$WHICH "$new_path" 2> /dev/null`
34264    # bat and cmd files are not always considered executable in cygwin causing which
34265    # to not find them
34266    if test "x$new_path" = x \
34267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34269      new_path=`$CYGPATH -u "$path"`
34270    fi
34271    if test "x$new_path" = x; then
34272      # It's still not found. Now this is an unrecoverable error.
34273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34274$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34275      has_space=`$ECHO "$complete" | $GREP " "`
34276      if test "x$has_space" != x; then
34277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34279      fi
34280      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34281    fi
34282  fi
34283
34284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34287  # "foo.exe" is OK but "foo" is an error.
34288  #
34289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34290  # It is also a way to make sure we got the proper file name for the real test later on.
34291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34292  if test "x$test_shortpath" = x; then
34293    # Short path failed, file does not exist as specified.
34294    # Try adding .exe or .cmd
34295    if test -f "${new_path}.exe"; then
34296      input_to_shortpath="${new_path}.exe"
34297    elif test -f "${new_path}.cmd"; then
34298      input_to_shortpath="${new_path}.cmd"
34299    else
34300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
34301$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
34302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34304      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34305    fi
34306  else
34307    input_to_shortpath="$new_path"
34308  fi
34309
34310  # Call helper function which possibly converts this using DOS-style short mode.
34311  # If so, the updated path is stored in $new_path.
34312  new_path="$input_to_shortpath"
34313
34314  input_path="$input_to_shortpath"
34315  # Check if we need to convert this using DOS-style short mode. If the path
34316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34317  # take no chances and rewrite it.
34318  # Note: m4 eats our [], so we need to use [ and ] instead.
34319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34320  if test "x$has_forbidden_chars" != x; then
34321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34325      # Going to short mode and back again did indeed matter. Since short mode is
34326      # case insensitive, let's make it lowercase to improve readability.
34327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34328      # Now convert it back to Unix-style (cygpath)
34329      input_path=`$CYGPATH -u "$shortmode_path"`
34330      new_path="$input_path"
34331    fi
34332  fi
34333
34334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34335  if test "x$test_cygdrive_prefix" = x; then
34336    # As a simple fix, exclude /usr/bin since it's not a real path.
34337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34339      # a path prefixed by /cygdrive for fixpath to work.
34340      new_path="$CYGWIN_ROOT_PATH$input_path"
34341    fi
34342  fi
34343
34344  # remove trailing .exe if any
34345  new_path="${new_path/%.exe/}"
34346
34347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34348
34349  # First separate the path from the arguments. This will split at the first
34350  # space.
34351  complete="$AR"
34352  path="${complete%% *}"
34353  tmp="$complete EOL"
34354  arguments="${tmp#* }"
34355
34356  # Input might be given as Windows format, start by converting to
34357  # unix format.
34358  new_path="$path"
34359
34360  windows_path="$new_path"
34361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34362    unix_path=`$CYGPATH -u "$windows_path"`
34363    new_path="$unix_path"
34364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34366    new_path="$unix_path"
34367  fi
34368
34369
34370  # Now try to locate executable using which
34371  new_path=`$WHICH "$new_path" 2> /dev/null`
34372
34373  if test "x$new_path" = x; then
34374    # Oops. Which didn't find the executable.
34375    # The splitting of arguments from the executable at a space might have been incorrect,
34376    # since paths with space are more likely in Windows. Give it another try with the whole
34377    # argument.
34378    path="$complete"
34379    arguments="EOL"
34380    new_path="$path"
34381
34382  windows_path="$new_path"
34383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34384    unix_path=`$CYGPATH -u "$windows_path"`
34385    new_path="$unix_path"
34386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34388    new_path="$unix_path"
34389  fi
34390
34391
34392    new_path=`$WHICH "$new_path" 2> /dev/null`
34393    # bat and cmd files are not always considered executable in MSYS causing which
34394    # to not find them
34395    if test "x$new_path" = x \
34396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34398      new_path="$path"
34399
34400  windows_path="$new_path"
34401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34402    unix_path=`$CYGPATH -u "$windows_path"`
34403    new_path="$unix_path"
34404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34406    new_path="$unix_path"
34407  fi
34408
34409    fi
34410
34411    if test "x$new_path" = x; then
34412      # It's still not found. Now this is an unrecoverable error.
34413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34414$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34415      has_space=`$ECHO "$complete" | $GREP " "`
34416      if test "x$has_space" != x; then
34417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34419      fi
34420      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34421    fi
34422  fi
34423
34424  # Now new_path has a complete unix path to the binary
34425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34426    # Keep paths in /bin as-is, but remove trailing .exe if any
34427    new_path="${new_path/%.exe/}"
34428    # Do not save /bin paths to all_fixpath_prefixes!
34429  else
34430    # Not in mixed or Windows style, start by that.
34431    new_path=`cmd //c echo $new_path`
34432
34433  input_path="$new_path"
34434  # Check if we need to convert this using DOS-style short mode. If the path
34435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34436  # take no chances and rewrite it.
34437  # Note: m4 eats our [], so we need to use [ and ] instead.
34438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34439  if test "x$has_forbidden_chars" != x; then
34440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34442  fi
34443
34444    # Output is in $new_path
34445
34446  windows_path="$new_path"
34447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34448    unix_path=`$CYGPATH -u "$windows_path"`
34449    new_path="$unix_path"
34450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34452    new_path="$unix_path"
34453  fi
34454
34455    # remove trailing .exe if any
34456    new_path="${new_path/%.exe/}"
34457
34458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34460  fi
34461
34462    else
34463      # We're on a unix platform. Hooray! :)
34464      # First separate the path from the arguments. This will split at the first
34465      # space.
34466      complete="$AR"
34467      path="${complete%% *}"
34468      tmp="$complete EOL"
34469      arguments="${tmp#* }"
34470
34471      # Cannot rely on the command "which" here since it doesn't always work.
34472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34473      if test -z "$is_absolute_path"; then
34474        # Path to executable is not absolute. Find it.
34475        IFS_save="$IFS"
34476        IFS=:
34477        for p in $PATH; do
34478          if test -f "$p/$path" && test -x "$p/$path"; then
34479            new_path="$p/$path"
34480            break
34481          fi
34482        done
34483        IFS="$IFS_save"
34484      else
34485        # This is an absolute path, we can use it without further modifications.
34486        new_path="$path"
34487      fi
34488
34489      if test "x$new_path" = x; then
34490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34491$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34492        has_space=`$ECHO "$complete" | $GREP " "`
34493        if test "x$has_space" != x; then
34494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34496        fi
34497        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34498      fi
34499    fi
34500
34501    # Now join together the path and the arguments once again
34502    if test "x$arguments" != xEOL; then
34503      new_complete="$new_path ${arguments% *}"
34504    else
34505      new_complete="$new_path"
34506    fi
34507
34508    if test "x$complete" != "x$new_complete"; then
34509      AR="$new_complete"
34510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34511$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34512    fi
34513  fi
34514
34515
34516
34517  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34518
34519
34520  # Publish this variable in the help.
34521
34522
34523  if [ -z "${LIPO+x}" ]; then
34524    # The variable is not set by user, try to locate tool using the code snippet
34525    for ac_prog in lipo
34526do
34527  # Extract the first word of "$ac_prog", so it can be a program name with args.
34528set dummy $ac_prog; ac_word=$2
34529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34530$as_echo_n "checking for $ac_word... " >&6; }
34531if ${ac_cv_path_LIPO+:} false; then :
34532  $as_echo_n "(cached) " >&6
34533else
34534  case $LIPO in
34535  [\\/]* | ?:[\\/]*)
34536  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34537  ;;
34538  *)
34539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34540for as_dir in $PATH
34541do
34542  IFS=$as_save_IFS
34543  test -z "$as_dir" && as_dir=.
34544    for ac_exec_ext in '' $ac_executable_extensions; do
34545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34546    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34548    break 2
34549  fi
34550done
34551  done
34552IFS=$as_save_IFS
34553
34554  ;;
34555esac
34556fi
34557LIPO=$ac_cv_path_LIPO
34558if test -n "$LIPO"; then
34559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34560$as_echo "$LIPO" >&6; }
34561else
34562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34563$as_echo "no" >&6; }
34564fi
34565
34566
34567  test -n "$LIPO" && break
34568done
34569
34570  else
34571    # The variable is set, but is it from the command line or the environment?
34572
34573    # Try to remove the string !LIPO! from our list.
34574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34576      # If it failed, the variable was not from the command line. Ignore it,
34577      # but warn the user (except for BASH, which is always set by the calling BASH).
34578      if test "xLIPO" != xBASH; then
34579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34580$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34581      fi
34582      # Try to locate tool using the code snippet
34583      for ac_prog in lipo
34584do
34585  # Extract the first word of "$ac_prog", so it can be a program name with args.
34586set dummy $ac_prog; ac_word=$2
34587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34588$as_echo_n "checking for $ac_word... " >&6; }
34589if ${ac_cv_path_LIPO+:} false; then :
34590  $as_echo_n "(cached) " >&6
34591else
34592  case $LIPO in
34593  [\\/]* | ?:[\\/]*)
34594  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34595  ;;
34596  *)
34597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34598for as_dir in $PATH
34599do
34600  IFS=$as_save_IFS
34601  test -z "$as_dir" && as_dir=.
34602    for ac_exec_ext in '' $ac_executable_extensions; do
34603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34604    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34606    break 2
34607  fi
34608done
34609  done
34610IFS=$as_save_IFS
34611
34612  ;;
34613esac
34614fi
34615LIPO=$ac_cv_path_LIPO
34616if test -n "$LIPO"; then
34617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34618$as_echo "$LIPO" >&6; }
34619else
34620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34621$as_echo "no" >&6; }
34622fi
34623
34624
34625  test -n "$LIPO" && break
34626done
34627
34628    else
34629      # If it succeeded, then it was overridden by the user. We will use it
34630      # for the tool.
34631
34632      # First remove it from the list of overridden variables, so we can test
34633      # for unknown variables in the end.
34634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34635
34636      # Check if we try to supply an empty value
34637      if test "x$LIPO" = x; then
34638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
34639$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
34640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34641$as_echo_n "checking for LIPO... " >&6; }
34642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34643$as_echo "disabled" >&6; }
34644      else
34645        # Check if the provided tool contains a complete path.
34646        tool_specified="$LIPO"
34647        tool_basename="${tool_specified##*/}"
34648        if test "x$tool_basename" = "x$tool_specified"; then
34649          # A command without a complete path is provided, search $PATH.
34650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34651$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34652          # Extract the first word of "$tool_basename", so it can be a program name with args.
34653set dummy $tool_basename; ac_word=$2
34654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34655$as_echo_n "checking for $ac_word... " >&6; }
34656if ${ac_cv_path_LIPO+:} false; then :
34657  $as_echo_n "(cached) " >&6
34658else
34659  case $LIPO in
34660  [\\/]* | ?:[\\/]*)
34661  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34662  ;;
34663  *)
34664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34665for as_dir in $PATH
34666do
34667  IFS=$as_save_IFS
34668  test -z "$as_dir" && as_dir=.
34669    for ac_exec_ext in '' $ac_executable_extensions; do
34670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34671    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34673    break 2
34674  fi
34675done
34676  done
34677IFS=$as_save_IFS
34678
34679  ;;
34680esac
34681fi
34682LIPO=$ac_cv_path_LIPO
34683if test -n "$LIPO"; then
34684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34685$as_echo "$LIPO" >&6; }
34686else
34687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34688$as_echo "no" >&6; }
34689fi
34690
34691
34692          if test "x$LIPO" = x; then
34693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34694          fi
34695        else
34696          # Otherwise we believe it is a complete path. Use it as it is.
34697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34698$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34700$as_echo_n "checking for LIPO... " >&6; }
34701          if test ! -x "$tool_specified"; then
34702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34703$as_echo "not found" >&6; }
34704            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34705          fi
34706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34707$as_echo "$tool_specified" >&6; }
34708        fi
34709      fi
34710    fi
34711  fi
34712
34713
34714
34715  # Only process if variable expands to non-empty
34716
34717  if test "x$LIPO" != x; then
34718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34719
34720  # First separate the path from the arguments. This will split at the first
34721  # space.
34722  complete="$LIPO"
34723  path="${complete%% *}"
34724  tmp="$complete EOL"
34725  arguments="${tmp#* }"
34726
34727  # Input might be given as Windows format, start by converting to
34728  # unix format.
34729  new_path=`$CYGPATH -u "$path"`
34730
34731  # Now try to locate executable using which
34732  new_path=`$WHICH "$new_path" 2> /dev/null`
34733  # bat and cmd files are not always considered executable in cygwin causing which
34734  # to not find them
34735  if test "x$new_path" = x \
34736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34738    new_path=`$CYGPATH -u "$path"`
34739  fi
34740  if test "x$new_path" = x; then
34741    # Oops. Which didn't find the executable.
34742    # The splitting of arguments from the executable at a space might have been incorrect,
34743    # since paths with space are more likely in Windows. Give it another try with the whole
34744    # argument.
34745    path="$complete"
34746    arguments="EOL"
34747    new_path=`$CYGPATH -u "$path"`
34748    new_path=`$WHICH "$new_path" 2> /dev/null`
34749    # bat and cmd files are not always considered executable in cygwin causing which
34750    # to not find them
34751    if test "x$new_path" = x \
34752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34754      new_path=`$CYGPATH -u "$path"`
34755    fi
34756    if test "x$new_path" = x; then
34757      # It's still not found. Now this is an unrecoverable error.
34758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34759$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34760      has_space=`$ECHO "$complete" | $GREP " "`
34761      if test "x$has_space" != x; then
34762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34764      fi
34765      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34766    fi
34767  fi
34768
34769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34772  # "foo.exe" is OK but "foo" is an error.
34773  #
34774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34775  # It is also a way to make sure we got the proper file name for the real test later on.
34776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34777  if test "x$test_shortpath" = x; then
34778    # Short path failed, file does not exist as specified.
34779    # Try adding .exe or .cmd
34780    if test -f "${new_path}.exe"; then
34781      input_to_shortpath="${new_path}.exe"
34782    elif test -f "${new_path}.cmd"; then
34783      input_to_shortpath="${new_path}.cmd"
34784    else
34785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34786$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34789      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34790    fi
34791  else
34792    input_to_shortpath="$new_path"
34793  fi
34794
34795  # Call helper function which possibly converts this using DOS-style short mode.
34796  # If so, the updated path is stored in $new_path.
34797  new_path="$input_to_shortpath"
34798
34799  input_path="$input_to_shortpath"
34800  # Check if we need to convert this using DOS-style short mode. If the path
34801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34802  # take no chances and rewrite it.
34803  # Note: m4 eats our [], so we need to use [ and ] instead.
34804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34805  if test "x$has_forbidden_chars" != x; then
34806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34810      # Going to short mode and back again did indeed matter. Since short mode is
34811      # case insensitive, let's make it lowercase to improve readability.
34812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34813      # Now convert it back to Unix-style (cygpath)
34814      input_path=`$CYGPATH -u "$shortmode_path"`
34815      new_path="$input_path"
34816    fi
34817  fi
34818
34819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34820  if test "x$test_cygdrive_prefix" = x; then
34821    # As a simple fix, exclude /usr/bin since it's not a real path.
34822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34824      # a path prefixed by /cygdrive for fixpath to work.
34825      new_path="$CYGWIN_ROOT_PATH$input_path"
34826    fi
34827  fi
34828
34829  # remove trailing .exe if any
34830  new_path="${new_path/%.exe/}"
34831
34832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34833
34834  # First separate the path from the arguments. This will split at the first
34835  # space.
34836  complete="$LIPO"
34837  path="${complete%% *}"
34838  tmp="$complete EOL"
34839  arguments="${tmp#* }"
34840
34841  # Input might be given as Windows format, start by converting to
34842  # unix format.
34843  new_path="$path"
34844
34845  windows_path="$new_path"
34846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34847    unix_path=`$CYGPATH -u "$windows_path"`
34848    new_path="$unix_path"
34849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34851    new_path="$unix_path"
34852  fi
34853
34854
34855  # Now try to locate executable using which
34856  new_path=`$WHICH "$new_path" 2> /dev/null`
34857
34858  if test "x$new_path" = x; then
34859    # Oops. Which didn't find the executable.
34860    # The splitting of arguments from the executable at a space might have been incorrect,
34861    # since paths with space are more likely in Windows. Give it another try with the whole
34862    # argument.
34863    path="$complete"
34864    arguments="EOL"
34865    new_path="$path"
34866
34867  windows_path="$new_path"
34868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34869    unix_path=`$CYGPATH -u "$windows_path"`
34870    new_path="$unix_path"
34871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34873    new_path="$unix_path"
34874  fi
34875
34876
34877    new_path=`$WHICH "$new_path" 2> /dev/null`
34878    # bat and cmd files are not always considered executable in MSYS causing which
34879    # to not find them
34880    if test "x$new_path" = x \
34881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34883      new_path="$path"
34884
34885  windows_path="$new_path"
34886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34887    unix_path=`$CYGPATH -u "$windows_path"`
34888    new_path="$unix_path"
34889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34891    new_path="$unix_path"
34892  fi
34893
34894    fi
34895
34896    if test "x$new_path" = x; then
34897      # It's still not found. Now this is an unrecoverable error.
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34899$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34900      has_space=`$ECHO "$complete" | $GREP " "`
34901      if test "x$has_space" != x; then
34902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34904      fi
34905      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34906    fi
34907  fi
34908
34909  # Now new_path has a complete unix path to the binary
34910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34911    # Keep paths in /bin as-is, but remove trailing .exe if any
34912    new_path="${new_path/%.exe/}"
34913    # Do not save /bin paths to all_fixpath_prefixes!
34914  else
34915    # Not in mixed or Windows style, start by that.
34916    new_path=`cmd //c echo $new_path`
34917
34918  input_path="$new_path"
34919  # Check if we need to convert this using DOS-style short mode. If the path
34920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34921  # take no chances and rewrite it.
34922  # Note: m4 eats our [], so we need to use [ and ] instead.
34923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34924  if test "x$has_forbidden_chars" != x; then
34925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34927  fi
34928
34929    # Output is in $new_path
34930
34931  windows_path="$new_path"
34932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34933    unix_path=`$CYGPATH -u "$windows_path"`
34934    new_path="$unix_path"
34935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34937    new_path="$unix_path"
34938  fi
34939
34940    # remove trailing .exe if any
34941    new_path="${new_path/%.exe/}"
34942
34943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34945  fi
34946
34947    else
34948      # We're on a unix platform. Hooray! :)
34949      # First separate the path from the arguments. This will split at the first
34950      # space.
34951      complete="$LIPO"
34952      path="${complete%% *}"
34953      tmp="$complete EOL"
34954      arguments="${tmp#* }"
34955
34956      # Cannot rely on the command "which" here since it doesn't always work.
34957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34958      if test -z "$is_absolute_path"; then
34959        # Path to executable is not absolute. Find it.
34960        IFS_save="$IFS"
34961        IFS=:
34962        for p in $PATH; do
34963          if test -f "$p/$path" && test -x "$p/$path"; then
34964            new_path="$p/$path"
34965            break
34966          fi
34967        done
34968        IFS="$IFS_save"
34969      else
34970        # This is an absolute path, we can use it without further modifications.
34971        new_path="$path"
34972      fi
34973
34974      if test "x$new_path" = x; then
34975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34976$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34977        has_space=`$ECHO "$complete" | $GREP " "`
34978        if test "x$has_space" != x; then
34979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34981        fi
34982        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34983      fi
34984    fi
34985
34986    # Now join together the path and the arguments once again
34987    if test "x$arguments" != xEOL; then
34988      new_complete="$new_path ${arguments% *}"
34989    else
34990      new_complete="$new_path"
34991    fi
34992
34993    if test "x$complete" != "x$new_complete"; then
34994      LIPO="$new_complete"
34995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34996$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34997    fi
34998  fi
34999
35000  fi
35001
35002  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35003    # Extract the first word of "mt", so it can be a program name with args.
35004set dummy mt; ac_word=$2
35005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35006$as_echo_n "checking for $ac_word... " >&6; }
35007if ${ac_cv_prog_MT+:} false; then :
35008  $as_echo_n "(cached) " >&6
35009else
35010  if test -n "$MT"; then
35011  ac_cv_prog_MT="$MT" # Let the user override the test.
35012else
35013  ac_prog_rejected=no
35014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35015for as_dir in $PATH
35016do
35017  IFS=$as_save_IFS
35018  test -z "$as_dir" && as_dir=.
35019    for ac_exec_ext in '' $ac_executable_extensions; do
35020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35021    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
35022       ac_prog_rejected=yes
35023       continue
35024     fi
35025    ac_cv_prog_MT="mt"
35026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35027    break 2
35028  fi
35029done
35030  done
35031IFS=$as_save_IFS
35032
35033if test $ac_prog_rejected = yes; then
35034  # We found a bogon in the path, so make sure we never use it.
35035  set dummy $ac_cv_prog_MT
35036  shift
35037  if test $# != 0; then
35038    # We chose a different compiler from the bogus one.
35039    # However, it has the same basename, so the bogon will be chosen
35040    # first if we set MT to just the basename; use the full file name.
35041    shift
35042    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
35043  fi
35044fi
35045fi
35046fi
35047MT=$ac_cv_prog_MT
35048if test -n "$MT"; then
35049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
35050$as_echo "$MT" >&6; }
35051else
35052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35053$as_echo "no" >&6; }
35054fi
35055
35056
35057
35058  # Only process if variable expands to non-empty
35059
35060  if test "x$MT" != x; then
35061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35062
35063  # First separate the path from the arguments. This will split at the first
35064  # space.
35065  complete="$MT"
35066  path="${complete%% *}"
35067  tmp="$complete EOL"
35068  arguments="${tmp#* }"
35069
35070  # Input might be given as Windows format, start by converting to
35071  # unix format.
35072  new_path=`$CYGPATH -u "$path"`
35073
35074  # Now try to locate executable using which
35075  new_path=`$WHICH "$new_path" 2> /dev/null`
35076  # bat and cmd files are not always considered executable in cygwin causing which
35077  # to not find them
35078  if test "x$new_path" = x \
35079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35081    new_path=`$CYGPATH -u "$path"`
35082  fi
35083  if test "x$new_path" = x; then
35084    # Oops. Which didn't find the executable.
35085    # The splitting of arguments from the executable at a space might have been incorrect,
35086    # since paths with space are more likely in Windows. Give it another try with the whole
35087    # argument.
35088    path="$complete"
35089    arguments="EOL"
35090    new_path=`$CYGPATH -u "$path"`
35091    new_path=`$WHICH "$new_path" 2> /dev/null`
35092    # bat and cmd files are not always considered executable in cygwin causing which
35093    # to not find them
35094    if test "x$new_path" = x \
35095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35097      new_path=`$CYGPATH -u "$path"`
35098    fi
35099    if test "x$new_path" = x; then
35100      # It's still not found. Now this is an unrecoverable error.
35101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35102$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35103      has_space=`$ECHO "$complete" | $GREP " "`
35104      if test "x$has_space" != x; then
35105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35107      fi
35108      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35109    fi
35110  fi
35111
35112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35115  # "foo.exe" is OK but "foo" is an error.
35116  #
35117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35118  # It is also a way to make sure we got the proper file name for the real test later on.
35119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35120  if test "x$test_shortpath" = x; then
35121    # Short path failed, file does not exist as specified.
35122    # Try adding .exe or .cmd
35123    if test -f "${new_path}.exe"; then
35124      input_to_shortpath="${new_path}.exe"
35125    elif test -f "${new_path}.cmd"; then
35126      input_to_shortpath="${new_path}.cmd"
35127    else
35128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
35129$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
35130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35132      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35133    fi
35134  else
35135    input_to_shortpath="$new_path"
35136  fi
35137
35138  # Call helper function which possibly converts this using DOS-style short mode.
35139  # If so, the updated path is stored in $new_path.
35140  new_path="$input_to_shortpath"
35141
35142  input_path="$input_to_shortpath"
35143  # Check if we need to convert this using DOS-style short mode. If the path
35144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35145  # take no chances and rewrite it.
35146  # Note: m4 eats our [], so we need to use [ and ] instead.
35147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35148  if test "x$has_forbidden_chars" != x; then
35149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35153      # Going to short mode and back again did indeed matter. Since short mode is
35154      # case insensitive, let's make it lowercase to improve readability.
35155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35156      # Now convert it back to Unix-style (cygpath)
35157      input_path=`$CYGPATH -u "$shortmode_path"`
35158      new_path="$input_path"
35159    fi
35160  fi
35161
35162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35163  if test "x$test_cygdrive_prefix" = x; then
35164    # As a simple fix, exclude /usr/bin since it's not a real path.
35165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35167      # a path prefixed by /cygdrive for fixpath to work.
35168      new_path="$CYGWIN_ROOT_PATH$input_path"
35169    fi
35170  fi
35171
35172  # remove trailing .exe if any
35173  new_path="${new_path/%.exe/}"
35174
35175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35176
35177  # First separate the path from the arguments. This will split at the first
35178  # space.
35179  complete="$MT"
35180  path="${complete%% *}"
35181  tmp="$complete EOL"
35182  arguments="${tmp#* }"
35183
35184  # Input might be given as Windows format, start by converting to
35185  # unix format.
35186  new_path="$path"
35187
35188  windows_path="$new_path"
35189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35190    unix_path=`$CYGPATH -u "$windows_path"`
35191    new_path="$unix_path"
35192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35194    new_path="$unix_path"
35195  fi
35196
35197
35198  # Now try to locate executable using which
35199  new_path=`$WHICH "$new_path" 2> /dev/null`
35200
35201  if test "x$new_path" = x; then
35202    # Oops. Which didn't find the executable.
35203    # The splitting of arguments from the executable at a space might have been incorrect,
35204    # since paths with space are more likely in Windows. Give it another try with the whole
35205    # argument.
35206    path="$complete"
35207    arguments="EOL"
35208    new_path="$path"
35209
35210  windows_path="$new_path"
35211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35212    unix_path=`$CYGPATH -u "$windows_path"`
35213    new_path="$unix_path"
35214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35216    new_path="$unix_path"
35217  fi
35218
35219
35220    new_path=`$WHICH "$new_path" 2> /dev/null`
35221    # bat and cmd files are not always considered executable in MSYS causing which
35222    # to not find them
35223    if test "x$new_path" = x \
35224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35226      new_path="$path"
35227
35228  windows_path="$new_path"
35229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35230    unix_path=`$CYGPATH -u "$windows_path"`
35231    new_path="$unix_path"
35232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35234    new_path="$unix_path"
35235  fi
35236
35237    fi
35238
35239    if test "x$new_path" = x; then
35240      # It's still not found. Now this is an unrecoverable error.
35241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35242$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35243      has_space=`$ECHO "$complete" | $GREP " "`
35244      if test "x$has_space" != x; then
35245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35247      fi
35248      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35249    fi
35250  fi
35251
35252  # Now new_path has a complete unix path to the binary
35253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35254    # Keep paths in /bin as-is, but remove trailing .exe if any
35255    new_path="${new_path/%.exe/}"
35256    # Do not save /bin paths to all_fixpath_prefixes!
35257  else
35258    # Not in mixed or Windows style, start by that.
35259    new_path=`cmd //c echo $new_path`
35260
35261  input_path="$new_path"
35262  # Check if we need to convert this using DOS-style short mode. If the path
35263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35264  # take no chances and rewrite it.
35265  # Note: m4 eats our [], so we need to use [ and ] instead.
35266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35267  if test "x$has_forbidden_chars" != x; then
35268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35270  fi
35271
35272    # Output is in $new_path
35273
35274  windows_path="$new_path"
35275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35276    unix_path=`$CYGPATH -u "$windows_path"`
35277    new_path="$unix_path"
35278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35280    new_path="$unix_path"
35281  fi
35282
35283    # remove trailing .exe if any
35284    new_path="${new_path/%.exe/}"
35285
35286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35288  fi
35289
35290    else
35291      # We're on a unix platform. Hooray! :)
35292      # First separate the path from the arguments. This will split at the first
35293      # space.
35294      complete="$MT"
35295      path="${complete%% *}"
35296      tmp="$complete EOL"
35297      arguments="${tmp#* }"
35298
35299      # Cannot rely on the command "which" here since it doesn't always work.
35300      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35301      if test -z "$is_absolute_path"; then
35302        # Path to executable is not absolute. Find it.
35303        IFS_save="$IFS"
35304        IFS=:
35305        for p in $PATH; do
35306          if test -f "$p/$path" && test -x "$p/$path"; then
35307            new_path="$p/$path"
35308            break
35309          fi
35310        done
35311        IFS="$IFS_save"
35312      else
35313        # This is an absolute path, we can use it without further modifications.
35314        new_path="$path"
35315      fi
35316
35317      if test "x$new_path" = x; then
35318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35319$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35320        has_space=`$ECHO "$complete" | $GREP " "`
35321        if test "x$has_space" != x; then
35322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35324        fi
35325        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35326      fi
35327    fi
35328
35329    # Now join together the path and the arguments once again
35330    if test "x$arguments" != xEOL; then
35331      new_complete="$new_path ${arguments% *}"
35332    else
35333      new_complete="$new_path"
35334    fi
35335
35336    if test "x$complete" != "x$new_complete"; then
35337      MT="$new_complete"
35338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
35339$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
35340    fi
35341  fi
35342
35343    # Setup the resource compiler (RC)
35344    # Extract the first word of "rc", so it can be a program name with args.
35345set dummy rc; ac_word=$2
35346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35347$as_echo_n "checking for $ac_word... " >&6; }
35348if ${ac_cv_prog_RC+:} false; then :
35349  $as_echo_n "(cached) " >&6
35350else
35351  if test -n "$RC"; then
35352  ac_cv_prog_RC="$RC" # Let the user override the test.
35353else
35354  ac_prog_rejected=no
35355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35356for as_dir in $PATH
35357do
35358  IFS=$as_save_IFS
35359  test -z "$as_dir" && as_dir=.
35360    for ac_exec_ext in '' $ac_executable_extensions; do
35361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35362    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
35363       ac_prog_rejected=yes
35364       continue
35365     fi
35366    ac_cv_prog_RC="rc"
35367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35368    break 2
35369  fi
35370done
35371  done
35372IFS=$as_save_IFS
35373
35374if test $ac_prog_rejected = yes; then
35375  # We found a bogon in the path, so make sure we never use it.
35376  set dummy $ac_cv_prog_RC
35377  shift
35378  if test $# != 0; then
35379    # We chose a different compiler from the bogus one.
35380    # However, it has the same basename, so the bogon will be chosen
35381    # first if we set RC to just the basename; use the full file name.
35382    shift
35383    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
35384  fi
35385fi
35386fi
35387fi
35388RC=$ac_cv_prog_RC
35389if test -n "$RC"; then
35390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
35391$as_echo "$RC" >&6; }
35392else
35393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35394$as_echo "no" >&6; }
35395fi
35396
35397
35398
35399  # Only process if variable expands to non-empty
35400
35401  if test "x$RC" != x; then
35402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35403
35404  # First separate the path from the arguments. This will split at the first
35405  # space.
35406  complete="$RC"
35407  path="${complete%% *}"
35408  tmp="$complete EOL"
35409  arguments="${tmp#* }"
35410
35411  # Input might be given as Windows format, start by converting to
35412  # unix format.
35413  new_path=`$CYGPATH -u "$path"`
35414
35415  # Now try to locate executable using which
35416  new_path=`$WHICH "$new_path" 2> /dev/null`
35417  # bat and cmd files are not always considered executable in cygwin causing which
35418  # to not find them
35419  if test "x$new_path" = x \
35420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35422    new_path=`$CYGPATH -u "$path"`
35423  fi
35424  if test "x$new_path" = x; then
35425    # Oops. Which didn't find the executable.
35426    # The splitting of arguments from the executable at a space might have been incorrect,
35427    # since paths with space are more likely in Windows. Give it another try with the whole
35428    # argument.
35429    path="$complete"
35430    arguments="EOL"
35431    new_path=`$CYGPATH -u "$path"`
35432    new_path=`$WHICH "$new_path" 2> /dev/null`
35433    # bat and cmd files are not always considered executable in cygwin causing which
35434    # to not find them
35435    if test "x$new_path" = x \
35436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35438      new_path=`$CYGPATH -u "$path"`
35439    fi
35440    if test "x$new_path" = x; then
35441      # It's still not found. Now this is an unrecoverable error.
35442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35443$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35444      has_space=`$ECHO "$complete" | $GREP " "`
35445      if test "x$has_space" != x; then
35446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35448      fi
35449      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35450    fi
35451  fi
35452
35453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35456  # "foo.exe" is OK but "foo" is an error.
35457  #
35458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35459  # It is also a way to make sure we got the proper file name for the real test later on.
35460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35461  if test "x$test_shortpath" = x; then
35462    # Short path failed, file does not exist as specified.
35463    # Try adding .exe or .cmd
35464    if test -f "${new_path}.exe"; then
35465      input_to_shortpath="${new_path}.exe"
35466    elif test -f "${new_path}.cmd"; then
35467      input_to_shortpath="${new_path}.cmd"
35468    else
35469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35470$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35473      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35474    fi
35475  else
35476    input_to_shortpath="$new_path"
35477  fi
35478
35479  # Call helper function which possibly converts this using DOS-style short mode.
35480  # If so, the updated path is stored in $new_path.
35481  new_path="$input_to_shortpath"
35482
35483  input_path="$input_to_shortpath"
35484  # Check if we need to convert this using DOS-style short mode. If the path
35485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35486  # take no chances and rewrite it.
35487  # Note: m4 eats our [], so we need to use [ and ] instead.
35488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35489  if test "x$has_forbidden_chars" != x; then
35490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35494      # Going to short mode and back again did indeed matter. Since short mode is
35495      # case insensitive, let's make it lowercase to improve readability.
35496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35497      # Now convert it back to Unix-style (cygpath)
35498      input_path=`$CYGPATH -u "$shortmode_path"`
35499      new_path="$input_path"
35500    fi
35501  fi
35502
35503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35504  if test "x$test_cygdrive_prefix" = x; then
35505    # As a simple fix, exclude /usr/bin since it's not a real path.
35506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35508      # a path prefixed by /cygdrive for fixpath to work.
35509      new_path="$CYGWIN_ROOT_PATH$input_path"
35510    fi
35511  fi
35512
35513  # remove trailing .exe if any
35514  new_path="${new_path/%.exe/}"
35515
35516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35517
35518  # First separate the path from the arguments. This will split at the first
35519  # space.
35520  complete="$RC"
35521  path="${complete%% *}"
35522  tmp="$complete EOL"
35523  arguments="${tmp#* }"
35524
35525  # Input might be given as Windows format, start by converting to
35526  # unix format.
35527  new_path="$path"
35528
35529  windows_path="$new_path"
35530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35531    unix_path=`$CYGPATH -u "$windows_path"`
35532    new_path="$unix_path"
35533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35535    new_path="$unix_path"
35536  fi
35537
35538
35539  # Now try to locate executable using which
35540  new_path=`$WHICH "$new_path" 2> /dev/null`
35541
35542  if test "x$new_path" = x; then
35543    # Oops. Which didn't find the executable.
35544    # The splitting of arguments from the executable at a space might have been incorrect,
35545    # since paths with space are more likely in Windows. Give it another try with the whole
35546    # argument.
35547    path="$complete"
35548    arguments="EOL"
35549    new_path="$path"
35550
35551  windows_path="$new_path"
35552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35553    unix_path=`$CYGPATH -u "$windows_path"`
35554    new_path="$unix_path"
35555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35557    new_path="$unix_path"
35558  fi
35559
35560
35561    new_path=`$WHICH "$new_path" 2> /dev/null`
35562    # bat and cmd files are not always considered executable in MSYS causing which
35563    # to not find them
35564    if test "x$new_path" = x \
35565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35567      new_path="$path"
35568
35569  windows_path="$new_path"
35570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35571    unix_path=`$CYGPATH -u "$windows_path"`
35572    new_path="$unix_path"
35573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35575    new_path="$unix_path"
35576  fi
35577
35578    fi
35579
35580    if test "x$new_path" = x; then
35581      # It's still not found. Now this is an unrecoverable error.
35582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35583$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35584      has_space=`$ECHO "$complete" | $GREP " "`
35585      if test "x$has_space" != x; then
35586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35588      fi
35589      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35590    fi
35591  fi
35592
35593  # Now new_path has a complete unix path to the binary
35594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35595    # Keep paths in /bin as-is, but remove trailing .exe if any
35596    new_path="${new_path/%.exe/}"
35597    # Do not save /bin paths to all_fixpath_prefixes!
35598  else
35599    # Not in mixed or Windows style, start by that.
35600    new_path=`cmd //c echo $new_path`
35601
35602  input_path="$new_path"
35603  # Check if we need to convert this using DOS-style short mode. If the path
35604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35605  # take no chances and rewrite it.
35606  # Note: m4 eats our [], so we need to use [ and ] instead.
35607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35608  if test "x$has_forbidden_chars" != x; then
35609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35611  fi
35612
35613    # Output is in $new_path
35614
35615  windows_path="$new_path"
35616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35617    unix_path=`$CYGPATH -u "$windows_path"`
35618    new_path="$unix_path"
35619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35621    new_path="$unix_path"
35622  fi
35623
35624    # remove trailing .exe if any
35625    new_path="${new_path/%.exe/}"
35626
35627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35629  fi
35630
35631    else
35632      # We're on a unix platform. Hooray! :)
35633      # First separate the path from the arguments. This will split at the first
35634      # space.
35635      complete="$RC"
35636      path="${complete%% *}"
35637      tmp="$complete EOL"
35638      arguments="${tmp#* }"
35639
35640      # Cannot rely on the command "which" here since it doesn't always work.
35641      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35642      if test -z "$is_absolute_path"; then
35643        # Path to executable is not absolute. Find it.
35644        IFS_save="$IFS"
35645        IFS=:
35646        for p in $PATH; do
35647          if test -f "$p/$path" && test -x "$p/$path"; then
35648            new_path="$p/$path"
35649            break
35650          fi
35651        done
35652        IFS="$IFS_save"
35653      else
35654        # This is an absolute path, we can use it without further modifications.
35655        new_path="$path"
35656      fi
35657
35658      if test "x$new_path" = x; then
35659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35660$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35661        has_space=`$ECHO "$complete" | $GREP " "`
35662        if test "x$has_space" != x; then
35663          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35665        fi
35666        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35667      fi
35668    fi
35669
35670    # Now join together the path and the arguments once again
35671    if test "x$arguments" != xEOL; then
35672      new_complete="$new_path ${arguments% *}"
35673    else
35674      new_complete="$new_path"
35675    fi
35676
35677    if test "x$complete" != "x$new_complete"; then
35678      RC="$new_complete"
35679      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35680$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35681    fi
35682  fi
35683
35684    # Extract the first word of "dumpbin", so it can be a program name with args.
35685set dummy dumpbin; ac_word=$2
35686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35687$as_echo_n "checking for $ac_word... " >&6; }
35688if ${ac_cv_prog_DUMPBIN+:} false; then :
35689  $as_echo_n "(cached) " >&6
35690else
35691  if test -n "$DUMPBIN"; then
35692  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35693else
35694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35695for as_dir in $PATH
35696do
35697  IFS=$as_save_IFS
35698  test -z "$as_dir" && as_dir=.
35699    for ac_exec_ext in '' $ac_executable_extensions; do
35700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35701    ac_cv_prog_DUMPBIN="dumpbin"
35702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35703    break 2
35704  fi
35705done
35706  done
35707IFS=$as_save_IFS
35708
35709fi
35710fi
35711DUMPBIN=$ac_cv_prog_DUMPBIN
35712if test -n "$DUMPBIN"; then
35713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35714$as_echo "$DUMPBIN" >&6; }
35715else
35716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35717$as_echo "no" >&6; }
35718fi
35719
35720
35721
35722  # Only process if variable expands to non-empty
35723
35724  if test "x$DUMPBIN" != x; then
35725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35726
35727  # First separate the path from the arguments. This will split at the first
35728  # space.
35729  complete="$DUMPBIN"
35730  path="${complete%% *}"
35731  tmp="$complete EOL"
35732  arguments="${tmp#* }"
35733
35734  # Input might be given as Windows format, start by converting to
35735  # unix format.
35736  new_path=`$CYGPATH -u "$path"`
35737
35738  # Now try to locate executable using which
35739  new_path=`$WHICH "$new_path" 2> /dev/null`
35740  # bat and cmd files are not always considered executable in cygwin causing which
35741  # to not find them
35742  if test "x$new_path" = x \
35743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35745    new_path=`$CYGPATH -u "$path"`
35746  fi
35747  if test "x$new_path" = x; then
35748    # Oops. Which didn't find the executable.
35749    # The splitting of arguments from the executable at a space might have been incorrect,
35750    # since paths with space are more likely in Windows. Give it another try with the whole
35751    # argument.
35752    path="$complete"
35753    arguments="EOL"
35754    new_path=`$CYGPATH -u "$path"`
35755    new_path=`$WHICH "$new_path" 2> /dev/null`
35756    # bat and cmd files are not always considered executable in cygwin causing which
35757    # to not find them
35758    if test "x$new_path" = x \
35759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35761      new_path=`$CYGPATH -u "$path"`
35762    fi
35763    if test "x$new_path" = x; then
35764      # It's still not found. Now this is an unrecoverable error.
35765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35766$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35767      has_space=`$ECHO "$complete" | $GREP " "`
35768      if test "x$has_space" != x; then
35769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35771      fi
35772      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35773    fi
35774  fi
35775
35776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35779  # "foo.exe" is OK but "foo" is an error.
35780  #
35781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35782  # It is also a way to make sure we got the proper file name for the real test later on.
35783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35784  if test "x$test_shortpath" = x; then
35785    # Short path failed, file does not exist as specified.
35786    # Try adding .exe or .cmd
35787    if test -f "${new_path}.exe"; then
35788      input_to_shortpath="${new_path}.exe"
35789    elif test -f "${new_path}.cmd"; then
35790      input_to_shortpath="${new_path}.cmd"
35791    else
35792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35793$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35796      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35797    fi
35798  else
35799    input_to_shortpath="$new_path"
35800  fi
35801
35802  # Call helper function which possibly converts this using DOS-style short mode.
35803  # If so, the updated path is stored in $new_path.
35804  new_path="$input_to_shortpath"
35805
35806  input_path="$input_to_shortpath"
35807  # Check if we need to convert this using DOS-style short mode. If the path
35808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35809  # take no chances and rewrite it.
35810  # Note: m4 eats our [], so we need to use [ and ] instead.
35811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35812  if test "x$has_forbidden_chars" != x; then
35813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35817      # Going to short mode and back again did indeed matter. Since short mode is
35818      # case insensitive, let's make it lowercase to improve readability.
35819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35820      # Now convert it back to Unix-style (cygpath)
35821      input_path=`$CYGPATH -u "$shortmode_path"`
35822      new_path="$input_path"
35823    fi
35824  fi
35825
35826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35827  if test "x$test_cygdrive_prefix" = x; then
35828    # As a simple fix, exclude /usr/bin since it's not a real path.
35829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35831      # a path prefixed by /cygdrive for fixpath to work.
35832      new_path="$CYGWIN_ROOT_PATH$input_path"
35833    fi
35834  fi
35835
35836  # remove trailing .exe if any
35837  new_path="${new_path/%.exe/}"
35838
35839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35840
35841  # First separate the path from the arguments. This will split at the first
35842  # space.
35843  complete="$DUMPBIN"
35844  path="${complete%% *}"
35845  tmp="$complete EOL"
35846  arguments="${tmp#* }"
35847
35848  # Input might be given as Windows format, start by converting to
35849  # unix format.
35850  new_path="$path"
35851
35852  windows_path="$new_path"
35853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35854    unix_path=`$CYGPATH -u "$windows_path"`
35855    new_path="$unix_path"
35856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35858    new_path="$unix_path"
35859  fi
35860
35861
35862  # Now try to locate executable using which
35863  new_path=`$WHICH "$new_path" 2> /dev/null`
35864
35865  if test "x$new_path" = x; then
35866    # Oops. Which didn't find the executable.
35867    # The splitting of arguments from the executable at a space might have been incorrect,
35868    # since paths with space are more likely in Windows. Give it another try with the whole
35869    # argument.
35870    path="$complete"
35871    arguments="EOL"
35872    new_path="$path"
35873
35874  windows_path="$new_path"
35875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35876    unix_path=`$CYGPATH -u "$windows_path"`
35877    new_path="$unix_path"
35878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35880    new_path="$unix_path"
35881  fi
35882
35883
35884    new_path=`$WHICH "$new_path" 2> /dev/null`
35885    # bat and cmd files are not always considered executable in MSYS causing which
35886    # to not find them
35887    if test "x$new_path" = x \
35888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35890      new_path="$path"
35891
35892  windows_path="$new_path"
35893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35894    unix_path=`$CYGPATH -u "$windows_path"`
35895    new_path="$unix_path"
35896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35898    new_path="$unix_path"
35899  fi
35900
35901    fi
35902
35903    if test "x$new_path" = x; then
35904      # It's still not found. Now this is an unrecoverable error.
35905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35906$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35907      has_space=`$ECHO "$complete" | $GREP " "`
35908      if test "x$has_space" != x; then
35909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35911      fi
35912      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35913    fi
35914  fi
35915
35916  # Now new_path has a complete unix path to the binary
35917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35918    # Keep paths in /bin as-is, but remove trailing .exe if any
35919    new_path="${new_path/%.exe/}"
35920    # Do not save /bin paths to all_fixpath_prefixes!
35921  else
35922    # Not in mixed or Windows style, start by that.
35923    new_path=`cmd //c echo $new_path`
35924
35925  input_path="$new_path"
35926  # Check if we need to convert this using DOS-style short mode. If the path
35927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35928  # take no chances and rewrite it.
35929  # Note: m4 eats our [], so we need to use [ and ] instead.
35930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35931  if test "x$has_forbidden_chars" != x; then
35932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35934  fi
35935
35936    # Output is in $new_path
35937
35938  windows_path="$new_path"
35939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35940    unix_path=`$CYGPATH -u "$windows_path"`
35941    new_path="$unix_path"
35942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35944    new_path="$unix_path"
35945  fi
35946
35947    # remove trailing .exe if any
35948    new_path="${new_path/%.exe/}"
35949
35950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35952  fi
35953
35954    else
35955      # We're on a unix platform. Hooray! :)
35956      # First separate the path from the arguments. This will split at the first
35957      # space.
35958      complete="$DUMPBIN"
35959      path="${complete%% *}"
35960      tmp="$complete EOL"
35961      arguments="${tmp#* }"
35962
35963      # Cannot rely on the command "which" here since it doesn't always work.
35964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35965      if test -z "$is_absolute_path"; then
35966        # Path to executable is not absolute. Find it.
35967        IFS_save="$IFS"
35968        IFS=:
35969        for p in $PATH; do
35970          if test -f "$p/$path" && test -x "$p/$path"; then
35971            new_path="$p/$path"
35972            break
35973          fi
35974        done
35975        IFS="$IFS_save"
35976      else
35977        # This is an absolute path, we can use it without further modifications.
35978        new_path="$path"
35979      fi
35980
35981      if test "x$new_path" = x; then
35982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35983$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35984        has_space=`$ECHO "$complete" | $GREP " "`
35985        if test "x$has_space" != x; then
35986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35988        fi
35989        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35990      fi
35991    fi
35992
35993    # Now join together the path and the arguments once again
35994    if test "x$arguments" != xEOL; then
35995      new_complete="$new_path ${arguments% *}"
35996    else
35997      new_complete="$new_path"
35998    fi
35999
36000    if test "x$complete" != "x$new_complete"; then
36001      DUMPBIN="$new_complete"
36002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
36003$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
36004    fi
36005  fi
36006
36007    # We need to check for 'msbuild.exe' because at the place where we expect to
36008    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
36009    # won't find the 'msbuild.exe' executable in that case (and the
36010    # 'ac_executable_extensions' is unusable due to performance reasons).
36011    # Notice that we intentionally don't fix up the path to MSBUILD because we
36012    # will call it in a DOS shell during freetype detection on Windows (see
36013    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
36014    # Extract the first word of "msbuild.exe", so it can be a program name with args.
36015set dummy msbuild.exe; ac_word=$2
36016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36017$as_echo_n "checking for $ac_word... " >&6; }
36018if ${ac_cv_prog_MSBUILD+:} false; then :
36019  $as_echo_n "(cached) " >&6
36020else
36021  if test -n "$MSBUILD"; then
36022  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
36023else
36024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36025for as_dir in $PATH
36026do
36027  IFS=$as_save_IFS
36028  test -z "$as_dir" && as_dir=.
36029    for ac_exec_ext in '' $ac_executable_extensions; do
36030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36031    ac_cv_prog_MSBUILD="msbuild.exe"
36032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36033    break 2
36034  fi
36035done
36036  done
36037IFS=$as_save_IFS
36038
36039fi
36040fi
36041MSBUILD=$ac_cv_prog_MSBUILD
36042if test -n "$MSBUILD"; then
36043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
36044$as_echo "$MSBUILD" >&6; }
36045else
36046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36047$as_echo "no" >&6; }
36048fi
36049
36050
36051  fi
36052
36053  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36054
36055
36056  # Publish this variable in the help.
36057
36058
36059  if [ -z "${STRIP+x}" ]; then
36060    # The variable is not set by user, try to locate tool using the code snippet
36061    for ac_prog in strip
36062do
36063  # Extract the first word of "$ac_prog", so it can be a program name with args.
36064set dummy $ac_prog; ac_word=$2
36065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36066$as_echo_n "checking for $ac_word... " >&6; }
36067if ${ac_cv_path_STRIP+:} false; then :
36068  $as_echo_n "(cached) " >&6
36069else
36070  case $STRIP in
36071  [\\/]* | ?:[\\/]*)
36072  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36073  ;;
36074  *)
36075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36076for as_dir in $PATH
36077do
36078  IFS=$as_save_IFS
36079  test -z "$as_dir" && as_dir=.
36080    for ac_exec_ext in '' $ac_executable_extensions; do
36081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36082    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36084    break 2
36085  fi
36086done
36087  done
36088IFS=$as_save_IFS
36089
36090  ;;
36091esac
36092fi
36093STRIP=$ac_cv_path_STRIP
36094if test -n "$STRIP"; then
36095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36096$as_echo "$STRIP" >&6; }
36097else
36098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36099$as_echo "no" >&6; }
36100fi
36101
36102
36103  test -n "$STRIP" && break
36104done
36105
36106  else
36107    # The variable is set, but is it from the command line or the environment?
36108
36109    # Try to remove the string !STRIP! from our list.
36110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36112      # If it failed, the variable was not from the command line. Ignore it,
36113      # but warn the user (except for BASH, which is always set by the calling BASH).
36114      if test "xSTRIP" != xBASH; then
36115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36116$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36117      fi
36118      # Try to locate tool using the code snippet
36119      for ac_prog in strip
36120do
36121  # Extract the first word of "$ac_prog", so it can be a program name with args.
36122set dummy $ac_prog; ac_word=$2
36123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36124$as_echo_n "checking for $ac_word... " >&6; }
36125if ${ac_cv_path_STRIP+:} false; then :
36126  $as_echo_n "(cached) " >&6
36127else
36128  case $STRIP in
36129  [\\/]* | ?:[\\/]*)
36130  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36131  ;;
36132  *)
36133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36134for as_dir in $PATH
36135do
36136  IFS=$as_save_IFS
36137  test -z "$as_dir" && as_dir=.
36138    for ac_exec_ext in '' $ac_executable_extensions; do
36139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36140    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36142    break 2
36143  fi
36144done
36145  done
36146IFS=$as_save_IFS
36147
36148  ;;
36149esac
36150fi
36151STRIP=$ac_cv_path_STRIP
36152if test -n "$STRIP"; then
36153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36154$as_echo "$STRIP" >&6; }
36155else
36156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36157$as_echo "no" >&6; }
36158fi
36159
36160
36161  test -n "$STRIP" && break
36162done
36163
36164    else
36165      # If it succeeded, then it was overridden by the user. We will use it
36166      # for the tool.
36167
36168      # First remove it from the list of overridden variables, so we can test
36169      # for unknown variables in the end.
36170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36171
36172      # Check if we try to supply an empty value
36173      if test "x$STRIP" = x; then
36174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
36175$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
36176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36177$as_echo_n "checking for STRIP... " >&6; }
36178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36179$as_echo "disabled" >&6; }
36180      else
36181        # Check if the provided tool contains a complete path.
36182        tool_specified="$STRIP"
36183        tool_basename="${tool_specified##*/}"
36184        if test "x$tool_basename" = "x$tool_specified"; then
36185          # A command without a complete path is provided, search $PATH.
36186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36187$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36188          # Extract the first word of "$tool_basename", so it can be a program name with args.
36189set dummy $tool_basename; ac_word=$2
36190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36191$as_echo_n "checking for $ac_word... " >&6; }
36192if ${ac_cv_path_STRIP+:} false; then :
36193  $as_echo_n "(cached) " >&6
36194else
36195  case $STRIP in
36196  [\\/]* | ?:[\\/]*)
36197  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36198  ;;
36199  *)
36200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36201for as_dir in $PATH
36202do
36203  IFS=$as_save_IFS
36204  test -z "$as_dir" && as_dir=.
36205    for ac_exec_ext in '' $ac_executable_extensions; do
36206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36207    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36209    break 2
36210  fi
36211done
36212  done
36213IFS=$as_save_IFS
36214
36215  ;;
36216esac
36217fi
36218STRIP=$ac_cv_path_STRIP
36219if test -n "$STRIP"; then
36220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36221$as_echo "$STRIP" >&6; }
36222else
36223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36224$as_echo "no" >&6; }
36225fi
36226
36227
36228          if test "x$STRIP" = x; then
36229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36230          fi
36231        else
36232          # Otherwise we believe it is a complete path. Use it as it is.
36233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36234$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36236$as_echo_n "checking for STRIP... " >&6; }
36237          if test ! -x "$tool_specified"; then
36238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36239$as_echo "not found" >&6; }
36240            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36241          fi
36242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36243$as_echo "$tool_specified" >&6; }
36244        fi
36245      fi
36246    fi
36247  fi
36248
36249
36250
36251  # Only process if variable expands to non-empty
36252
36253  if test "x$STRIP" != x; then
36254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36255
36256  # First separate the path from the arguments. This will split at the first
36257  # space.
36258  complete="$STRIP"
36259  path="${complete%% *}"
36260  tmp="$complete EOL"
36261  arguments="${tmp#* }"
36262
36263  # Input might be given as Windows format, start by converting to
36264  # unix format.
36265  new_path=`$CYGPATH -u "$path"`
36266
36267  # Now try to locate executable using which
36268  new_path=`$WHICH "$new_path" 2> /dev/null`
36269  # bat and cmd files are not always considered executable in cygwin causing which
36270  # to not find them
36271  if test "x$new_path" = x \
36272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36274    new_path=`$CYGPATH -u "$path"`
36275  fi
36276  if test "x$new_path" = x; then
36277    # Oops. Which didn't find the executable.
36278    # The splitting of arguments from the executable at a space might have been incorrect,
36279    # since paths with space are more likely in Windows. Give it another try with the whole
36280    # argument.
36281    path="$complete"
36282    arguments="EOL"
36283    new_path=`$CYGPATH -u "$path"`
36284    new_path=`$WHICH "$new_path" 2> /dev/null`
36285    # bat and cmd files are not always considered executable in cygwin causing which
36286    # to not find them
36287    if test "x$new_path" = x \
36288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36290      new_path=`$CYGPATH -u "$path"`
36291    fi
36292    if test "x$new_path" = x; then
36293      # It's still not found. Now this is an unrecoverable error.
36294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36295$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36296      has_space=`$ECHO "$complete" | $GREP " "`
36297      if test "x$has_space" != x; then
36298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36300      fi
36301      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36302    fi
36303  fi
36304
36305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36308  # "foo.exe" is OK but "foo" is an error.
36309  #
36310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36311  # It is also a way to make sure we got the proper file name for the real test later on.
36312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36313  if test "x$test_shortpath" = x; then
36314    # Short path failed, file does not exist as specified.
36315    # Try adding .exe or .cmd
36316    if test -f "${new_path}.exe"; then
36317      input_to_shortpath="${new_path}.exe"
36318    elif test -f "${new_path}.cmd"; then
36319      input_to_shortpath="${new_path}.cmd"
36320    else
36321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36322$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36325      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36326    fi
36327  else
36328    input_to_shortpath="$new_path"
36329  fi
36330
36331  # Call helper function which possibly converts this using DOS-style short mode.
36332  # If so, the updated path is stored in $new_path.
36333  new_path="$input_to_shortpath"
36334
36335  input_path="$input_to_shortpath"
36336  # Check if we need to convert this using DOS-style short mode. If the path
36337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36338  # take no chances and rewrite it.
36339  # Note: m4 eats our [], so we need to use [ and ] instead.
36340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36341  if test "x$has_forbidden_chars" != x; then
36342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36346      # Going to short mode and back again did indeed matter. Since short mode is
36347      # case insensitive, let's make it lowercase to improve readability.
36348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36349      # Now convert it back to Unix-style (cygpath)
36350      input_path=`$CYGPATH -u "$shortmode_path"`
36351      new_path="$input_path"
36352    fi
36353  fi
36354
36355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36356  if test "x$test_cygdrive_prefix" = x; then
36357    # As a simple fix, exclude /usr/bin since it's not a real path.
36358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36360      # a path prefixed by /cygdrive for fixpath to work.
36361      new_path="$CYGWIN_ROOT_PATH$input_path"
36362    fi
36363  fi
36364
36365  # remove trailing .exe if any
36366  new_path="${new_path/%.exe/}"
36367
36368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36369
36370  # First separate the path from the arguments. This will split at the first
36371  # space.
36372  complete="$STRIP"
36373  path="${complete%% *}"
36374  tmp="$complete EOL"
36375  arguments="${tmp#* }"
36376
36377  # Input might be given as Windows format, start by converting to
36378  # unix format.
36379  new_path="$path"
36380
36381  windows_path="$new_path"
36382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36383    unix_path=`$CYGPATH -u "$windows_path"`
36384    new_path="$unix_path"
36385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36387    new_path="$unix_path"
36388  fi
36389
36390
36391  # Now try to locate executable using which
36392  new_path=`$WHICH "$new_path" 2> /dev/null`
36393
36394  if test "x$new_path" = x; then
36395    # Oops. Which didn't find the executable.
36396    # The splitting of arguments from the executable at a space might have been incorrect,
36397    # since paths with space are more likely in Windows. Give it another try with the whole
36398    # argument.
36399    path="$complete"
36400    arguments="EOL"
36401    new_path="$path"
36402
36403  windows_path="$new_path"
36404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36405    unix_path=`$CYGPATH -u "$windows_path"`
36406    new_path="$unix_path"
36407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36409    new_path="$unix_path"
36410  fi
36411
36412
36413    new_path=`$WHICH "$new_path" 2> /dev/null`
36414    # bat and cmd files are not always considered executable in MSYS causing which
36415    # to not find them
36416    if test "x$new_path" = x \
36417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36419      new_path="$path"
36420
36421  windows_path="$new_path"
36422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36423    unix_path=`$CYGPATH -u "$windows_path"`
36424    new_path="$unix_path"
36425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36427    new_path="$unix_path"
36428  fi
36429
36430    fi
36431
36432    if test "x$new_path" = x; then
36433      # It's still not found. Now this is an unrecoverable error.
36434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36435$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36436      has_space=`$ECHO "$complete" | $GREP " "`
36437      if test "x$has_space" != x; then
36438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36440      fi
36441      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36442    fi
36443  fi
36444
36445  # Now new_path has a complete unix path to the binary
36446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36447    # Keep paths in /bin as-is, but remove trailing .exe if any
36448    new_path="${new_path/%.exe/}"
36449    # Do not save /bin paths to all_fixpath_prefixes!
36450  else
36451    # Not in mixed or Windows style, start by that.
36452    new_path=`cmd //c echo $new_path`
36453
36454  input_path="$new_path"
36455  # Check if we need to convert this using DOS-style short mode. If the path
36456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36457  # take no chances and rewrite it.
36458  # Note: m4 eats our [], so we need to use [ and ] instead.
36459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36460  if test "x$has_forbidden_chars" != x; then
36461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36463  fi
36464
36465    # Output is in $new_path
36466
36467  windows_path="$new_path"
36468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36469    unix_path=`$CYGPATH -u "$windows_path"`
36470    new_path="$unix_path"
36471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36473    new_path="$unix_path"
36474  fi
36475
36476    # remove trailing .exe if any
36477    new_path="${new_path/%.exe/}"
36478
36479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36481  fi
36482
36483    else
36484      # We're on a unix platform. Hooray! :)
36485      # First separate the path from the arguments. This will split at the first
36486      # space.
36487      complete="$STRIP"
36488      path="${complete%% *}"
36489      tmp="$complete EOL"
36490      arguments="${tmp#* }"
36491
36492      # Cannot rely on the command "which" here since it doesn't always work.
36493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36494      if test -z "$is_absolute_path"; then
36495        # Path to executable is not absolute. Find it.
36496        IFS_save="$IFS"
36497        IFS=:
36498        for p in $PATH; do
36499          if test -f "$p/$path" && test -x "$p/$path"; then
36500            new_path="$p/$path"
36501            break
36502          fi
36503        done
36504        IFS="$IFS_save"
36505      else
36506        # This is an absolute path, we can use it without further modifications.
36507        new_path="$path"
36508      fi
36509
36510      if test "x$new_path" = x; then
36511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36512$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36513        has_space=`$ECHO "$complete" | $GREP " "`
36514        if test "x$has_space" != x; then
36515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36517        fi
36518        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36519      fi
36520    fi
36521
36522    # Now join together the path and the arguments once again
36523    if test "x$arguments" != xEOL; then
36524      new_complete="$new_path ${arguments% *}"
36525    else
36526      new_complete="$new_path"
36527    fi
36528
36529    if test "x$complete" != "x$new_complete"; then
36530      STRIP="$new_complete"
36531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36532$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36533    fi
36534  fi
36535
36536
36537
36538  # Publish this variable in the help.
36539
36540
36541  if [ -z "${NM+x}" ]; then
36542    # The variable is not set by user, try to locate tool using the code snippet
36543    for ac_prog in nm
36544do
36545  # Extract the first word of "$ac_prog", so it can be a program name with args.
36546set dummy $ac_prog; ac_word=$2
36547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36548$as_echo_n "checking for $ac_word... " >&6; }
36549if ${ac_cv_path_NM+:} false; then :
36550  $as_echo_n "(cached) " >&6
36551else
36552  case $NM in
36553  [\\/]* | ?:[\\/]*)
36554  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36555  ;;
36556  *)
36557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36558for as_dir in $PATH
36559do
36560  IFS=$as_save_IFS
36561  test -z "$as_dir" && as_dir=.
36562    for ac_exec_ext in '' $ac_executable_extensions; do
36563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36564    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36566    break 2
36567  fi
36568done
36569  done
36570IFS=$as_save_IFS
36571
36572  ;;
36573esac
36574fi
36575NM=$ac_cv_path_NM
36576if test -n "$NM"; then
36577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36578$as_echo "$NM" >&6; }
36579else
36580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581$as_echo "no" >&6; }
36582fi
36583
36584
36585  test -n "$NM" && break
36586done
36587
36588  else
36589    # The variable is set, but is it from the command line or the environment?
36590
36591    # Try to remove the string !NM! from our list.
36592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36594      # If it failed, the variable was not from the command line. Ignore it,
36595      # but warn the user (except for BASH, which is always set by the calling BASH).
36596      if test "xNM" != xBASH; then
36597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36598$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36599      fi
36600      # Try to locate tool using the code snippet
36601      for ac_prog in nm
36602do
36603  # Extract the first word of "$ac_prog", so it can be a program name with args.
36604set dummy $ac_prog; ac_word=$2
36605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36606$as_echo_n "checking for $ac_word... " >&6; }
36607if ${ac_cv_path_NM+:} false; then :
36608  $as_echo_n "(cached) " >&6
36609else
36610  case $NM in
36611  [\\/]* | ?:[\\/]*)
36612  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36613  ;;
36614  *)
36615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36616for as_dir in $PATH
36617do
36618  IFS=$as_save_IFS
36619  test -z "$as_dir" && as_dir=.
36620    for ac_exec_ext in '' $ac_executable_extensions; do
36621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36622    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36624    break 2
36625  fi
36626done
36627  done
36628IFS=$as_save_IFS
36629
36630  ;;
36631esac
36632fi
36633NM=$ac_cv_path_NM
36634if test -n "$NM"; then
36635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36636$as_echo "$NM" >&6; }
36637else
36638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36639$as_echo "no" >&6; }
36640fi
36641
36642
36643  test -n "$NM" && break
36644done
36645
36646    else
36647      # If it succeeded, then it was overridden by the user. We will use it
36648      # for the tool.
36649
36650      # First remove it from the list of overridden variables, so we can test
36651      # for unknown variables in the end.
36652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36653
36654      # Check if we try to supply an empty value
36655      if test "x$NM" = x; then
36656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
36657$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
36658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36659$as_echo_n "checking for NM... " >&6; }
36660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36661$as_echo "disabled" >&6; }
36662      else
36663        # Check if the provided tool contains a complete path.
36664        tool_specified="$NM"
36665        tool_basename="${tool_specified##*/}"
36666        if test "x$tool_basename" = "x$tool_specified"; then
36667          # A command without a complete path is provided, search $PATH.
36668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36669$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36670          # Extract the first word of "$tool_basename", so it can be a program name with args.
36671set dummy $tool_basename; ac_word=$2
36672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36673$as_echo_n "checking for $ac_word... " >&6; }
36674if ${ac_cv_path_NM+:} false; then :
36675  $as_echo_n "(cached) " >&6
36676else
36677  case $NM in
36678  [\\/]* | ?:[\\/]*)
36679  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36680  ;;
36681  *)
36682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36683for as_dir in $PATH
36684do
36685  IFS=$as_save_IFS
36686  test -z "$as_dir" && as_dir=.
36687    for ac_exec_ext in '' $ac_executable_extensions; do
36688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36689    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36691    break 2
36692  fi
36693done
36694  done
36695IFS=$as_save_IFS
36696
36697  ;;
36698esac
36699fi
36700NM=$ac_cv_path_NM
36701if test -n "$NM"; then
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36703$as_echo "$NM" >&6; }
36704else
36705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36706$as_echo "no" >&6; }
36707fi
36708
36709
36710          if test "x$NM" = x; then
36711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36712          fi
36713        else
36714          # Otherwise we believe it is a complete path. Use it as it is.
36715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36716$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36718$as_echo_n "checking for NM... " >&6; }
36719          if test ! -x "$tool_specified"; then
36720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36721$as_echo "not found" >&6; }
36722            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36723          fi
36724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36725$as_echo "$tool_specified" >&6; }
36726        fi
36727      fi
36728    fi
36729  fi
36730
36731
36732
36733  # Only process if variable expands to non-empty
36734
36735  if test "x$NM" != x; then
36736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36737
36738  # First separate the path from the arguments. This will split at the first
36739  # space.
36740  complete="$NM"
36741  path="${complete%% *}"
36742  tmp="$complete EOL"
36743  arguments="${tmp#* }"
36744
36745  # Input might be given as Windows format, start by converting to
36746  # unix format.
36747  new_path=`$CYGPATH -u "$path"`
36748
36749  # Now try to locate executable using which
36750  new_path=`$WHICH "$new_path" 2> /dev/null`
36751  # bat and cmd files are not always considered executable in cygwin causing which
36752  # to not find them
36753  if test "x$new_path" = x \
36754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36756    new_path=`$CYGPATH -u "$path"`
36757  fi
36758  if test "x$new_path" = x; then
36759    # Oops. Which didn't find the executable.
36760    # The splitting of arguments from the executable at a space might have been incorrect,
36761    # since paths with space are more likely in Windows. Give it another try with the whole
36762    # argument.
36763    path="$complete"
36764    arguments="EOL"
36765    new_path=`$CYGPATH -u "$path"`
36766    new_path=`$WHICH "$new_path" 2> /dev/null`
36767    # bat and cmd files are not always considered executable in cygwin causing which
36768    # to not find them
36769    if test "x$new_path" = x \
36770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36772      new_path=`$CYGPATH -u "$path"`
36773    fi
36774    if test "x$new_path" = x; then
36775      # It's still not found. Now this is an unrecoverable error.
36776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36777$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36778      has_space=`$ECHO "$complete" | $GREP " "`
36779      if test "x$has_space" != x; then
36780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36782      fi
36783      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36784    fi
36785  fi
36786
36787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36790  # "foo.exe" is OK but "foo" is an error.
36791  #
36792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36793  # It is also a way to make sure we got the proper file name for the real test later on.
36794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36795  if test "x$test_shortpath" = x; then
36796    # Short path failed, file does not exist as specified.
36797    # Try adding .exe or .cmd
36798    if test -f "${new_path}.exe"; then
36799      input_to_shortpath="${new_path}.exe"
36800    elif test -f "${new_path}.cmd"; then
36801      input_to_shortpath="${new_path}.cmd"
36802    else
36803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36804$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36807      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36808    fi
36809  else
36810    input_to_shortpath="$new_path"
36811  fi
36812
36813  # Call helper function which possibly converts this using DOS-style short mode.
36814  # If so, the updated path is stored in $new_path.
36815  new_path="$input_to_shortpath"
36816
36817  input_path="$input_to_shortpath"
36818  # Check if we need to convert this using DOS-style short mode. If the path
36819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36820  # take no chances and rewrite it.
36821  # Note: m4 eats our [], so we need to use [ and ] instead.
36822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36823  if test "x$has_forbidden_chars" != x; then
36824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36828      # Going to short mode and back again did indeed matter. Since short mode is
36829      # case insensitive, let's make it lowercase to improve readability.
36830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36831      # Now convert it back to Unix-style (cygpath)
36832      input_path=`$CYGPATH -u "$shortmode_path"`
36833      new_path="$input_path"
36834    fi
36835  fi
36836
36837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36838  if test "x$test_cygdrive_prefix" = x; then
36839    # As a simple fix, exclude /usr/bin since it's not a real path.
36840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36842      # a path prefixed by /cygdrive for fixpath to work.
36843      new_path="$CYGWIN_ROOT_PATH$input_path"
36844    fi
36845  fi
36846
36847  # remove trailing .exe if any
36848  new_path="${new_path/%.exe/}"
36849
36850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36851
36852  # First separate the path from the arguments. This will split at the first
36853  # space.
36854  complete="$NM"
36855  path="${complete%% *}"
36856  tmp="$complete EOL"
36857  arguments="${tmp#* }"
36858
36859  # Input might be given as Windows format, start by converting to
36860  # unix format.
36861  new_path="$path"
36862
36863  windows_path="$new_path"
36864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36865    unix_path=`$CYGPATH -u "$windows_path"`
36866    new_path="$unix_path"
36867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36869    new_path="$unix_path"
36870  fi
36871
36872
36873  # Now try to locate executable using which
36874  new_path=`$WHICH "$new_path" 2> /dev/null`
36875
36876  if test "x$new_path" = x; then
36877    # Oops. Which didn't find the executable.
36878    # The splitting of arguments from the executable at a space might have been incorrect,
36879    # since paths with space are more likely in Windows. Give it another try with the whole
36880    # argument.
36881    path="$complete"
36882    arguments="EOL"
36883    new_path="$path"
36884
36885  windows_path="$new_path"
36886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36887    unix_path=`$CYGPATH -u "$windows_path"`
36888    new_path="$unix_path"
36889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36891    new_path="$unix_path"
36892  fi
36893
36894
36895    new_path=`$WHICH "$new_path" 2> /dev/null`
36896    # bat and cmd files are not always considered executable in MSYS causing which
36897    # to not find them
36898    if test "x$new_path" = x \
36899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36901      new_path="$path"
36902
36903  windows_path="$new_path"
36904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36905    unix_path=`$CYGPATH -u "$windows_path"`
36906    new_path="$unix_path"
36907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36909    new_path="$unix_path"
36910  fi
36911
36912    fi
36913
36914    if test "x$new_path" = x; then
36915      # It's still not found. Now this is an unrecoverable error.
36916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36917$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36918      has_space=`$ECHO "$complete" | $GREP " "`
36919      if test "x$has_space" != x; then
36920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36922      fi
36923      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36924    fi
36925  fi
36926
36927  # Now new_path has a complete unix path to the binary
36928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36929    # Keep paths in /bin as-is, but remove trailing .exe if any
36930    new_path="${new_path/%.exe/}"
36931    # Do not save /bin paths to all_fixpath_prefixes!
36932  else
36933    # Not in mixed or Windows style, start by that.
36934    new_path=`cmd //c echo $new_path`
36935
36936  input_path="$new_path"
36937  # Check if we need to convert this using DOS-style short mode. If the path
36938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36939  # take no chances and rewrite it.
36940  # Note: m4 eats our [], so we need to use [ and ] instead.
36941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36942  if test "x$has_forbidden_chars" != x; then
36943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36945  fi
36946
36947    # Output is in $new_path
36948
36949  windows_path="$new_path"
36950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36951    unix_path=`$CYGPATH -u "$windows_path"`
36952    new_path="$unix_path"
36953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36955    new_path="$unix_path"
36956  fi
36957
36958    # remove trailing .exe if any
36959    new_path="${new_path/%.exe/}"
36960
36961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36963  fi
36964
36965    else
36966      # We're on a unix platform. Hooray! :)
36967      # First separate the path from the arguments. This will split at the first
36968      # space.
36969      complete="$NM"
36970      path="${complete%% *}"
36971      tmp="$complete EOL"
36972      arguments="${tmp#* }"
36973
36974      # Cannot rely on the command "which" here since it doesn't always work.
36975      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36976      if test -z "$is_absolute_path"; then
36977        # Path to executable is not absolute. Find it.
36978        IFS_save="$IFS"
36979        IFS=:
36980        for p in $PATH; do
36981          if test -f "$p/$path" && test -x "$p/$path"; then
36982            new_path="$p/$path"
36983            break
36984          fi
36985        done
36986        IFS="$IFS_save"
36987      else
36988        # This is an absolute path, we can use it without further modifications.
36989        new_path="$path"
36990      fi
36991
36992      if test "x$new_path" = x; then
36993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36994$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36995        has_space=`$ECHO "$complete" | $GREP " "`
36996        if test "x$has_space" != x; then
36997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36999        fi
37000        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37001      fi
37002    fi
37003
37004    # Now join together the path and the arguments once again
37005    if test "x$arguments" != xEOL; then
37006      new_complete="$new_path ${arguments% *}"
37007    else
37008      new_complete="$new_path"
37009    fi
37010
37011    if test "x$complete" != "x$new_complete"; then
37012      NM="$new_complete"
37013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37014$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37015    fi
37016  fi
37017
37018
37019
37020  # Publish this variable in the help.
37021
37022
37023  if [ -z "${GNM+x}" ]; then
37024    # The variable is not set by user, try to locate tool using the code snippet
37025    for ac_prog in gnm
37026do
37027  # Extract the first word of "$ac_prog", so it can be a program name with args.
37028set dummy $ac_prog; ac_word=$2
37029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37030$as_echo_n "checking for $ac_word... " >&6; }
37031if ${ac_cv_path_GNM+:} false; then :
37032  $as_echo_n "(cached) " >&6
37033else
37034  case $GNM in
37035  [\\/]* | ?:[\\/]*)
37036  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37037  ;;
37038  *)
37039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37040for as_dir in $PATH
37041do
37042  IFS=$as_save_IFS
37043  test -z "$as_dir" && as_dir=.
37044    for ac_exec_ext in '' $ac_executable_extensions; do
37045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37046    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37048    break 2
37049  fi
37050done
37051  done
37052IFS=$as_save_IFS
37053
37054  ;;
37055esac
37056fi
37057GNM=$ac_cv_path_GNM
37058if test -n "$GNM"; then
37059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37060$as_echo "$GNM" >&6; }
37061else
37062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37063$as_echo "no" >&6; }
37064fi
37065
37066
37067  test -n "$GNM" && break
37068done
37069
37070  else
37071    # The variable is set, but is it from the command line or the environment?
37072
37073    # Try to remove the string !GNM! from our list.
37074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
37075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37076      # If it failed, the variable was not from the command line. Ignore it,
37077      # but warn the user (except for BASH, which is always set by the calling BASH).
37078      if test "xGNM" != xBASH; then
37079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
37080$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
37081      fi
37082      # Try to locate tool using the code snippet
37083      for ac_prog in gnm
37084do
37085  # Extract the first word of "$ac_prog", so it can be a program name with args.
37086set dummy $ac_prog; ac_word=$2
37087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37088$as_echo_n "checking for $ac_word... " >&6; }
37089if ${ac_cv_path_GNM+:} false; then :
37090  $as_echo_n "(cached) " >&6
37091else
37092  case $GNM in
37093  [\\/]* | ?:[\\/]*)
37094  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37095  ;;
37096  *)
37097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37098for as_dir in $PATH
37099do
37100  IFS=$as_save_IFS
37101  test -z "$as_dir" && as_dir=.
37102    for ac_exec_ext in '' $ac_executable_extensions; do
37103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37104    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37106    break 2
37107  fi
37108done
37109  done
37110IFS=$as_save_IFS
37111
37112  ;;
37113esac
37114fi
37115GNM=$ac_cv_path_GNM
37116if test -n "$GNM"; then
37117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37118$as_echo "$GNM" >&6; }
37119else
37120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37121$as_echo "no" >&6; }
37122fi
37123
37124
37125  test -n "$GNM" && break
37126done
37127
37128    else
37129      # If it succeeded, then it was overridden by the user. We will use it
37130      # for the tool.
37131
37132      # First remove it from the list of overridden variables, so we can test
37133      # for unknown variables in the end.
37134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37135
37136      # Check if we try to supply an empty value
37137      if test "x$GNM" = x; then
37138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
37139$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
37140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37141$as_echo_n "checking for GNM... " >&6; }
37142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37143$as_echo "disabled" >&6; }
37144      else
37145        # Check if the provided tool contains a complete path.
37146        tool_specified="$GNM"
37147        tool_basename="${tool_specified##*/}"
37148        if test "x$tool_basename" = "x$tool_specified"; then
37149          # A command without a complete path is provided, search $PATH.
37150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
37151$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
37152          # Extract the first word of "$tool_basename", so it can be a program name with args.
37153set dummy $tool_basename; ac_word=$2
37154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37155$as_echo_n "checking for $ac_word... " >&6; }
37156if ${ac_cv_path_GNM+:} false; then :
37157  $as_echo_n "(cached) " >&6
37158else
37159  case $GNM in
37160  [\\/]* | ?:[\\/]*)
37161  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37162  ;;
37163  *)
37164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37165for as_dir in $PATH
37166do
37167  IFS=$as_save_IFS
37168  test -z "$as_dir" && as_dir=.
37169    for ac_exec_ext in '' $ac_executable_extensions; do
37170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37171    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37173    break 2
37174  fi
37175done
37176  done
37177IFS=$as_save_IFS
37178
37179  ;;
37180esac
37181fi
37182GNM=$ac_cv_path_GNM
37183if test -n "$GNM"; then
37184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37185$as_echo "$GNM" >&6; }
37186else
37187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37188$as_echo "no" >&6; }
37189fi
37190
37191
37192          if test "x$GNM" = x; then
37193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37194          fi
37195        else
37196          # Otherwise we believe it is a complete path. Use it as it is.
37197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37198$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37200$as_echo_n "checking for GNM... " >&6; }
37201          if test ! -x "$tool_specified"; then
37202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37203$as_echo "not found" >&6; }
37204            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37205          fi
37206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37207$as_echo "$tool_specified" >&6; }
37208        fi
37209      fi
37210    fi
37211  fi
37212
37213
37214
37215  # Only process if variable expands to non-empty
37216
37217  if test "x$GNM" != x; then
37218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37219
37220  # First separate the path from the arguments. This will split at the first
37221  # space.
37222  complete="$GNM"
37223  path="${complete%% *}"
37224  tmp="$complete EOL"
37225  arguments="${tmp#* }"
37226
37227  # Input might be given as Windows format, start by converting to
37228  # unix format.
37229  new_path=`$CYGPATH -u "$path"`
37230
37231  # Now try to locate executable using which
37232  new_path=`$WHICH "$new_path" 2> /dev/null`
37233  # bat and cmd files are not always considered executable in cygwin causing which
37234  # to not find them
37235  if test "x$new_path" = x \
37236      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37237      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37238    new_path=`$CYGPATH -u "$path"`
37239  fi
37240  if test "x$new_path" = x; then
37241    # Oops. Which didn't find the executable.
37242    # The splitting of arguments from the executable at a space might have been incorrect,
37243    # since paths with space are more likely in Windows. Give it another try with the whole
37244    # argument.
37245    path="$complete"
37246    arguments="EOL"
37247    new_path=`$CYGPATH -u "$path"`
37248    new_path=`$WHICH "$new_path" 2> /dev/null`
37249    # bat and cmd files are not always considered executable in cygwin causing which
37250    # to not find them
37251    if test "x$new_path" = x \
37252        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37253        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37254      new_path=`$CYGPATH -u "$path"`
37255    fi
37256    if test "x$new_path" = x; then
37257      # It's still not found. Now this is an unrecoverable error.
37258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37259$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37260      has_space=`$ECHO "$complete" | $GREP " "`
37261      if test "x$has_space" != x; then
37262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37264      fi
37265      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37266    fi
37267  fi
37268
37269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37272  # "foo.exe" is OK but "foo" is an error.
37273  #
37274  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37275  # It is also a way to make sure we got the proper file name for the real test later on.
37276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37277  if test "x$test_shortpath" = x; then
37278    # Short path failed, file does not exist as specified.
37279    # Try adding .exe or .cmd
37280    if test -f "${new_path}.exe"; then
37281      input_to_shortpath="${new_path}.exe"
37282    elif test -f "${new_path}.cmd"; then
37283      input_to_shortpath="${new_path}.cmd"
37284    else
37285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37286$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37287      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37288$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37289      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37290    fi
37291  else
37292    input_to_shortpath="$new_path"
37293  fi
37294
37295  # Call helper function which possibly converts this using DOS-style short mode.
37296  # If so, the updated path is stored in $new_path.
37297  new_path="$input_to_shortpath"
37298
37299  input_path="$input_to_shortpath"
37300  # Check if we need to convert this using DOS-style short mode. If the path
37301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37302  # take no chances and rewrite it.
37303  # Note: m4 eats our [], so we need to use [ and ] instead.
37304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37305  if test "x$has_forbidden_chars" != x; then
37306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37310      # Going to short mode and back again did indeed matter. Since short mode is
37311      # case insensitive, let's make it lowercase to improve readability.
37312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37313      # Now convert it back to Unix-style (cygpath)
37314      input_path=`$CYGPATH -u "$shortmode_path"`
37315      new_path="$input_path"
37316    fi
37317  fi
37318
37319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37320  if test "x$test_cygdrive_prefix" = x; then
37321    # As a simple fix, exclude /usr/bin since it's not a real path.
37322    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37324      # a path prefixed by /cygdrive for fixpath to work.
37325      new_path="$CYGWIN_ROOT_PATH$input_path"
37326    fi
37327  fi
37328
37329  # remove trailing .exe if any
37330  new_path="${new_path/%.exe/}"
37331
37332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37333
37334  # First separate the path from the arguments. This will split at the first
37335  # space.
37336  complete="$GNM"
37337  path="${complete%% *}"
37338  tmp="$complete EOL"
37339  arguments="${tmp#* }"
37340
37341  # Input might be given as Windows format, start by converting to
37342  # unix format.
37343  new_path="$path"
37344
37345  windows_path="$new_path"
37346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37347    unix_path=`$CYGPATH -u "$windows_path"`
37348    new_path="$unix_path"
37349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37351    new_path="$unix_path"
37352  fi
37353
37354
37355  # Now try to locate executable using which
37356  new_path=`$WHICH "$new_path" 2> /dev/null`
37357
37358  if test "x$new_path" = x; then
37359    # Oops. Which didn't find the executable.
37360    # The splitting of arguments from the executable at a space might have been incorrect,
37361    # since paths with space are more likely in Windows. Give it another try with the whole
37362    # argument.
37363    path="$complete"
37364    arguments="EOL"
37365    new_path="$path"
37366
37367  windows_path="$new_path"
37368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37369    unix_path=`$CYGPATH -u "$windows_path"`
37370    new_path="$unix_path"
37371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37373    new_path="$unix_path"
37374  fi
37375
37376
37377    new_path=`$WHICH "$new_path" 2> /dev/null`
37378    # bat and cmd files are not always considered executable in MSYS causing which
37379    # to not find them
37380    if test "x$new_path" = x \
37381        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37382        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37383      new_path="$path"
37384
37385  windows_path="$new_path"
37386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37387    unix_path=`$CYGPATH -u "$windows_path"`
37388    new_path="$unix_path"
37389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37391    new_path="$unix_path"
37392  fi
37393
37394    fi
37395
37396    if test "x$new_path" = x; then
37397      # It's still not found. Now this is an unrecoverable error.
37398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37399$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37400      has_space=`$ECHO "$complete" | $GREP " "`
37401      if test "x$has_space" != x; then
37402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37404      fi
37405      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37406    fi
37407  fi
37408
37409  # Now new_path has a complete unix path to the binary
37410  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37411    # Keep paths in /bin as-is, but remove trailing .exe if any
37412    new_path="${new_path/%.exe/}"
37413    # Do not save /bin paths to all_fixpath_prefixes!
37414  else
37415    # Not in mixed or Windows style, start by that.
37416    new_path=`cmd //c echo $new_path`
37417
37418  input_path="$new_path"
37419  # Check if we need to convert this using DOS-style short mode. If the path
37420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37421  # take no chances and rewrite it.
37422  # Note: m4 eats our [], so we need to use [ and ] instead.
37423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37424  if test "x$has_forbidden_chars" != x; then
37425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37427  fi
37428
37429    # Output is in $new_path
37430
37431  windows_path="$new_path"
37432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37433    unix_path=`$CYGPATH -u "$windows_path"`
37434    new_path="$unix_path"
37435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37437    new_path="$unix_path"
37438  fi
37439
37440    # remove trailing .exe if any
37441    new_path="${new_path/%.exe/}"
37442
37443    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37444    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37445  fi
37446
37447    else
37448      # We're on a unix platform. Hooray! :)
37449      # First separate the path from the arguments. This will split at the first
37450      # space.
37451      complete="$GNM"
37452      path="${complete%% *}"
37453      tmp="$complete EOL"
37454      arguments="${tmp#* }"
37455
37456      # Cannot rely on the command "which" here since it doesn't always work.
37457      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37458      if test -z "$is_absolute_path"; then
37459        # Path to executable is not absolute. Find it.
37460        IFS_save="$IFS"
37461        IFS=:
37462        for p in $PATH; do
37463          if test -f "$p/$path" && test -x "$p/$path"; then
37464            new_path="$p/$path"
37465            break
37466          fi
37467        done
37468        IFS="$IFS_save"
37469      else
37470        # This is an absolute path, we can use it without further modifications.
37471        new_path="$path"
37472      fi
37473
37474      if test "x$new_path" = x; then
37475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37476$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37477        has_space=`$ECHO "$complete" | $GREP " "`
37478        if test "x$has_space" != x; then
37479          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37480$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37481        fi
37482        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37483      fi
37484    fi
37485
37486    # Now join together the path and the arguments once again
37487    if test "x$arguments" != xEOL; then
37488      new_complete="$new_path ${arguments% *}"
37489    else
37490      new_complete="$new_path"
37491    fi
37492
37493    if test "x$complete" != "x$new_complete"; then
37494      GNM="$new_complete"
37495      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37496$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37497    fi
37498  fi
37499
37500  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37501    # FIXME: we should unify this with the solaris case above.
37502
37503
37504  # Publish this variable in the help.
37505
37506
37507  if [ -z "${STRIP+x}" ]; then
37508    # The variable is not set by user, try to locate tool using the code snippet
37509    if test -n "$ac_tool_prefix"; then
37510  for ac_prog in strip
37511  do
37512    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37513set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37515$as_echo_n "checking for $ac_word... " >&6; }
37516if ${ac_cv_prog_STRIP+:} false; then :
37517  $as_echo_n "(cached) " >&6
37518else
37519  if test -n "$STRIP"; then
37520  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37521else
37522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37523for as_dir in $PATH
37524do
37525  IFS=$as_save_IFS
37526  test -z "$as_dir" && as_dir=.
37527    for ac_exec_ext in '' $ac_executable_extensions; do
37528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37529    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37531    break 2
37532  fi
37533done
37534  done
37535IFS=$as_save_IFS
37536
37537fi
37538fi
37539STRIP=$ac_cv_prog_STRIP
37540if test -n "$STRIP"; then
37541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37542$as_echo "$STRIP" >&6; }
37543else
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37545$as_echo "no" >&6; }
37546fi
37547
37548
37549    test -n "$STRIP" && break
37550  done
37551fi
37552if test -z "$STRIP"; then
37553  ac_ct_STRIP=$STRIP
37554  for ac_prog in strip
37555do
37556  # Extract the first word of "$ac_prog", so it can be a program name with args.
37557set dummy $ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  if test -n "$ac_ct_STRIP"; then
37564  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37565else
37566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37567for as_dir in $PATH
37568do
37569  IFS=$as_save_IFS
37570  test -z "$as_dir" && as_dir=.
37571    for ac_exec_ext in '' $ac_executable_extensions; do
37572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37573    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37575    break 2
37576  fi
37577done
37578  done
37579IFS=$as_save_IFS
37580
37581fi
37582fi
37583ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37584if test -n "$ac_ct_STRIP"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37586$as_echo "$ac_ct_STRIP" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593  test -n "$ac_ct_STRIP" && break
37594done
37595
37596  if test "x$ac_ct_STRIP" = x; then
37597    STRIP=""
37598  else
37599    case $cross_compiling:$ac_tool_warned in
37600yes:)
37601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37603ac_tool_warned=yes ;;
37604esac
37605    STRIP=$ac_ct_STRIP
37606  fi
37607fi
37608
37609  else
37610    # The variable is set, but is it from the command line or the environment?
37611
37612    # Try to remove the string !STRIP! from our list.
37613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37615      # If it failed, the variable was not from the command line. Ignore it,
37616      # but warn the user (except for BASH, which is always set by the calling BASH).
37617      if test "xSTRIP" != xBASH; then
37618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37619$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37620      fi
37621      # Try to locate tool using the code snippet
37622      if test -n "$ac_tool_prefix"; then
37623  for ac_prog in strip
37624  do
37625    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37626set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37628$as_echo_n "checking for $ac_word... " >&6; }
37629if ${ac_cv_prog_STRIP+:} false; then :
37630  $as_echo_n "(cached) " >&6
37631else
37632  if test -n "$STRIP"; then
37633  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37634else
37635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37636for as_dir in $PATH
37637do
37638  IFS=$as_save_IFS
37639  test -z "$as_dir" && as_dir=.
37640    for ac_exec_ext in '' $ac_executable_extensions; do
37641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37642    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37644    break 2
37645  fi
37646done
37647  done
37648IFS=$as_save_IFS
37649
37650fi
37651fi
37652STRIP=$ac_cv_prog_STRIP
37653if test -n "$STRIP"; then
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37655$as_echo "$STRIP" >&6; }
37656else
37657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37658$as_echo "no" >&6; }
37659fi
37660
37661
37662    test -n "$STRIP" && break
37663  done
37664fi
37665if test -z "$STRIP"; then
37666  ac_ct_STRIP=$STRIP
37667  for ac_prog in strip
37668do
37669  # Extract the first word of "$ac_prog", so it can be a program name with args.
37670set dummy $ac_prog; ac_word=$2
37671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37672$as_echo_n "checking for $ac_word... " >&6; }
37673if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37674  $as_echo_n "(cached) " >&6
37675else
37676  if test -n "$ac_ct_STRIP"; then
37677  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37678else
37679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37680for as_dir in $PATH
37681do
37682  IFS=$as_save_IFS
37683  test -z "$as_dir" && as_dir=.
37684    for ac_exec_ext in '' $ac_executable_extensions; do
37685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37686    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37688    break 2
37689  fi
37690done
37691  done
37692IFS=$as_save_IFS
37693
37694fi
37695fi
37696ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37697if test -n "$ac_ct_STRIP"; then
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37699$as_echo "$ac_ct_STRIP" >&6; }
37700else
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37702$as_echo "no" >&6; }
37703fi
37704
37705
37706  test -n "$ac_ct_STRIP" && break
37707done
37708
37709  if test "x$ac_ct_STRIP" = x; then
37710    STRIP=""
37711  else
37712    case $cross_compiling:$ac_tool_warned in
37713yes:)
37714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37716ac_tool_warned=yes ;;
37717esac
37718    STRIP=$ac_ct_STRIP
37719  fi
37720fi
37721
37722    else
37723      # If it succeeded, then it was overridden by the user. We will use it
37724      # for the tool.
37725
37726      # First remove it from the list of overridden variables, so we can test
37727      # for unknown variables in the end.
37728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37729
37730      # Check if we try to supply an empty value
37731      if test "x$STRIP" = x; then
37732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37733$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37735$as_echo_n "checking for STRIP... " >&6; }
37736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37737$as_echo "disabled" >&6; }
37738      else
37739        # Check if the provided tool contains a complete path.
37740        tool_specified="$STRIP"
37741        tool_basename="${tool_specified##*/}"
37742        if test "x$tool_basename" = "x$tool_specified"; then
37743          # A command without a complete path is provided, search $PATH.
37744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37745$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37746          # Extract the first word of "$tool_basename", so it can be a program name with args.
37747set dummy $tool_basename; ac_word=$2
37748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37749$as_echo_n "checking for $ac_word... " >&6; }
37750if ${ac_cv_path_STRIP+:} false; then :
37751  $as_echo_n "(cached) " >&6
37752else
37753  case $STRIP in
37754  [\\/]* | ?:[\\/]*)
37755  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37756  ;;
37757  *)
37758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37759for as_dir in $PATH
37760do
37761  IFS=$as_save_IFS
37762  test -z "$as_dir" && as_dir=.
37763    for ac_exec_ext in '' $ac_executable_extensions; do
37764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37765    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37767    break 2
37768  fi
37769done
37770  done
37771IFS=$as_save_IFS
37772
37773  ;;
37774esac
37775fi
37776STRIP=$ac_cv_path_STRIP
37777if test -n "$STRIP"; then
37778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37779$as_echo "$STRIP" >&6; }
37780else
37781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37782$as_echo "no" >&6; }
37783fi
37784
37785
37786          if test "x$STRIP" = x; then
37787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37788          fi
37789        else
37790          # Otherwise we believe it is a complete path. Use it as it is.
37791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37792$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37794$as_echo_n "checking for STRIP... " >&6; }
37795          if test ! -x "$tool_specified"; then
37796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37797$as_echo "not found" >&6; }
37798            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37799          fi
37800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37801$as_echo "$tool_specified" >&6; }
37802        fi
37803      fi
37804    fi
37805  fi
37806
37807
37808
37809  # Only process if variable expands to non-empty
37810
37811  if test "x$STRIP" != x; then
37812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37813
37814  # First separate the path from the arguments. This will split at the first
37815  # space.
37816  complete="$STRIP"
37817  path="${complete%% *}"
37818  tmp="$complete EOL"
37819  arguments="${tmp#* }"
37820
37821  # Input might be given as Windows format, start by converting to
37822  # unix format.
37823  new_path=`$CYGPATH -u "$path"`
37824
37825  # Now try to locate executable using which
37826  new_path=`$WHICH "$new_path" 2> /dev/null`
37827  # bat and cmd files are not always considered executable in cygwin causing which
37828  # to not find them
37829  if test "x$new_path" = x \
37830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37832    new_path=`$CYGPATH -u "$path"`
37833  fi
37834  if test "x$new_path" = x; then
37835    # Oops. Which didn't find the executable.
37836    # The splitting of arguments from the executable at a space might have been incorrect,
37837    # since paths with space are more likely in Windows. Give it another try with the whole
37838    # argument.
37839    path="$complete"
37840    arguments="EOL"
37841    new_path=`$CYGPATH -u "$path"`
37842    new_path=`$WHICH "$new_path" 2> /dev/null`
37843    # bat and cmd files are not always considered executable in cygwin causing which
37844    # to not find them
37845    if test "x$new_path" = x \
37846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37848      new_path=`$CYGPATH -u "$path"`
37849    fi
37850    if test "x$new_path" = x; then
37851      # It's still not found. Now this is an unrecoverable error.
37852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37853$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37854      has_space=`$ECHO "$complete" | $GREP " "`
37855      if test "x$has_space" != x; then
37856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37858      fi
37859      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37860    fi
37861  fi
37862
37863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37866  # "foo.exe" is OK but "foo" is an error.
37867  #
37868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37869  # It is also a way to make sure we got the proper file name for the real test later on.
37870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37871  if test "x$test_shortpath" = x; then
37872    # Short path failed, file does not exist as specified.
37873    # Try adding .exe or .cmd
37874    if test -f "${new_path}.exe"; then
37875      input_to_shortpath="${new_path}.exe"
37876    elif test -f "${new_path}.cmd"; then
37877      input_to_shortpath="${new_path}.cmd"
37878    else
37879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37880$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37883      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37884    fi
37885  else
37886    input_to_shortpath="$new_path"
37887  fi
37888
37889  # Call helper function which possibly converts this using DOS-style short mode.
37890  # If so, the updated path is stored in $new_path.
37891  new_path="$input_to_shortpath"
37892
37893  input_path="$input_to_shortpath"
37894  # Check if we need to convert this using DOS-style short mode. If the path
37895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37896  # take no chances and rewrite it.
37897  # Note: m4 eats our [], so we need to use [ and ] instead.
37898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37899  if test "x$has_forbidden_chars" != x; then
37900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37904      # Going to short mode and back again did indeed matter. Since short mode is
37905      # case insensitive, let's make it lowercase to improve readability.
37906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37907      # Now convert it back to Unix-style (cygpath)
37908      input_path=`$CYGPATH -u "$shortmode_path"`
37909      new_path="$input_path"
37910    fi
37911  fi
37912
37913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37914  if test "x$test_cygdrive_prefix" = x; then
37915    # As a simple fix, exclude /usr/bin since it's not a real path.
37916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37918      # a path prefixed by /cygdrive for fixpath to work.
37919      new_path="$CYGWIN_ROOT_PATH$input_path"
37920    fi
37921  fi
37922
37923  # remove trailing .exe if any
37924  new_path="${new_path/%.exe/}"
37925
37926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37927
37928  # First separate the path from the arguments. This will split at the first
37929  # space.
37930  complete="$STRIP"
37931  path="${complete%% *}"
37932  tmp="$complete EOL"
37933  arguments="${tmp#* }"
37934
37935  # Input might be given as Windows format, start by converting to
37936  # unix format.
37937  new_path="$path"
37938
37939  windows_path="$new_path"
37940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37941    unix_path=`$CYGPATH -u "$windows_path"`
37942    new_path="$unix_path"
37943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37945    new_path="$unix_path"
37946  fi
37947
37948
37949  # Now try to locate executable using which
37950  new_path=`$WHICH "$new_path" 2> /dev/null`
37951
37952  if test "x$new_path" = x; then
37953    # Oops. Which didn't find the executable.
37954    # The splitting of arguments from the executable at a space might have been incorrect,
37955    # since paths with space are more likely in Windows. Give it another try with the whole
37956    # argument.
37957    path="$complete"
37958    arguments="EOL"
37959    new_path="$path"
37960
37961  windows_path="$new_path"
37962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963    unix_path=`$CYGPATH -u "$windows_path"`
37964    new_path="$unix_path"
37965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967    new_path="$unix_path"
37968  fi
37969
37970
37971    new_path=`$WHICH "$new_path" 2> /dev/null`
37972    # bat and cmd files are not always considered executable in MSYS causing which
37973    # to not find them
37974    if test "x$new_path" = x \
37975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37977      new_path="$path"
37978
37979  windows_path="$new_path"
37980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37981    unix_path=`$CYGPATH -u "$windows_path"`
37982    new_path="$unix_path"
37983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37985    new_path="$unix_path"
37986  fi
37987
37988    fi
37989
37990    if test "x$new_path" = x; then
37991      # It's still not found. Now this is an unrecoverable error.
37992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37993$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37994      has_space=`$ECHO "$complete" | $GREP " "`
37995      if test "x$has_space" != x; then
37996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37998      fi
37999      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38000    fi
38001  fi
38002
38003  # Now new_path has a complete unix path to the binary
38004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38005    # Keep paths in /bin as-is, but remove trailing .exe if any
38006    new_path="${new_path/%.exe/}"
38007    # Do not save /bin paths to all_fixpath_prefixes!
38008  else
38009    # Not in mixed or Windows style, start by that.
38010    new_path=`cmd //c echo $new_path`
38011
38012  input_path="$new_path"
38013  # Check if we need to convert this using DOS-style short mode. If the path
38014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38015  # take no chances and rewrite it.
38016  # Note: m4 eats our [], so we need to use [ and ] instead.
38017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38018  if test "x$has_forbidden_chars" != x; then
38019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38021  fi
38022
38023    # Output is in $new_path
38024
38025  windows_path="$new_path"
38026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38027    unix_path=`$CYGPATH -u "$windows_path"`
38028    new_path="$unix_path"
38029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38031    new_path="$unix_path"
38032  fi
38033
38034    # remove trailing .exe if any
38035    new_path="${new_path/%.exe/}"
38036
38037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38039  fi
38040
38041    else
38042      # We're on a unix platform. Hooray! :)
38043      # First separate the path from the arguments. This will split at the first
38044      # space.
38045      complete="$STRIP"
38046      path="${complete%% *}"
38047      tmp="$complete EOL"
38048      arguments="${tmp#* }"
38049
38050      # Cannot rely on the command "which" here since it doesn't always work.
38051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38052      if test -z "$is_absolute_path"; then
38053        # Path to executable is not absolute. Find it.
38054        IFS_save="$IFS"
38055        IFS=:
38056        for p in $PATH; do
38057          if test -f "$p/$path" && test -x "$p/$path"; then
38058            new_path="$p/$path"
38059            break
38060          fi
38061        done
38062        IFS="$IFS_save"
38063      else
38064        # This is an absolute path, we can use it without further modifications.
38065        new_path="$path"
38066      fi
38067
38068      if test "x$new_path" = x; then
38069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38070$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38071        has_space=`$ECHO "$complete" | $GREP " "`
38072        if test "x$has_space" != x; then
38073          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38075        fi
38076        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38077      fi
38078    fi
38079
38080    # Now join together the path and the arguments once again
38081    if test "x$arguments" != xEOL; then
38082      new_complete="$new_path ${arguments% *}"
38083    else
38084      new_complete="$new_path"
38085    fi
38086
38087    if test "x$complete" != "x$new_complete"; then
38088      STRIP="$new_complete"
38089      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38090$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38091    fi
38092  fi
38093
38094
38095
38096  # Publish this variable in the help.
38097
38098
38099  if [ -z "${NM+x}" ]; then
38100    # The variable is not set by user, try to locate tool using the code snippet
38101    if test -n "$ac_tool_prefix"; then
38102  for ac_prog in nm
38103  do
38104    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38107$as_echo_n "checking for $ac_word... " >&6; }
38108if ${ac_cv_prog_NM+:} false; then :
38109  $as_echo_n "(cached) " >&6
38110else
38111  if test -n "$NM"; then
38112  ac_cv_prog_NM="$NM" # Let the user override the test.
38113else
38114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38115for as_dir in $PATH
38116do
38117  IFS=$as_save_IFS
38118  test -z "$as_dir" && as_dir=.
38119    for ac_exec_ext in '' $ac_executable_extensions; do
38120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38121    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38123    break 2
38124  fi
38125done
38126  done
38127IFS=$as_save_IFS
38128
38129fi
38130fi
38131NM=$ac_cv_prog_NM
38132if test -n "$NM"; then
38133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38134$as_echo "$NM" >&6; }
38135else
38136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38137$as_echo "no" >&6; }
38138fi
38139
38140
38141    test -n "$NM" && break
38142  done
38143fi
38144if test -z "$NM"; then
38145  ac_ct_NM=$NM
38146  for ac_prog in nm
38147do
38148  # Extract the first word of "$ac_prog", so it can be a program name with args.
38149set dummy $ac_prog; ac_word=$2
38150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38151$as_echo_n "checking for $ac_word... " >&6; }
38152if ${ac_cv_prog_ac_ct_NM+:} false; then :
38153  $as_echo_n "(cached) " >&6
38154else
38155  if test -n "$ac_ct_NM"; then
38156  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38157else
38158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38159for as_dir in $PATH
38160do
38161  IFS=$as_save_IFS
38162  test -z "$as_dir" && as_dir=.
38163    for ac_exec_ext in '' $ac_executable_extensions; do
38164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38165    ac_cv_prog_ac_ct_NM="$ac_prog"
38166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38167    break 2
38168  fi
38169done
38170  done
38171IFS=$as_save_IFS
38172
38173fi
38174fi
38175ac_ct_NM=$ac_cv_prog_ac_ct_NM
38176if test -n "$ac_ct_NM"; then
38177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38178$as_echo "$ac_ct_NM" >&6; }
38179else
38180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38181$as_echo "no" >&6; }
38182fi
38183
38184
38185  test -n "$ac_ct_NM" && break
38186done
38187
38188  if test "x$ac_ct_NM" = x; then
38189    NM=""
38190  else
38191    case $cross_compiling:$ac_tool_warned in
38192yes:)
38193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38195ac_tool_warned=yes ;;
38196esac
38197    NM=$ac_ct_NM
38198  fi
38199fi
38200
38201  else
38202    # The variable is set, but is it from the command line or the environment?
38203
38204    # Try to remove the string !NM! from our list.
38205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38207      # If it failed, the variable was not from the command line. Ignore it,
38208      # but warn the user (except for BASH, which is always set by the calling BASH).
38209      if test "xNM" != xBASH; then
38210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38211$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38212      fi
38213      # Try to locate tool using the code snippet
38214      if test -n "$ac_tool_prefix"; then
38215  for ac_prog in nm
38216  do
38217    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38218set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38220$as_echo_n "checking for $ac_word... " >&6; }
38221if ${ac_cv_prog_NM+:} false; then :
38222  $as_echo_n "(cached) " >&6
38223else
38224  if test -n "$NM"; then
38225  ac_cv_prog_NM="$NM" # Let the user override the test.
38226else
38227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38228for as_dir in $PATH
38229do
38230  IFS=$as_save_IFS
38231  test -z "$as_dir" && as_dir=.
38232    for ac_exec_ext in '' $ac_executable_extensions; do
38233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38234    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38236    break 2
38237  fi
38238done
38239  done
38240IFS=$as_save_IFS
38241
38242fi
38243fi
38244NM=$ac_cv_prog_NM
38245if test -n "$NM"; then
38246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38247$as_echo "$NM" >&6; }
38248else
38249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38250$as_echo "no" >&6; }
38251fi
38252
38253
38254    test -n "$NM" && break
38255  done
38256fi
38257if test -z "$NM"; then
38258  ac_ct_NM=$NM
38259  for ac_prog in nm
38260do
38261  # Extract the first word of "$ac_prog", so it can be a program name with args.
38262set dummy $ac_prog; ac_word=$2
38263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38264$as_echo_n "checking for $ac_word... " >&6; }
38265if ${ac_cv_prog_ac_ct_NM+:} false; then :
38266  $as_echo_n "(cached) " >&6
38267else
38268  if test -n "$ac_ct_NM"; then
38269  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38270else
38271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38272for as_dir in $PATH
38273do
38274  IFS=$as_save_IFS
38275  test -z "$as_dir" && as_dir=.
38276    for ac_exec_ext in '' $ac_executable_extensions; do
38277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38278    ac_cv_prog_ac_ct_NM="$ac_prog"
38279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38280    break 2
38281  fi
38282done
38283  done
38284IFS=$as_save_IFS
38285
38286fi
38287fi
38288ac_ct_NM=$ac_cv_prog_ac_ct_NM
38289if test -n "$ac_ct_NM"; then
38290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38291$as_echo "$ac_ct_NM" >&6; }
38292else
38293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38294$as_echo "no" >&6; }
38295fi
38296
38297
38298  test -n "$ac_ct_NM" && break
38299done
38300
38301  if test "x$ac_ct_NM" = x; then
38302    NM=""
38303  else
38304    case $cross_compiling:$ac_tool_warned in
38305yes:)
38306{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38307$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38308ac_tool_warned=yes ;;
38309esac
38310    NM=$ac_ct_NM
38311  fi
38312fi
38313
38314    else
38315      # If it succeeded, then it was overridden by the user. We will use it
38316      # for the tool.
38317
38318      # First remove it from the list of overridden variables, so we can test
38319      # for unknown variables in the end.
38320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38321
38322      # Check if we try to supply an empty value
38323      if test "x$NM" = x; then
38324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38325$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38327$as_echo_n "checking for NM... " >&6; }
38328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38329$as_echo "disabled" >&6; }
38330      else
38331        # Check if the provided tool contains a complete path.
38332        tool_specified="$NM"
38333        tool_basename="${tool_specified##*/}"
38334        if test "x$tool_basename" = "x$tool_specified"; then
38335          # A command without a complete path is provided, search $PATH.
38336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38337$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38338          # Extract the first word of "$tool_basename", so it can be a program name with args.
38339set dummy $tool_basename; ac_word=$2
38340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38341$as_echo_n "checking for $ac_word... " >&6; }
38342if ${ac_cv_path_NM+:} false; then :
38343  $as_echo_n "(cached) " >&6
38344else
38345  case $NM in
38346  [\\/]* | ?:[\\/]*)
38347  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38348  ;;
38349  *)
38350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38351for as_dir in $PATH
38352do
38353  IFS=$as_save_IFS
38354  test -z "$as_dir" && as_dir=.
38355    for ac_exec_ext in '' $ac_executable_extensions; do
38356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38357    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38359    break 2
38360  fi
38361done
38362  done
38363IFS=$as_save_IFS
38364
38365  ;;
38366esac
38367fi
38368NM=$ac_cv_path_NM
38369if test -n "$NM"; then
38370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38371$as_echo "$NM" >&6; }
38372else
38373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38374$as_echo "no" >&6; }
38375fi
38376
38377
38378          if test "x$NM" = x; then
38379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38380          fi
38381        else
38382          # Otherwise we believe it is a complete path. Use it as it is.
38383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38384$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38386$as_echo_n "checking for NM... " >&6; }
38387          if test ! -x "$tool_specified"; then
38388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38389$as_echo "not found" >&6; }
38390            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38391          fi
38392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38393$as_echo "$tool_specified" >&6; }
38394        fi
38395      fi
38396    fi
38397  fi
38398
38399
38400
38401  # Only process if variable expands to non-empty
38402
38403  if test "x$NM" != x; then
38404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38405
38406  # First separate the path from the arguments. This will split at the first
38407  # space.
38408  complete="$NM"
38409  path="${complete%% *}"
38410  tmp="$complete EOL"
38411  arguments="${tmp#* }"
38412
38413  # Input might be given as Windows format, start by converting to
38414  # unix format.
38415  new_path=`$CYGPATH -u "$path"`
38416
38417  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
38428    # The splitting of arguments from the executable at a space might have been incorrect,
38429    # since paths with space are more likely in Windows. Give it another try with the whole
38430    # argument.
38431    path="$complete"
38432    arguments="EOL"
38433    new_path=`$CYGPATH -u "$path"`
38434    new_path=`$WHICH "$new_path" 2> /dev/null`
38435    # bat and cmd files are not always considered executable in cygwin causing which
38436    # to not find them
38437    if test "x$new_path" = x \
38438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38440      new_path=`$CYGPATH -u "$path"`
38441    fi
38442    if test "x$new_path" = x; then
38443      # It's still not found. Now this is an unrecoverable error.
38444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38445$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38446      has_space=`$ECHO "$complete" | $GREP " "`
38447      if test "x$has_space" != x; then
38448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38450      fi
38451      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38452    fi
38453  fi
38454
38455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38458  # "foo.exe" is OK but "foo" is an error.
38459  #
38460  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38461  # It is also a way to make sure we got the proper file name for the real test later on.
38462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38463  if test "x$test_shortpath" = x; then
38464    # Short path failed, file does not exist as specified.
38465    # Try adding .exe or .cmd
38466    if test -f "${new_path}.exe"; then
38467      input_to_shortpath="${new_path}.exe"
38468    elif test -f "${new_path}.cmd"; then
38469      input_to_shortpath="${new_path}.cmd"
38470    else
38471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38472$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38473      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38474$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38475      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38476    fi
38477  else
38478    input_to_shortpath="$new_path"
38479  fi
38480
38481  # Call helper function which possibly converts this using DOS-style short mode.
38482  # If so, the updated path is stored in $new_path.
38483  new_path="$input_to_shortpath"
38484
38485  input_path="$input_to_shortpath"
38486  # Check if we need to convert this using DOS-style short mode. If the path
38487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38488  # take no chances and rewrite it.
38489  # Note: m4 eats our [], so we need to use [ and ] instead.
38490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38491  if test "x$has_forbidden_chars" != x; then
38492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38496      # Going to short mode and back again did indeed matter. Since short mode is
38497      # case insensitive, let's make it lowercase to improve readability.
38498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38499      # Now convert it back to Unix-style (cygpath)
38500      input_path=`$CYGPATH -u "$shortmode_path"`
38501      new_path="$input_path"
38502    fi
38503  fi
38504
38505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38506  if test "x$test_cygdrive_prefix" = x; then
38507    # As a simple fix, exclude /usr/bin since it's not a real path.
38508    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38510      # a path prefixed by /cygdrive for fixpath to work.
38511      new_path="$CYGWIN_ROOT_PATH$input_path"
38512    fi
38513  fi
38514
38515  # remove trailing .exe if any
38516  new_path="${new_path/%.exe/}"
38517
38518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38519
38520  # First separate the path from the arguments. This will split at the first
38521  # space.
38522  complete="$NM"
38523  path="${complete%% *}"
38524  tmp="$complete EOL"
38525  arguments="${tmp#* }"
38526
38527  # Input might be given as Windows format, start by converting to
38528  # unix format.
38529  new_path="$path"
38530
38531  windows_path="$new_path"
38532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38533    unix_path=`$CYGPATH -u "$windows_path"`
38534    new_path="$unix_path"
38535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38537    new_path="$unix_path"
38538  fi
38539
38540
38541  # Now try to locate executable using which
38542  new_path=`$WHICH "$new_path" 2> /dev/null`
38543
38544  if test "x$new_path" = x; then
38545    # Oops. Which didn't find the executable.
38546    # The splitting of arguments from the executable at a space might have been incorrect,
38547    # since paths with space are more likely in Windows. Give it another try with the whole
38548    # argument.
38549    path="$complete"
38550    arguments="EOL"
38551    new_path="$path"
38552
38553  windows_path="$new_path"
38554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38555    unix_path=`$CYGPATH -u "$windows_path"`
38556    new_path="$unix_path"
38557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38559    new_path="$unix_path"
38560  fi
38561
38562
38563    new_path=`$WHICH "$new_path" 2> /dev/null`
38564    # bat and cmd files are not always considered executable in MSYS causing which
38565    # to not find them
38566    if test "x$new_path" = x \
38567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38569      new_path="$path"
38570
38571  windows_path="$new_path"
38572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38573    unix_path=`$CYGPATH -u "$windows_path"`
38574    new_path="$unix_path"
38575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38577    new_path="$unix_path"
38578  fi
38579
38580    fi
38581
38582    if test "x$new_path" = x; then
38583      # It's still not found. Now this is an unrecoverable error.
38584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38585$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38586      has_space=`$ECHO "$complete" | $GREP " "`
38587      if test "x$has_space" != x; then
38588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38590      fi
38591      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38592    fi
38593  fi
38594
38595  # Now new_path has a complete unix path to the binary
38596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38597    # Keep paths in /bin as-is, but remove trailing .exe if any
38598    new_path="${new_path/%.exe/}"
38599    # Do not save /bin paths to all_fixpath_prefixes!
38600  else
38601    # Not in mixed or Windows style, start by that.
38602    new_path=`cmd //c echo $new_path`
38603
38604  input_path="$new_path"
38605  # Check if we need to convert this using DOS-style short mode. If the path
38606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38607  # take no chances and rewrite it.
38608  # Note: m4 eats our [], so we need to use [ and ] instead.
38609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38610  if test "x$has_forbidden_chars" != x; then
38611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38613  fi
38614
38615    # Output is in $new_path
38616
38617  windows_path="$new_path"
38618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38619    unix_path=`$CYGPATH -u "$windows_path"`
38620    new_path="$unix_path"
38621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38623    new_path="$unix_path"
38624  fi
38625
38626    # remove trailing .exe if any
38627    new_path="${new_path/%.exe/}"
38628
38629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38631  fi
38632
38633    else
38634      # We're on a unix platform. Hooray! :)
38635      # First separate the path from the arguments. This will split at the first
38636      # space.
38637      complete="$NM"
38638      path="${complete%% *}"
38639      tmp="$complete EOL"
38640      arguments="${tmp#* }"
38641
38642      # Cannot rely on the command "which" here since it doesn't always work.
38643      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38644      if test -z "$is_absolute_path"; then
38645        # Path to executable is not absolute. Find it.
38646        IFS_save="$IFS"
38647        IFS=:
38648        for p in $PATH; do
38649          if test -f "$p/$path" && test -x "$p/$path"; then
38650            new_path="$p/$path"
38651            break
38652          fi
38653        done
38654        IFS="$IFS_save"
38655      else
38656        # This is an absolute path, we can use it without further modifications.
38657        new_path="$path"
38658      fi
38659
38660      if test "x$new_path" = x; then
38661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38662$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38663        has_space=`$ECHO "$complete" | $GREP " "`
38664        if test "x$has_space" != x; then
38665          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38667        fi
38668        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38669      fi
38670    fi
38671
38672    # Now join together the path and the arguments once again
38673    if test "x$arguments" != xEOL; then
38674      new_complete="$new_path ${arguments% *}"
38675    else
38676      new_complete="$new_path"
38677    fi
38678
38679    if test "x$complete" != "x$new_complete"; then
38680      NM="$new_complete"
38681      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38682$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38683    fi
38684  fi
38685
38686    GNM="$NM"
38687
38688  fi
38689
38690  # objcopy is used for moving debug symbols to separate files when
38691  # full debug symbols are enabled.
38692  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38693
38694
38695  # Publish this variable in the help.
38696
38697
38698  if [ -z "${OBJCOPY+x}" ]; then
38699    # The variable is not set by user, try to locate tool using the code snippet
38700    if test -n "$ac_tool_prefix"; then
38701  for ac_prog in gobjcopy objcopy
38702  do
38703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38706$as_echo_n "checking for $ac_word... " >&6; }
38707if ${ac_cv_prog_OBJCOPY+:} false; then :
38708  $as_echo_n "(cached) " >&6
38709else
38710  if test -n "$OBJCOPY"; then
38711  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38712else
38713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38714for as_dir in $PATH
38715do
38716  IFS=$as_save_IFS
38717  test -z "$as_dir" && as_dir=.
38718    for ac_exec_ext in '' $ac_executable_extensions; do
38719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38720    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38722    break 2
38723  fi
38724done
38725  done
38726IFS=$as_save_IFS
38727
38728fi
38729fi
38730OBJCOPY=$ac_cv_prog_OBJCOPY
38731if test -n "$OBJCOPY"; then
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38733$as_echo "$OBJCOPY" >&6; }
38734else
38735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38736$as_echo "no" >&6; }
38737fi
38738
38739
38740    test -n "$OBJCOPY" && break
38741  done
38742fi
38743if test -z "$OBJCOPY"; then
38744  ac_ct_OBJCOPY=$OBJCOPY
38745  for ac_prog in gobjcopy objcopy
38746do
38747  # Extract the first word of "$ac_prog", so it can be a program name with args.
38748set dummy $ac_prog; ac_word=$2
38749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38750$as_echo_n "checking for $ac_word... " >&6; }
38751if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38752  $as_echo_n "(cached) " >&6
38753else
38754  if test -n "$ac_ct_OBJCOPY"; then
38755  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38756else
38757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38758for as_dir in $PATH
38759do
38760  IFS=$as_save_IFS
38761  test -z "$as_dir" && as_dir=.
38762    for ac_exec_ext in '' $ac_executable_extensions; do
38763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38764    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38766    break 2
38767  fi
38768done
38769  done
38770IFS=$as_save_IFS
38771
38772fi
38773fi
38774ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38775if test -n "$ac_ct_OBJCOPY"; then
38776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38777$as_echo "$ac_ct_OBJCOPY" >&6; }
38778else
38779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38780$as_echo "no" >&6; }
38781fi
38782
38783
38784  test -n "$ac_ct_OBJCOPY" && break
38785done
38786
38787  if test "x$ac_ct_OBJCOPY" = x; then
38788    OBJCOPY=""
38789  else
38790    case $cross_compiling:$ac_tool_warned in
38791yes:)
38792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38794ac_tool_warned=yes ;;
38795esac
38796    OBJCOPY=$ac_ct_OBJCOPY
38797  fi
38798fi
38799
38800  else
38801    # The variable is set, but is it from the command line or the environment?
38802
38803    # Try to remove the string !OBJCOPY! from our list.
38804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38806      # If it failed, the variable was not from the command line. Ignore it,
38807      # but warn the user (except for BASH, which is always set by the calling BASH).
38808      if test "xOBJCOPY" != xBASH; then
38809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38810$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38811      fi
38812      # Try to locate tool using the code snippet
38813      if test -n "$ac_tool_prefix"; then
38814  for ac_prog in gobjcopy objcopy
38815  do
38816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38819$as_echo_n "checking for $ac_word... " >&6; }
38820if ${ac_cv_prog_OBJCOPY+:} false; then :
38821  $as_echo_n "(cached) " >&6
38822else
38823  if test -n "$OBJCOPY"; then
38824  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38825else
38826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38827for as_dir in $PATH
38828do
38829  IFS=$as_save_IFS
38830  test -z "$as_dir" && as_dir=.
38831    for ac_exec_ext in '' $ac_executable_extensions; do
38832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38833    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38835    break 2
38836  fi
38837done
38838  done
38839IFS=$as_save_IFS
38840
38841fi
38842fi
38843OBJCOPY=$ac_cv_prog_OBJCOPY
38844if test -n "$OBJCOPY"; then
38845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38846$as_echo "$OBJCOPY" >&6; }
38847else
38848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38849$as_echo "no" >&6; }
38850fi
38851
38852
38853    test -n "$OBJCOPY" && break
38854  done
38855fi
38856if test -z "$OBJCOPY"; then
38857  ac_ct_OBJCOPY=$OBJCOPY
38858  for ac_prog in gobjcopy objcopy
38859do
38860  # Extract the first word of "$ac_prog", so it can be a program name with args.
38861set dummy $ac_prog; ac_word=$2
38862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38863$as_echo_n "checking for $ac_word... " >&6; }
38864if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38865  $as_echo_n "(cached) " >&6
38866else
38867  if test -n "$ac_ct_OBJCOPY"; then
38868  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38869else
38870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38871for as_dir in $PATH
38872do
38873  IFS=$as_save_IFS
38874  test -z "$as_dir" && as_dir=.
38875    for ac_exec_ext in '' $ac_executable_extensions; do
38876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38877    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38879    break 2
38880  fi
38881done
38882  done
38883IFS=$as_save_IFS
38884
38885fi
38886fi
38887ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38888if test -n "$ac_ct_OBJCOPY"; then
38889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38890$as_echo "$ac_ct_OBJCOPY" >&6; }
38891else
38892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38893$as_echo "no" >&6; }
38894fi
38895
38896
38897  test -n "$ac_ct_OBJCOPY" && break
38898done
38899
38900  if test "x$ac_ct_OBJCOPY" = x; then
38901    OBJCOPY=""
38902  else
38903    case $cross_compiling:$ac_tool_warned in
38904yes:)
38905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38907ac_tool_warned=yes ;;
38908esac
38909    OBJCOPY=$ac_ct_OBJCOPY
38910  fi
38911fi
38912
38913    else
38914      # If it succeeded, then it was overridden by the user. We will use it
38915      # for the tool.
38916
38917      # First remove it from the list of overridden variables, so we can test
38918      # for unknown variables in the end.
38919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38920
38921      # Check if we try to supply an empty value
38922      if test "x$OBJCOPY" = x; then
38923        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
38924$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
38925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38926$as_echo_n "checking for OBJCOPY... " >&6; }
38927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38928$as_echo "disabled" >&6; }
38929      else
38930        # Check if the provided tool contains a complete path.
38931        tool_specified="$OBJCOPY"
38932        tool_basename="${tool_specified##*/}"
38933        if test "x$tool_basename" = "x$tool_specified"; then
38934          # A command without a complete path is provided, search $PATH.
38935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38936$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38937          # Extract the first word of "$tool_basename", so it can be a program name with args.
38938set dummy $tool_basename; ac_word=$2
38939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38940$as_echo_n "checking for $ac_word... " >&6; }
38941if ${ac_cv_path_OBJCOPY+:} false; then :
38942  $as_echo_n "(cached) " >&6
38943else
38944  case $OBJCOPY in
38945  [\\/]* | ?:[\\/]*)
38946  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38947  ;;
38948  *)
38949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38950for as_dir in $PATH
38951do
38952  IFS=$as_save_IFS
38953  test -z "$as_dir" && as_dir=.
38954    for ac_exec_ext in '' $ac_executable_extensions; do
38955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38956    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38958    break 2
38959  fi
38960done
38961  done
38962IFS=$as_save_IFS
38963
38964  ;;
38965esac
38966fi
38967OBJCOPY=$ac_cv_path_OBJCOPY
38968if test -n "$OBJCOPY"; then
38969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38970$as_echo "$OBJCOPY" >&6; }
38971else
38972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38973$as_echo "no" >&6; }
38974fi
38975
38976
38977          if test "x$OBJCOPY" = x; then
38978            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38979          fi
38980        else
38981          # Otherwise we believe it is a complete path. Use it as it is.
38982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38983$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38984          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38985$as_echo_n "checking for OBJCOPY... " >&6; }
38986          if test ! -x "$tool_specified"; then
38987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38988$as_echo "not found" >&6; }
38989            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38990          fi
38991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38992$as_echo "$tool_specified" >&6; }
38993        fi
38994      fi
38995    fi
38996  fi
38997
38998
38999    # Only call fixup if objcopy was found.
39000    if test -n "$OBJCOPY"; then
39001
39002  # Only process if variable expands to non-empty
39003
39004  if test "x$OBJCOPY" != x; then
39005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39006
39007  # First separate the path from the arguments. This will split at the first
39008  # space.
39009  complete="$OBJCOPY"
39010  path="${complete%% *}"
39011  tmp="$complete EOL"
39012  arguments="${tmp#* }"
39013
39014  # Input might be given as Windows format, start by converting to
39015  # unix format.
39016  new_path=`$CYGPATH -u "$path"`
39017
39018  # Now try to locate executable using which
39019  new_path=`$WHICH "$new_path" 2> /dev/null`
39020  # bat and cmd files are not always considered executable in cygwin causing which
39021  # to not find them
39022  if test "x$new_path" = x \
39023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39025    new_path=`$CYGPATH -u "$path"`
39026  fi
39027  if test "x$new_path" = x; then
39028    # Oops. Which didn't find the executable.
39029    # The splitting of arguments from the executable at a space might have been incorrect,
39030    # since paths with space are more likely in Windows. Give it another try with the whole
39031    # argument.
39032    path="$complete"
39033    arguments="EOL"
39034    new_path=`$CYGPATH -u "$path"`
39035    new_path=`$WHICH "$new_path" 2> /dev/null`
39036    # bat and cmd files are not always considered executable in cygwin causing which
39037    # to not find them
39038    if test "x$new_path" = x \
39039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39041      new_path=`$CYGPATH -u "$path"`
39042    fi
39043    if test "x$new_path" = x; then
39044      # It's still not found. Now this is an unrecoverable error.
39045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39046$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39047      has_space=`$ECHO "$complete" | $GREP " "`
39048      if test "x$has_space" != x; then
39049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39051      fi
39052      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39053    fi
39054  fi
39055
39056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39059  # "foo.exe" is OK but "foo" is an error.
39060  #
39061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39062  # It is also a way to make sure we got the proper file name for the real test later on.
39063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39064  if test "x$test_shortpath" = x; then
39065    # Short path failed, file does not exist as specified.
39066    # Try adding .exe or .cmd
39067    if test -f "${new_path}.exe"; then
39068      input_to_shortpath="${new_path}.exe"
39069    elif test -f "${new_path}.cmd"; then
39070      input_to_shortpath="${new_path}.cmd"
39071    else
39072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39073$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39076      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39077    fi
39078  else
39079    input_to_shortpath="$new_path"
39080  fi
39081
39082  # Call helper function which possibly converts this using DOS-style short mode.
39083  # If so, the updated path is stored in $new_path.
39084  new_path="$input_to_shortpath"
39085
39086  input_path="$input_to_shortpath"
39087  # Check if we need to convert this using DOS-style short mode. If the path
39088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39089  # take no chances and rewrite it.
39090  # Note: m4 eats our [], so we need to use [ and ] instead.
39091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39092  if test "x$has_forbidden_chars" != x; then
39093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39097      # Going to short mode and back again did indeed matter. Since short mode is
39098      # case insensitive, let's make it lowercase to improve readability.
39099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39100      # Now convert it back to Unix-style (cygpath)
39101      input_path=`$CYGPATH -u "$shortmode_path"`
39102      new_path="$input_path"
39103    fi
39104  fi
39105
39106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39107  if test "x$test_cygdrive_prefix" = x; then
39108    # As a simple fix, exclude /usr/bin since it's not a real path.
39109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39111      # a path prefixed by /cygdrive for fixpath to work.
39112      new_path="$CYGWIN_ROOT_PATH$input_path"
39113    fi
39114  fi
39115
39116  # remove trailing .exe if any
39117  new_path="${new_path/%.exe/}"
39118
39119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39120
39121  # First separate the path from the arguments. This will split at the first
39122  # space.
39123  complete="$OBJCOPY"
39124  path="${complete%% *}"
39125  tmp="$complete EOL"
39126  arguments="${tmp#* }"
39127
39128  # Input might be given as Windows format, start by converting to
39129  # unix format.
39130  new_path="$path"
39131
39132  windows_path="$new_path"
39133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39134    unix_path=`$CYGPATH -u "$windows_path"`
39135    new_path="$unix_path"
39136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39138    new_path="$unix_path"
39139  fi
39140
39141
39142  # Now try to locate executable using which
39143  new_path=`$WHICH "$new_path" 2> /dev/null`
39144
39145  if test "x$new_path" = x; then
39146    # Oops. Which didn't find the executable.
39147    # The splitting of arguments from the executable at a space might have been incorrect,
39148    # since paths with space are more likely in Windows. Give it another try with the whole
39149    # argument.
39150    path="$complete"
39151    arguments="EOL"
39152    new_path="$path"
39153
39154  windows_path="$new_path"
39155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39156    unix_path=`$CYGPATH -u "$windows_path"`
39157    new_path="$unix_path"
39158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39160    new_path="$unix_path"
39161  fi
39162
39163
39164    new_path=`$WHICH "$new_path" 2> /dev/null`
39165    # bat and cmd files are not always considered executable in MSYS causing which
39166    # to not find them
39167    if test "x$new_path" = x \
39168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39170      new_path="$path"
39171
39172  windows_path="$new_path"
39173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39174    unix_path=`$CYGPATH -u "$windows_path"`
39175    new_path="$unix_path"
39176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39178    new_path="$unix_path"
39179  fi
39180
39181    fi
39182
39183    if test "x$new_path" = x; then
39184      # It's still not found. Now this is an unrecoverable error.
39185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39186$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39187      has_space=`$ECHO "$complete" | $GREP " "`
39188      if test "x$has_space" != x; then
39189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39191      fi
39192      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39193    fi
39194  fi
39195
39196  # Now new_path has a complete unix path to the binary
39197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39198    # Keep paths in /bin as-is, but remove trailing .exe if any
39199    new_path="${new_path/%.exe/}"
39200    # Do not save /bin paths to all_fixpath_prefixes!
39201  else
39202    # Not in mixed or Windows style, start by that.
39203    new_path=`cmd //c echo $new_path`
39204
39205  input_path="$new_path"
39206  # Check if we need to convert this using DOS-style short mode. If the path
39207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39208  # take no chances and rewrite it.
39209  # Note: m4 eats our [], so we need to use [ and ] instead.
39210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39211  if test "x$has_forbidden_chars" != x; then
39212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39214  fi
39215
39216    # Output is in $new_path
39217
39218  windows_path="$new_path"
39219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39220    unix_path=`$CYGPATH -u "$windows_path"`
39221    new_path="$unix_path"
39222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39224    new_path="$unix_path"
39225  fi
39226
39227    # remove trailing .exe if any
39228    new_path="${new_path/%.exe/}"
39229
39230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39232  fi
39233
39234    else
39235      # We're on a unix platform. Hooray! :)
39236      # First separate the path from the arguments. This will split at the first
39237      # space.
39238      complete="$OBJCOPY"
39239      path="${complete%% *}"
39240      tmp="$complete EOL"
39241      arguments="${tmp#* }"
39242
39243      # Cannot rely on the command "which" here since it doesn't always work.
39244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39245      if test -z "$is_absolute_path"; then
39246        # Path to executable is not absolute. Find it.
39247        IFS_save="$IFS"
39248        IFS=:
39249        for p in $PATH; do
39250          if test -f "$p/$path" && test -x "$p/$path"; then
39251            new_path="$p/$path"
39252            break
39253          fi
39254        done
39255        IFS="$IFS_save"
39256      else
39257        # This is an absolute path, we can use it without further modifications.
39258        new_path="$path"
39259      fi
39260
39261      if test "x$new_path" = x; then
39262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39263$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39264        has_space=`$ECHO "$complete" | $GREP " "`
39265        if test "x$has_space" != x; then
39266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39268        fi
39269        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39270      fi
39271    fi
39272
39273    # Now join together the path and the arguments once again
39274    if test "x$arguments" != xEOL; then
39275      new_complete="$new_path ${arguments% *}"
39276    else
39277      new_complete="$new_path"
39278    fi
39279
39280    if test "x$complete" != "x$new_complete"; then
39281      OBJCOPY="$new_complete"
39282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39283$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39284    fi
39285  fi
39286
39287      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
39288        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
39289        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
39290        # - version number is last blank separate word on first line
39291        # - version number formats that have been seen:
39292        #   - <major>.<minor>
39293        #   - <major>.<minor>.<micro>
39294        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
39295        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
39296         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
39297              -e 's/.* //' \
39298              -e '/^[01]\./b bad' \
39299              -e '/^2\./{' \
39300              -e '  s/^2\.//' \
39301              -e '  /^[0-9]$/b bad' \
39302              -e '  /^[0-9]\./b bad' \
39303              -e '  /^1[0-9]$/b bad' \
39304              -e '  /^1[0-9]\./b bad' \
39305              -e '  /^20\./b bad' \
39306              -e '  /^21\.0$/b bad' \
39307              -e '  /^21\.0\./b bad' \
39308              -e '}' \
39309              -e ':good' \
39310              -e 's/.*/VALID_VERSION/p' \
39311              -e 'q' \
39312              -e ':bad' \
39313              -e 's/.*/BAD_VERSION/p' \
39314              -e 'q'`
39315        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
39316          OBJCOPY=
39317          { $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
39318$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
39319          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
39320$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
39321          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
39322$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
39323          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
39324$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
39325          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
39326$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
39327        fi
39328      fi
39329    fi
39330  fi
39331
39332
39333
39334  # Publish this variable in the help.
39335
39336
39337  if [ -z "${OBJDUMP+x}" ]; then
39338    # The variable is not set by user, try to locate tool using the code snippet
39339    if test -n "$ac_tool_prefix"; then
39340  for ac_prog in gobjdump objdump
39341  do
39342    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39343set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39345$as_echo_n "checking for $ac_word... " >&6; }
39346if ${ac_cv_prog_OBJDUMP+:} false; then :
39347  $as_echo_n "(cached) " >&6
39348else
39349  if test -n "$OBJDUMP"; then
39350  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39351else
39352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39353for as_dir in $PATH
39354do
39355  IFS=$as_save_IFS
39356  test -z "$as_dir" && as_dir=.
39357    for ac_exec_ext in '' $ac_executable_extensions; do
39358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39359    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39361    break 2
39362  fi
39363done
39364  done
39365IFS=$as_save_IFS
39366
39367fi
39368fi
39369OBJDUMP=$ac_cv_prog_OBJDUMP
39370if test -n "$OBJDUMP"; then
39371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39372$as_echo "$OBJDUMP" >&6; }
39373else
39374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39375$as_echo "no" >&6; }
39376fi
39377
39378
39379    test -n "$OBJDUMP" && break
39380  done
39381fi
39382if test -z "$OBJDUMP"; then
39383  ac_ct_OBJDUMP=$OBJDUMP
39384  for ac_prog in gobjdump objdump
39385do
39386  # Extract the first word of "$ac_prog", so it can be a program name with args.
39387set dummy $ac_prog; ac_word=$2
39388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39389$as_echo_n "checking for $ac_word... " >&6; }
39390if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39391  $as_echo_n "(cached) " >&6
39392else
39393  if test -n "$ac_ct_OBJDUMP"; then
39394  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39395else
39396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39397for as_dir in $PATH
39398do
39399  IFS=$as_save_IFS
39400  test -z "$as_dir" && as_dir=.
39401    for ac_exec_ext in '' $ac_executable_extensions; do
39402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39403    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39405    break 2
39406  fi
39407done
39408  done
39409IFS=$as_save_IFS
39410
39411fi
39412fi
39413ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39414if test -n "$ac_ct_OBJDUMP"; then
39415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39416$as_echo "$ac_ct_OBJDUMP" >&6; }
39417else
39418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39419$as_echo "no" >&6; }
39420fi
39421
39422
39423  test -n "$ac_ct_OBJDUMP" && break
39424done
39425
39426  if test "x$ac_ct_OBJDUMP" = x; then
39427    OBJDUMP=""
39428  else
39429    case $cross_compiling:$ac_tool_warned in
39430yes:)
39431{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39432$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39433ac_tool_warned=yes ;;
39434esac
39435    OBJDUMP=$ac_ct_OBJDUMP
39436  fi
39437fi
39438
39439  else
39440    # The variable is set, but is it from the command line or the environment?
39441
39442    # Try to remove the string !OBJDUMP! from our list.
39443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39445      # If it failed, the variable was not from the command line. Ignore it,
39446      # but warn the user (except for BASH, which is always set by the calling BASH).
39447      if test "xOBJDUMP" != xBASH; then
39448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39449$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39450      fi
39451      # Try to locate tool using the code snippet
39452      if test -n "$ac_tool_prefix"; then
39453  for ac_prog in gobjdump objdump
39454  do
39455    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39456set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39458$as_echo_n "checking for $ac_word... " >&6; }
39459if ${ac_cv_prog_OBJDUMP+:} false; then :
39460  $as_echo_n "(cached) " >&6
39461else
39462  if test -n "$OBJDUMP"; then
39463  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39464else
39465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39466for as_dir in $PATH
39467do
39468  IFS=$as_save_IFS
39469  test -z "$as_dir" && as_dir=.
39470    for ac_exec_ext in '' $ac_executable_extensions; do
39471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39472    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39474    break 2
39475  fi
39476done
39477  done
39478IFS=$as_save_IFS
39479
39480fi
39481fi
39482OBJDUMP=$ac_cv_prog_OBJDUMP
39483if test -n "$OBJDUMP"; then
39484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39485$as_echo "$OBJDUMP" >&6; }
39486else
39487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39488$as_echo "no" >&6; }
39489fi
39490
39491
39492    test -n "$OBJDUMP" && break
39493  done
39494fi
39495if test -z "$OBJDUMP"; then
39496  ac_ct_OBJDUMP=$OBJDUMP
39497  for ac_prog in gobjdump objdump
39498do
39499  # Extract the first word of "$ac_prog", so it can be a program name with args.
39500set dummy $ac_prog; ac_word=$2
39501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39502$as_echo_n "checking for $ac_word... " >&6; }
39503if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39504  $as_echo_n "(cached) " >&6
39505else
39506  if test -n "$ac_ct_OBJDUMP"; then
39507  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39508else
39509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39510for as_dir in $PATH
39511do
39512  IFS=$as_save_IFS
39513  test -z "$as_dir" && as_dir=.
39514    for ac_exec_ext in '' $ac_executable_extensions; do
39515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39516    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39518    break 2
39519  fi
39520done
39521  done
39522IFS=$as_save_IFS
39523
39524fi
39525fi
39526ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39527if test -n "$ac_ct_OBJDUMP"; then
39528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39529$as_echo "$ac_ct_OBJDUMP" >&6; }
39530else
39531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39532$as_echo "no" >&6; }
39533fi
39534
39535
39536  test -n "$ac_ct_OBJDUMP" && break
39537done
39538
39539  if test "x$ac_ct_OBJDUMP" = x; then
39540    OBJDUMP=""
39541  else
39542    case $cross_compiling:$ac_tool_warned in
39543yes:)
39544{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39545$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39546ac_tool_warned=yes ;;
39547esac
39548    OBJDUMP=$ac_ct_OBJDUMP
39549  fi
39550fi
39551
39552    else
39553      # If it succeeded, then it was overridden by the user. We will use it
39554      # for the tool.
39555
39556      # First remove it from the list of overridden variables, so we can test
39557      # for unknown variables in the end.
39558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39559
39560      # Check if we try to supply an empty value
39561      if test "x$OBJDUMP" = x; then
39562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
39563$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
39564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39565$as_echo_n "checking for OBJDUMP... " >&6; }
39566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39567$as_echo "disabled" >&6; }
39568      else
39569        # Check if the provided tool contains a complete path.
39570        tool_specified="$OBJDUMP"
39571        tool_basename="${tool_specified##*/}"
39572        if test "x$tool_basename" = "x$tool_specified"; then
39573          # A command without a complete path is provided, search $PATH.
39574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39575$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39576          # Extract the first word of "$tool_basename", so it can be a program name with args.
39577set dummy $tool_basename; ac_word=$2
39578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39579$as_echo_n "checking for $ac_word... " >&6; }
39580if ${ac_cv_path_OBJDUMP+:} false; then :
39581  $as_echo_n "(cached) " >&6
39582else
39583  case $OBJDUMP in
39584  [\\/]* | ?:[\\/]*)
39585  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39586  ;;
39587  *)
39588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39589for as_dir in $PATH
39590do
39591  IFS=$as_save_IFS
39592  test -z "$as_dir" && as_dir=.
39593    for ac_exec_ext in '' $ac_executable_extensions; do
39594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39595    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39597    break 2
39598  fi
39599done
39600  done
39601IFS=$as_save_IFS
39602
39603  ;;
39604esac
39605fi
39606OBJDUMP=$ac_cv_path_OBJDUMP
39607if test -n "$OBJDUMP"; then
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39609$as_echo "$OBJDUMP" >&6; }
39610else
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39612$as_echo "no" >&6; }
39613fi
39614
39615
39616          if test "x$OBJDUMP" = x; then
39617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39618          fi
39619        else
39620          # Otherwise we believe it is a complete path. Use it as it is.
39621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39622$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39624$as_echo_n "checking for OBJDUMP... " >&6; }
39625          if test ! -x "$tool_specified"; then
39626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39627$as_echo "not found" >&6; }
39628            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39629          fi
39630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39631$as_echo "$tool_specified" >&6; }
39632        fi
39633      fi
39634    fi
39635  fi
39636
39637
39638  if test "x$OBJDUMP" != x; then
39639    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39640    # bails if argument is missing.
39641
39642  # Only process if variable expands to non-empty
39643
39644  if test "x$OBJDUMP" != x; then
39645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39646
39647  # First separate the path from the arguments. This will split at the first
39648  # space.
39649  complete="$OBJDUMP"
39650  path="${complete%% *}"
39651  tmp="$complete EOL"
39652  arguments="${tmp#* }"
39653
39654  # Input might be given as Windows format, start by converting to
39655  # unix format.
39656  new_path=`$CYGPATH -u "$path"`
39657
39658  # Now try to locate executable using which
39659  new_path=`$WHICH "$new_path" 2> /dev/null`
39660  # bat and cmd files are not always considered executable in cygwin causing which
39661  # to not find them
39662  if test "x$new_path" = x \
39663      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39664      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39665    new_path=`$CYGPATH -u "$path"`
39666  fi
39667  if test "x$new_path" = x; then
39668    # Oops. Which didn't find the executable.
39669    # The splitting of arguments from the executable at a space might have been incorrect,
39670    # since paths with space are more likely in Windows. Give it another try with the whole
39671    # argument.
39672    path="$complete"
39673    arguments="EOL"
39674    new_path=`$CYGPATH -u "$path"`
39675    new_path=`$WHICH "$new_path" 2> /dev/null`
39676    # bat and cmd files are not always considered executable in cygwin causing which
39677    # to not find them
39678    if test "x$new_path" = x \
39679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39681      new_path=`$CYGPATH -u "$path"`
39682    fi
39683    if test "x$new_path" = x; then
39684      # It's still not found. Now this is an unrecoverable error.
39685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39686$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39687      has_space=`$ECHO "$complete" | $GREP " "`
39688      if test "x$has_space" != x; then
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39691      fi
39692      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39693    fi
39694  fi
39695
39696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39699  # "foo.exe" is OK but "foo" is an error.
39700  #
39701  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39702  # It is also a way to make sure we got the proper file name for the real test later on.
39703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39704  if test "x$test_shortpath" = x; then
39705    # Short path failed, file does not exist as specified.
39706    # Try adding .exe or .cmd
39707    if test -f "${new_path}.exe"; then
39708      input_to_shortpath="${new_path}.exe"
39709    elif test -f "${new_path}.cmd"; then
39710      input_to_shortpath="${new_path}.cmd"
39711    else
39712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39713$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39714      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39715$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39716      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39717    fi
39718  else
39719    input_to_shortpath="$new_path"
39720  fi
39721
39722  # Call helper function which possibly converts this using DOS-style short mode.
39723  # If so, the updated path is stored in $new_path.
39724  new_path="$input_to_shortpath"
39725
39726  input_path="$input_to_shortpath"
39727  # Check if we need to convert this using DOS-style short mode. If the path
39728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39729  # take no chances and rewrite it.
39730  # Note: m4 eats our [], so we need to use [ and ] instead.
39731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39732  if test "x$has_forbidden_chars" != x; then
39733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39737      # Going to short mode and back again did indeed matter. Since short mode is
39738      # case insensitive, let's make it lowercase to improve readability.
39739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39740      # Now convert it back to Unix-style (cygpath)
39741      input_path=`$CYGPATH -u "$shortmode_path"`
39742      new_path="$input_path"
39743    fi
39744  fi
39745
39746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39747  if test "x$test_cygdrive_prefix" = x; then
39748    # As a simple fix, exclude /usr/bin since it's not a real path.
39749    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39751      # a path prefixed by /cygdrive for fixpath to work.
39752      new_path="$CYGWIN_ROOT_PATH$input_path"
39753    fi
39754  fi
39755
39756  # remove trailing .exe if any
39757  new_path="${new_path/%.exe/}"
39758
39759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39760
39761  # First separate the path from the arguments. This will split at the first
39762  # space.
39763  complete="$OBJDUMP"
39764  path="${complete%% *}"
39765  tmp="$complete EOL"
39766  arguments="${tmp#* }"
39767
39768  # Input might be given as Windows format, start by converting to
39769  # unix format.
39770  new_path="$path"
39771
39772  windows_path="$new_path"
39773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39774    unix_path=`$CYGPATH -u "$windows_path"`
39775    new_path="$unix_path"
39776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39778    new_path="$unix_path"
39779  fi
39780
39781
39782  # Now try to locate executable using which
39783  new_path=`$WHICH "$new_path" 2> /dev/null`
39784
39785  if test "x$new_path" = x; then
39786    # Oops. Which didn't find the executable.
39787    # The splitting of arguments from the executable at a space might have been incorrect,
39788    # since paths with space are more likely in Windows. Give it another try with the whole
39789    # argument.
39790    path="$complete"
39791    arguments="EOL"
39792    new_path="$path"
39793
39794  windows_path="$new_path"
39795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39796    unix_path=`$CYGPATH -u "$windows_path"`
39797    new_path="$unix_path"
39798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39800    new_path="$unix_path"
39801  fi
39802
39803
39804    new_path=`$WHICH "$new_path" 2> /dev/null`
39805    # bat and cmd files are not always considered executable in MSYS causing which
39806    # to not find them
39807    if test "x$new_path" = x \
39808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39810      new_path="$path"
39811
39812  windows_path="$new_path"
39813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39814    unix_path=`$CYGPATH -u "$windows_path"`
39815    new_path="$unix_path"
39816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39818    new_path="$unix_path"
39819  fi
39820
39821    fi
39822
39823    if test "x$new_path" = x; then
39824      # It's still not found. Now this is an unrecoverable error.
39825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39826$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39827      has_space=`$ECHO "$complete" | $GREP " "`
39828      if test "x$has_space" != x; then
39829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39831      fi
39832      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39833    fi
39834  fi
39835
39836  # Now new_path has a complete unix path to the binary
39837  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39838    # Keep paths in /bin as-is, but remove trailing .exe if any
39839    new_path="${new_path/%.exe/}"
39840    # Do not save /bin paths to all_fixpath_prefixes!
39841  else
39842    # Not in mixed or Windows style, start by that.
39843    new_path=`cmd //c echo $new_path`
39844
39845  input_path="$new_path"
39846  # Check if we need to convert this using DOS-style short mode. If the path
39847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39848  # take no chances and rewrite it.
39849  # Note: m4 eats our [], so we need to use [ and ] instead.
39850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39851  if test "x$has_forbidden_chars" != x; then
39852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39854  fi
39855
39856    # Output is in $new_path
39857
39858  windows_path="$new_path"
39859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39860    unix_path=`$CYGPATH -u "$windows_path"`
39861    new_path="$unix_path"
39862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39864    new_path="$unix_path"
39865  fi
39866
39867    # remove trailing .exe if any
39868    new_path="${new_path/%.exe/}"
39869
39870    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39871    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39872  fi
39873
39874    else
39875      # We're on a unix platform. Hooray! :)
39876      # First separate the path from the arguments. This will split at the first
39877      # space.
39878      complete="$OBJDUMP"
39879      path="${complete%% *}"
39880      tmp="$complete EOL"
39881      arguments="${tmp#* }"
39882
39883      # Cannot rely on the command "which" here since it doesn't always work.
39884      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39885      if test -z "$is_absolute_path"; then
39886        # Path to executable is not absolute. Find it.
39887        IFS_save="$IFS"
39888        IFS=:
39889        for p in $PATH; do
39890          if test -f "$p/$path" && test -x "$p/$path"; then
39891            new_path="$p/$path"
39892            break
39893          fi
39894        done
39895        IFS="$IFS_save"
39896      else
39897        # This is an absolute path, we can use it without further modifications.
39898        new_path="$path"
39899      fi
39900
39901      if test "x$new_path" = x; then
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39903$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39904        has_space=`$ECHO "$complete" | $GREP " "`
39905        if test "x$has_space" != x; then
39906          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39907$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39908        fi
39909        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39910      fi
39911    fi
39912
39913    # Now join together the path and the arguments once again
39914    if test "x$arguments" != xEOL; then
39915      new_complete="$new_path ${arguments% *}"
39916    else
39917      new_complete="$new_path"
39918    fi
39919
39920    if test "x$complete" != "x$new_complete"; then
39921      OBJDUMP="$new_complete"
39922      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39923$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39924    fi
39925  fi
39926
39927  fi
39928
39929
39930  # Restore old path.
39931  PATH="$OLD_PATH"
39932
39933  # Restore the flags to the user specified values.
39934  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39935  CFLAGS="$ORG_CFLAGS"
39936  CXXFLAGS="$ORG_CXXFLAGS"
39937
39938
39939# Finally do some processing after the detection phase
39940
39941  if test "x$COMPILE_TYPE" = "xcross"; then
39942    # Now we need to find a C/C++ compiler that can build executables for the
39943    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39944    # used once. Also, we need to do this without adding a tools dir to the
39945    # path, otherwise we might pick up cross-compilers which don't use standard
39946    # naming.
39947
39948    # FIXME: we should list the discovered compilers as an exclude pattern!
39949    # If we do that, we can do this detection before POST_DETECTION, and still
39950    # find the build compilers in the tools dir, if needed.
39951
39952
39953  # Publish this variable in the help.
39954
39955
39956  if [ -z "${BUILD_CC+x}" ]; then
39957    # The variable is not set by user, try to locate tool using the code snippet
39958    for ac_prog in cl cc gcc
39959do
39960  # Extract the first word of "$ac_prog", so it can be a program name with args.
39961set dummy $ac_prog; ac_word=$2
39962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39963$as_echo_n "checking for $ac_word... " >&6; }
39964if ${ac_cv_path_BUILD_CC+:} false; then :
39965  $as_echo_n "(cached) " >&6
39966else
39967  case $BUILD_CC in
39968  [\\/]* | ?:[\\/]*)
39969  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39970  ;;
39971  *)
39972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39973for as_dir in $PATH
39974do
39975  IFS=$as_save_IFS
39976  test -z "$as_dir" && as_dir=.
39977    for ac_exec_ext in '' $ac_executable_extensions; do
39978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39979    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39981    break 2
39982  fi
39983done
39984  done
39985IFS=$as_save_IFS
39986
39987  ;;
39988esac
39989fi
39990BUILD_CC=$ac_cv_path_BUILD_CC
39991if test -n "$BUILD_CC"; then
39992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39993$as_echo "$BUILD_CC" >&6; }
39994else
39995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39996$as_echo "no" >&6; }
39997fi
39998
39999
40000  test -n "$BUILD_CC" && break
40001done
40002
40003  else
40004    # The variable is set, but is it from the command line or the environment?
40005
40006    # Try to remove the string !BUILD_CC! from our list.
40007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
40008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40009      # If it failed, the variable was not from the command line. Ignore it,
40010      # but warn the user (except for BASH, which is always set by the calling BASH).
40011      if test "xBUILD_CC" != xBASH; then
40012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
40013$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
40014      fi
40015      # Try to locate tool using the code snippet
40016      for ac_prog in cl cc gcc
40017do
40018  # Extract the first word of "$ac_prog", so it can be a program name with args.
40019set dummy $ac_prog; ac_word=$2
40020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40021$as_echo_n "checking for $ac_word... " >&6; }
40022if ${ac_cv_path_BUILD_CC+:} false; then :
40023  $as_echo_n "(cached) " >&6
40024else
40025  case $BUILD_CC in
40026  [\\/]* | ?:[\\/]*)
40027  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40028  ;;
40029  *)
40030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40031for as_dir in $PATH
40032do
40033  IFS=$as_save_IFS
40034  test -z "$as_dir" && as_dir=.
40035    for ac_exec_ext in '' $ac_executable_extensions; do
40036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40037    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40039    break 2
40040  fi
40041done
40042  done
40043IFS=$as_save_IFS
40044
40045  ;;
40046esac
40047fi
40048BUILD_CC=$ac_cv_path_BUILD_CC
40049if test -n "$BUILD_CC"; then
40050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40051$as_echo "$BUILD_CC" >&6; }
40052else
40053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40054$as_echo "no" >&6; }
40055fi
40056
40057
40058  test -n "$BUILD_CC" && break
40059done
40060
40061    else
40062      # If it succeeded, then it was overridden by the user. We will use it
40063      # for the tool.
40064
40065      # First remove it from the list of overridden variables, so we can test
40066      # for unknown variables in the end.
40067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40068
40069      # Check if we try to supply an empty value
40070      if test "x$BUILD_CC" = x; then
40071        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
40072$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
40073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40074$as_echo_n "checking for BUILD_CC... " >&6; }
40075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40076$as_echo "disabled" >&6; }
40077      else
40078        # Check if the provided tool contains a complete path.
40079        tool_specified="$BUILD_CC"
40080        tool_basename="${tool_specified##*/}"
40081        if test "x$tool_basename" = "x$tool_specified"; then
40082          # A command without a complete path is provided, search $PATH.
40083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
40084$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
40085          # Extract the first word of "$tool_basename", so it can be a program name with args.
40086set dummy $tool_basename; ac_word=$2
40087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40088$as_echo_n "checking for $ac_word... " >&6; }
40089if ${ac_cv_path_BUILD_CC+:} false; then :
40090  $as_echo_n "(cached) " >&6
40091else
40092  case $BUILD_CC in
40093  [\\/]* | ?:[\\/]*)
40094  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40095  ;;
40096  *)
40097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40098for as_dir in $PATH
40099do
40100  IFS=$as_save_IFS
40101  test -z "$as_dir" && as_dir=.
40102    for ac_exec_ext in '' $ac_executable_extensions; do
40103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40104    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40106    break 2
40107  fi
40108done
40109  done
40110IFS=$as_save_IFS
40111
40112  ;;
40113esac
40114fi
40115BUILD_CC=$ac_cv_path_BUILD_CC
40116if test -n "$BUILD_CC"; then
40117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40118$as_echo "$BUILD_CC" >&6; }
40119else
40120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40121$as_echo "no" >&6; }
40122fi
40123
40124
40125          if test "x$BUILD_CC" = x; then
40126            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40127          fi
40128        else
40129          # Otherwise we believe it is a complete path. Use it as it is.
40130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
40131$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
40132          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40133$as_echo_n "checking for BUILD_CC... " >&6; }
40134          if test ! -x "$tool_specified"; then
40135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40136$as_echo "not found" >&6; }
40137            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
40138          fi
40139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40140$as_echo "$tool_specified" >&6; }
40141        fi
40142      fi
40143    fi
40144  fi
40145
40146
40147
40148  # Only process if variable expands to non-empty
40149
40150  if test "x$BUILD_CC" != x; then
40151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40152
40153  # First separate the path from the arguments. This will split at the first
40154  # space.
40155  complete="$BUILD_CC"
40156  path="${complete%% *}"
40157  tmp="$complete EOL"
40158  arguments="${tmp#* }"
40159
40160  # Input might be given as Windows format, start by converting to
40161  # unix format.
40162  new_path=`$CYGPATH -u "$path"`
40163
40164  # Now try to locate executable using which
40165  new_path=`$WHICH "$new_path" 2> /dev/null`
40166  # bat and cmd files are not always considered executable in cygwin causing which
40167  # to not find them
40168  if test "x$new_path" = x \
40169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40171    new_path=`$CYGPATH -u "$path"`
40172  fi
40173  if test "x$new_path" = x; then
40174    # Oops. Which didn't find the executable.
40175    # The splitting of arguments from the executable at a space might have been incorrect,
40176    # since paths with space are more likely in Windows. Give it another try with the whole
40177    # argument.
40178    path="$complete"
40179    arguments="EOL"
40180    new_path=`$CYGPATH -u "$path"`
40181    new_path=`$WHICH "$new_path" 2> /dev/null`
40182    # bat and cmd files are not always considered executable in cygwin causing which
40183    # to not find them
40184    if test "x$new_path" = x \
40185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40187      new_path=`$CYGPATH -u "$path"`
40188    fi
40189    if test "x$new_path" = x; then
40190      # It's still not found. Now this is an unrecoverable error.
40191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40192$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40193      has_space=`$ECHO "$complete" | $GREP " "`
40194      if test "x$has_space" != x; then
40195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40197      fi
40198      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40199    fi
40200  fi
40201
40202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40205  # "foo.exe" is OK but "foo" is an error.
40206  #
40207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40208  # It is also a way to make sure we got the proper file name for the real test later on.
40209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40210  if test "x$test_shortpath" = x; then
40211    # Short path failed, file does not exist as specified.
40212    # Try adding .exe or .cmd
40213    if test -f "${new_path}.exe"; then
40214      input_to_shortpath="${new_path}.exe"
40215    elif test -f "${new_path}.cmd"; then
40216      input_to_shortpath="${new_path}.cmd"
40217    else
40218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
40219$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
40220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40222      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40223    fi
40224  else
40225    input_to_shortpath="$new_path"
40226  fi
40227
40228  # Call helper function which possibly converts this using DOS-style short mode.
40229  # If so, the updated path is stored in $new_path.
40230  new_path="$input_to_shortpath"
40231
40232  input_path="$input_to_shortpath"
40233  # Check if we need to convert this using DOS-style short mode. If the path
40234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40235  # take no chances and rewrite it.
40236  # Note: m4 eats our [], so we need to use [ and ] instead.
40237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40238  if test "x$has_forbidden_chars" != x; then
40239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40243      # Going to short mode and back again did indeed matter. Since short mode is
40244      # case insensitive, let's make it lowercase to improve readability.
40245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40246      # Now convert it back to Unix-style (cygpath)
40247      input_path=`$CYGPATH -u "$shortmode_path"`
40248      new_path="$input_path"
40249    fi
40250  fi
40251
40252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40253  if test "x$test_cygdrive_prefix" = x; then
40254    # As a simple fix, exclude /usr/bin since it's not a real path.
40255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40257      # a path prefixed by /cygdrive for fixpath to work.
40258      new_path="$CYGWIN_ROOT_PATH$input_path"
40259    fi
40260  fi
40261
40262  # remove trailing .exe if any
40263  new_path="${new_path/%.exe/}"
40264
40265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40266
40267  # First separate the path from the arguments. This will split at the first
40268  # space.
40269  complete="$BUILD_CC"
40270  path="${complete%% *}"
40271  tmp="$complete EOL"
40272  arguments="${tmp#* }"
40273
40274  # Input might be given as Windows format, start by converting to
40275  # unix format.
40276  new_path="$path"
40277
40278  windows_path="$new_path"
40279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40280    unix_path=`$CYGPATH -u "$windows_path"`
40281    new_path="$unix_path"
40282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40284    new_path="$unix_path"
40285  fi
40286
40287
40288  # Now try to locate executable using which
40289  new_path=`$WHICH "$new_path" 2> /dev/null`
40290
40291  if test "x$new_path" = x; then
40292    # Oops. Which didn't find the executable.
40293    # The splitting of arguments from the executable at a space might have been incorrect,
40294    # since paths with space are more likely in Windows. Give it another try with the whole
40295    # argument.
40296    path="$complete"
40297    arguments="EOL"
40298    new_path="$path"
40299
40300  windows_path="$new_path"
40301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40302    unix_path=`$CYGPATH -u "$windows_path"`
40303    new_path="$unix_path"
40304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40306    new_path="$unix_path"
40307  fi
40308
40309
40310    new_path=`$WHICH "$new_path" 2> /dev/null`
40311    # bat and cmd files are not always considered executable in MSYS causing which
40312    # to not find them
40313    if test "x$new_path" = x \
40314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40316      new_path="$path"
40317
40318  windows_path="$new_path"
40319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40320    unix_path=`$CYGPATH -u "$windows_path"`
40321    new_path="$unix_path"
40322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40324    new_path="$unix_path"
40325  fi
40326
40327    fi
40328
40329    if test "x$new_path" = x; then
40330      # It's still not found. Now this is an unrecoverable error.
40331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40332$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40333      has_space=`$ECHO "$complete" | $GREP " "`
40334      if test "x$has_space" != x; then
40335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40337      fi
40338      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40339    fi
40340  fi
40341
40342  # Now new_path has a complete unix path to the binary
40343  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40344    # Keep paths in /bin as-is, but remove trailing .exe if any
40345    new_path="${new_path/%.exe/}"
40346    # Do not save /bin paths to all_fixpath_prefixes!
40347  else
40348    # Not in mixed or Windows style, start by that.
40349    new_path=`cmd //c echo $new_path`
40350
40351  input_path="$new_path"
40352  # Check if we need to convert this using DOS-style short mode. If the path
40353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40354  # take no chances and rewrite it.
40355  # Note: m4 eats our [], so we need to use [ and ] instead.
40356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40357  if test "x$has_forbidden_chars" != x; then
40358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40360  fi
40361
40362    # Output is in $new_path
40363
40364  windows_path="$new_path"
40365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40366    unix_path=`$CYGPATH -u "$windows_path"`
40367    new_path="$unix_path"
40368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40370    new_path="$unix_path"
40371  fi
40372
40373    # remove trailing .exe if any
40374    new_path="${new_path/%.exe/}"
40375
40376    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40377    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40378  fi
40379
40380    else
40381      # We're on a unix platform. Hooray! :)
40382      # First separate the path from the arguments. This will split at the first
40383      # space.
40384      complete="$BUILD_CC"
40385      path="${complete%% *}"
40386      tmp="$complete EOL"
40387      arguments="${tmp#* }"
40388
40389      # Cannot rely on the command "which" here since it doesn't always work.
40390      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40391      if test -z "$is_absolute_path"; then
40392        # Path to executable is not absolute. Find it.
40393        IFS_save="$IFS"
40394        IFS=:
40395        for p in $PATH; do
40396          if test -f "$p/$path" && test -x "$p/$path"; then
40397            new_path="$p/$path"
40398            break
40399          fi
40400        done
40401        IFS="$IFS_save"
40402      else
40403        # This is an absolute path, we can use it without further modifications.
40404        new_path="$path"
40405      fi
40406
40407      if test "x$new_path" = x; then
40408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40409$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40410        has_space=`$ECHO "$complete" | $GREP " "`
40411        if test "x$has_space" != x; then
40412          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40413$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40414        fi
40415        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40416      fi
40417    fi
40418
40419    # Now join together the path and the arguments once again
40420    if test "x$arguments" != xEOL; then
40421      new_complete="$new_path ${arguments% *}"
40422    else
40423      new_complete="$new_path"
40424    fi
40425
40426    if test "x$complete" != "x$new_complete"; then
40427      BUILD_CC="$new_complete"
40428      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40429$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40430    fi
40431  fi
40432
40433
40434
40435  # Publish this variable in the help.
40436
40437
40438  if [ -z "${BUILD_CXX+x}" ]; then
40439    # The variable is not set by user, try to locate tool using the code snippet
40440    for ac_prog in cl CC g++
40441do
40442  # Extract the first word of "$ac_prog", so it can be a program name with args.
40443set dummy $ac_prog; ac_word=$2
40444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40445$as_echo_n "checking for $ac_word... " >&6; }
40446if ${ac_cv_path_BUILD_CXX+:} false; then :
40447  $as_echo_n "(cached) " >&6
40448else
40449  case $BUILD_CXX in
40450  [\\/]* | ?:[\\/]*)
40451  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40452  ;;
40453  *)
40454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40455for as_dir in $PATH
40456do
40457  IFS=$as_save_IFS
40458  test -z "$as_dir" && as_dir=.
40459    for ac_exec_ext in '' $ac_executable_extensions; do
40460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40461    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40463    break 2
40464  fi
40465done
40466  done
40467IFS=$as_save_IFS
40468
40469  ;;
40470esac
40471fi
40472BUILD_CXX=$ac_cv_path_BUILD_CXX
40473if test -n "$BUILD_CXX"; then
40474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40475$as_echo "$BUILD_CXX" >&6; }
40476else
40477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40478$as_echo "no" >&6; }
40479fi
40480
40481
40482  test -n "$BUILD_CXX" && break
40483done
40484
40485  else
40486    # The variable is set, but is it from the command line or the environment?
40487
40488    # Try to remove the string !BUILD_CXX! from our list.
40489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40491      # If it failed, the variable was not from the command line. Ignore it,
40492      # but warn the user (except for BASH, which is always set by the calling BASH).
40493      if test "xBUILD_CXX" != xBASH; then
40494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40495$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40496      fi
40497      # Try to locate tool using the code snippet
40498      for ac_prog in cl CC g++
40499do
40500  # Extract the first word of "$ac_prog", so it can be a program name with args.
40501set dummy $ac_prog; ac_word=$2
40502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40503$as_echo_n "checking for $ac_word... " >&6; }
40504if ${ac_cv_path_BUILD_CXX+:} false; then :
40505  $as_echo_n "(cached) " >&6
40506else
40507  case $BUILD_CXX in
40508  [\\/]* | ?:[\\/]*)
40509  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40510  ;;
40511  *)
40512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40513for as_dir in $PATH
40514do
40515  IFS=$as_save_IFS
40516  test -z "$as_dir" && as_dir=.
40517    for ac_exec_ext in '' $ac_executable_extensions; do
40518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40519    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40521    break 2
40522  fi
40523done
40524  done
40525IFS=$as_save_IFS
40526
40527  ;;
40528esac
40529fi
40530BUILD_CXX=$ac_cv_path_BUILD_CXX
40531if test -n "$BUILD_CXX"; then
40532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40533$as_echo "$BUILD_CXX" >&6; }
40534else
40535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40536$as_echo "no" >&6; }
40537fi
40538
40539
40540  test -n "$BUILD_CXX" && break
40541done
40542
40543    else
40544      # If it succeeded, then it was overridden by the user. We will use it
40545      # for the tool.
40546
40547      # First remove it from the list of overridden variables, so we can test
40548      # for unknown variables in the end.
40549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40550
40551      # Check if we try to supply an empty value
40552      if test "x$BUILD_CXX" = x; then
40553        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
40554$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
40555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40556$as_echo_n "checking for BUILD_CXX... " >&6; }
40557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40558$as_echo "disabled" >&6; }
40559      else
40560        # Check if the provided tool contains a complete path.
40561        tool_specified="$BUILD_CXX"
40562        tool_basename="${tool_specified##*/}"
40563        if test "x$tool_basename" = "x$tool_specified"; then
40564          # A command without a complete path is provided, search $PATH.
40565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40566$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40567          # Extract the first word of "$tool_basename", so it can be a program name with args.
40568set dummy $tool_basename; ac_word=$2
40569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40570$as_echo_n "checking for $ac_word... " >&6; }
40571if ${ac_cv_path_BUILD_CXX+:} false; then :
40572  $as_echo_n "(cached) " >&6
40573else
40574  case $BUILD_CXX in
40575  [\\/]* | ?:[\\/]*)
40576  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40577  ;;
40578  *)
40579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40580for as_dir in $PATH
40581do
40582  IFS=$as_save_IFS
40583  test -z "$as_dir" && as_dir=.
40584    for ac_exec_ext in '' $ac_executable_extensions; do
40585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40586    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40588    break 2
40589  fi
40590done
40591  done
40592IFS=$as_save_IFS
40593
40594  ;;
40595esac
40596fi
40597BUILD_CXX=$ac_cv_path_BUILD_CXX
40598if test -n "$BUILD_CXX"; then
40599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40600$as_echo "$BUILD_CXX" >&6; }
40601else
40602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40603$as_echo "no" >&6; }
40604fi
40605
40606
40607          if test "x$BUILD_CXX" = x; then
40608            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40609          fi
40610        else
40611          # Otherwise we believe it is a complete path. Use it as it is.
40612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40613$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40614          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40615$as_echo_n "checking for BUILD_CXX... " >&6; }
40616          if test ! -x "$tool_specified"; then
40617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40618$as_echo "not found" >&6; }
40619            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40620          fi
40621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40622$as_echo "$tool_specified" >&6; }
40623        fi
40624      fi
40625    fi
40626  fi
40627
40628
40629
40630  # Only process if variable expands to non-empty
40631
40632  if test "x$BUILD_CXX" != x; then
40633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40634
40635  # First separate the path from the arguments. This will split at the first
40636  # space.
40637  complete="$BUILD_CXX"
40638  path="${complete%% *}"
40639  tmp="$complete EOL"
40640  arguments="${tmp#* }"
40641
40642  # Input might be given as Windows format, start by converting to
40643  # unix format.
40644  new_path=`$CYGPATH -u "$path"`
40645
40646  # Now try to locate executable using which
40647  new_path=`$WHICH "$new_path" 2> /dev/null`
40648  # bat and cmd files are not always considered executable in cygwin causing which
40649  # to not find them
40650  if test "x$new_path" = x \
40651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40653    new_path=`$CYGPATH -u "$path"`
40654  fi
40655  if test "x$new_path" = x; then
40656    # Oops. Which didn't find the executable.
40657    # The splitting of arguments from the executable at a space might have been incorrect,
40658    # since paths with space are more likely in Windows. Give it another try with the whole
40659    # argument.
40660    path="$complete"
40661    arguments="EOL"
40662    new_path=`$CYGPATH -u "$path"`
40663    new_path=`$WHICH "$new_path" 2> /dev/null`
40664    # bat and cmd files are not always considered executable in cygwin causing which
40665    # to not find them
40666    if test "x$new_path" = x \
40667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40669      new_path=`$CYGPATH -u "$path"`
40670    fi
40671    if test "x$new_path" = x; then
40672      # It's still not found. Now this is an unrecoverable error.
40673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40674$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40675      has_space=`$ECHO "$complete" | $GREP " "`
40676      if test "x$has_space" != x; then
40677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40679      fi
40680      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40681    fi
40682  fi
40683
40684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40687  # "foo.exe" is OK but "foo" is an error.
40688  #
40689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40690  # It is also a way to make sure we got the proper file name for the real test later on.
40691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40692  if test "x$test_shortpath" = x; then
40693    # Short path failed, file does not exist as specified.
40694    # Try adding .exe or .cmd
40695    if test -f "${new_path}.exe"; then
40696      input_to_shortpath="${new_path}.exe"
40697    elif test -f "${new_path}.cmd"; then
40698      input_to_shortpath="${new_path}.cmd"
40699    else
40700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40701$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40704      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40705    fi
40706  else
40707    input_to_shortpath="$new_path"
40708  fi
40709
40710  # Call helper function which possibly converts this using DOS-style short mode.
40711  # If so, the updated path is stored in $new_path.
40712  new_path="$input_to_shortpath"
40713
40714  input_path="$input_to_shortpath"
40715  # Check if we need to convert this using DOS-style short mode. If the path
40716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40717  # take no chances and rewrite it.
40718  # Note: m4 eats our [], so we need to use [ and ] instead.
40719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40720  if test "x$has_forbidden_chars" != x; then
40721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40725      # Going to short mode and back again did indeed matter. Since short mode is
40726      # case insensitive, let's make it lowercase to improve readability.
40727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40728      # Now convert it back to Unix-style (cygpath)
40729      input_path=`$CYGPATH -u "$shortmode_path"`
40730      new_path="$input_path"
40731    fi
40732  fi
40733
40734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40735  if test "x$test_cygdrive_prefix" = x; then
40736    # As a simple fix, exclude /usr/bin since it's not a real path.
40737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40739      # a path prefixed by /cygdrive for fixpath to work.
40740      new_path="$CYGWIN_ROOT_PATH$input_path"
40741    fi
40742  fi
40743
40744  # remove trailing .exe if any
40745  new_path="${new_path/%.exe/}"
40746
40747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40748
40749  # First separate the path from the arguments. This will split at the first
40750  # space.
40751  complete="$BUILD_CXX"
40752  path="${complete%% *}"
40753  tmp="$complete EOL"
40754  arguments="${tmp#* }"
40755
40756  # Input might be given as Windows format, start by converting to
40757  # unix format.
40758  new_path="$path"
40759
40760  windows_path="$new_path"
40761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40762    unix_path=`$CYGPATH -u "$windows_path"`
40763    new_path="$unix_path"
40764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40766    new_path="$unix_path"
40767  fi
40768
40769
40770  # Now try to locate executable using which
40771  new_path=`$WHICH "$new_path" 2> /dev/null`
40772
40773  if test "x$new_path" = x; then
40774    # Oops. Which didn't find the executable.
40775    # The splitting of arguments from the executable at a space might have been incorrect,
40776    # since paths with space are more likely in Windows. Give it another try with the whole
40777    # argument.
40778    path="$complete"
40779    arguments="EOL"
40780    new_path="$path"
40781
40782  windows_path="$new_path"
40783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40784    unix_path=`$CYGPATH -u "$windows_path"`
40785    new_path="$unix_path"
40786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40788    new_path="$unix_path"
40789  fi
40790
40791
40792    new_path=`$WHICH "$new_path" 2> /dev/null`
40793    # bat and cmd files are not always considered executable in MSYS causing which
40794    # to not find them
40795    if test "x$new_path" = x \
40796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40798      new_path="$path"
40799
40800  windows_path="$new_path"
40801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40802    unix_path=`$CYGPATH -u "$windows_path"`
40803    new_path="$unix_path"
40804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40806    new_path="$unix_path"
40807  fi
40808
40809    fi
40810
40811    if test "x$new_path" = x; then
40812      # It's still not found. Now this is an unrecoverable error.
40813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40814$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40815      has_space=`$ECHO "$complete" | $GREP " "`
40816      if test "x$has_space" != x; then
40817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40819      fi
40820      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40821    fi
40822  fi
40823
40824  # Now new_path has a complete unix path to the binary
40825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40826    # Keep paths in /bin as-is, but remove trailing .exe if any
40827    new_path="${new_path/%.exe/}"
40828    # Do not save /bin paths to all_fixpath_prefixes!
40829  else
40830    # Not in mixed or Windows style, start by that.
40831    new_path=`cmd //c echo $new_path`
40832
40833  input_path="$new_path"
40834  # Check if we need to convert this using DOS-style short mode. If the path
40835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40836  # take no chances and rewrite it.
40837  # Note: m4 eats our [], so we need to use [ and ] instead.
40838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40839  if test "x$has_forbidden_chars" != x; then
40840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40842  fi
40843
40844    # Output is in $new_path
40845
40846  windows_path="$new_path"
40847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40848    unix_path=`$CYGPATH -u "$windows_path"`
40849    new_path="$unix_path"
40850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40852    new_path="$unix_path"
40853  fi
40854
40855    # remove trailing .exe if any
40856    new_path="${new_path/%.exe/}"
40857
40858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40860  fi
40861
40862    else
40863      # We're on a unix platform. Hooray! :)
40864      # First separate the path from the arguments. This will split at the first
40865      # space.
40866      complete="$BUILD_CXX"
40867      path="${complete%% *}"
40868      tmp="$complete EOL"
40869      arguments="${tmp#* }"
40870
40871      # Cannot rely on the command "which" here since it doesn't always work.
40872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40873      if test -z "$is_absolute_path"; then
40874        # Path to executable is not absolute. Find it.
40875        IFS_save="$IFS"
40876        IFS=:
40877        for p in $PATH; do
40878          if test -f "$p/$path" && test -x "$p/$path"; then
40879            new_path="$p/$path"
40880            break
40881          fi
40882        done
40883        IFS="$IFS_save"
40884      else
40885        # This is an absolute path, we can use it without further modifications.
40886        new_path="$path"
40887      fi
40888
40889      if test "x$new_path" = x; then
40890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40891$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40892        has_space=`$ECHO "$complete" | $GREP " "`
40893        if test "x$has_space" != x; then
40894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40896        fi
40897        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40898      fi
40899    fi
40900
40901    # Now join together the path and the arguments once again
40902    if test "x$arguments" != xEOL; then
40903      new_complete="$new_path ${arguments% *}"
40904    else
40905      new_complete="$new_path"
40906    fi
40907
40908    if test "x$complete" != "x$new_complete"; then
40909      BUILD_CXX="$new_complete"
40910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40911$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40912    fi
40913  fi
40914
40915
40916
40917  # Publish this variable in the help.
40918
40919
40920  if [ -z "${BUILD_LD+x}" ]; then
40921    # The variable is not set by user, try to locate tool using the code snippet
40922    for ac_prog in ld
40923do
40924  # Extract the first word of "$ac_prog", so it can be a program name with args.
40925set dummy $ac_prog; ac_word=$2
40926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40927$as_echo_n "checking for $ac_word... " >&6; }
40928if ${ac_cv_path_BUILD_LD+:} false; then :
40929  $as_echo_n "(cached) " >&6
40930else
40931  case $BUILD_LD in
40932  [\\/]* | ?:[\\/]*)
40933  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40934  ;;
40935  *)
40936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40937for as_dir in $PATH
40938do
40939  IFS=$as_save_IFS
40940  test -z "$as_dir" && as_dir=.
40941    for ac_exec_ext in '' $ac_executable_extensions; do
40942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40943    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40945    break 2
40946  fi
40947done
40948  done
40949IFS=$as_save_IFS
40950
40951  ;;
40952esac
40953fi
40954BUILD_LD=$ac_cv_path_BUILD_LD
40955if test -n "$BUILD_LD"; then
40956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40957$as_echo "$BUILD_LD" >&6; }
40958else
40959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40960$as_echo "no" >&6; }
40961fi
40962
40963
40964  test -n "$BUILD_LD" && break
40965done
40966
40967  else
40968    # The variable is set, but is it from the command line or the environment?
40969
40970    # Try to remove the string !BUILD_LD! from our list.
40971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40973      # If it failed, the variable was not from the command line. Ignore it,
40974      # but warn the user (except for BASH, which is always set by the calling BASH).
40975      if test "xBUILD_LD" != xBASH; then
40976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40977$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40978      fi
40979      # Try to locate tool using the code snippet
40980      for ac_prog in ld
40981do
40982  # Extract the first word of "$ac_prog", so it can be a program name with args.
40983set dummy $ac_prog; ac_word=$2
40984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40985$as_echo_n "checking for $ac_word... " >&6; }
40986if ${ac_cv_path_BUILD_LD+:} false; then :
40987  $as_echo_n "(cached) " >&6
40988else
40989  case $BUILD_LD in
40990  [\\/]* | ?:[\\/]*)
40991  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40992  ;;
40993  *)
40994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40995for as_dir in $PATH
40996do
40997  IFS=$as_save_IFS
40998  test -z "$as_dir" && as_dir=.
40999    for ac_exec_ext in '' $ac_executable_extensions; do
41000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41001    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
41002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41003    break 2
41004  fi
41005done
41006  done
41007IFS=$as_save_IFS
41008
41009  ;;
41010esac
41011fi
41012BUILD_LD=$ac_cv_path_BUILD_LD
41013if test -n "$BUILD_LD"; then
41014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
41015$as_echo "$BUILD_LD" >&6; }
41016else
41017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41018$as_echo "no" >&6; }
41019fi
41020
41021
41022  test -n "$BUILD_LD" && break
41023done
41024
41025    else
41026      # If it succeeded, then it was overridden by the user. We will use it
41027      # for the tool.
41028
41029      # First remove it from the list of overridden variables, so we can test
41030      # for unknown variables in the end.
41031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41032
41033      # Check if we try to supply an empty value
41034      if test "x$BUILD_LD" = x; then
41035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_LD= (no value)" >&5
41036$as_echo "$as_me: Setting user supplied tool BUILD_LD= (no value)" >&6;}
41037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
41038$as_echo_n "checking for BUILD_LD... " >&6; }
41039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41040$as_echo "disabled" >&6; }
41041      else
41042        # Check if the provided tool contains a complete path.
41043        tool_specified="$BUILD_LD"
41044        tool_basename="${tool_specified##*/}"
41045        if test "x$tool_basename" = "x$tool_specified"; then
41046          # A command without a complete path is provided, search $PATH.
41047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
41048$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
41049          # Extract the first word of "$tool_basename", so it can be a program name with args.
41050set dummy $tool_basename; ac_word=$2
41051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41052$as_echo_n "checking for $ac_word... " >&6; }
41053if ${ac_cv_path_BUILD_LD+:} false; then :
41054  $as_echo_n "(cached) " >&6
41055else
41056  case $BUILD_LD in
41057  [\\/]* | ?:[\\/]*)
41058  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
41059  ;;
41060  *)
41061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41062for as_dir in $PATH
41063do
41064  IFS=$as_save_IFS
41065  test -z "$as_dir" && as_dir=.
41066    for ac_exec_ext in '' $ac_executable_extensions; do
41067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41068    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
41069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41070    break 2
41071  fi
41072done
41073  done
41074IFS=$as_save_IFS
41075
41076  ;;
41077esac
41078fi
41079BUILD_LD=$ac_cv_path_BUILD_LD
41080if test -n "$BUILD_LD"; then
41081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
41082$as_echo "$BUILD_LD" >&6; }
41083else
41084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41085$as_echo "no" >&6; }
41086fi
41087
41088
41089          if test "x$BUILD_LD" = x; then
41090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41091          fi
41092        else
41093          # Otherwise we believe it is a complete path. Use it as it is.
41094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
41095$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
41096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
41097$as_echo_n "checking for BUILD_LD... " >&6; }
41098          if test ! -x "$tool_specified"; then
41099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41100$as_echo "not found" >&6; }
41101            as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
41102          fi
41103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41104$as_echo "$tool_specified" >&6; }
41105        fi
41106      fi
41107    fi
41108  fi
41109
41110
41111
41112  # Only process if variable expands to non-empty
41113
41114  if test "x$BUILD_LD" != x; then
41115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41116
41117  # First separate the path from the arguments. This will split at the first
41118  # space.
41119  complete="$BUILD_LD"
41120  path="${complete%% *}"
41121  tmp="$complete EOL"
41122  arguments="${tmp#* }"
41123
41124  # Input might be given as Windows format, start by converting to
41125  # unix format.
41126  new_path=`$CYGPATH -u "$path"`
41127
41128  # Now try to locate executable using which
41129  new_path=`$WHICH "$new_path" 2> /dev/null`
41130  # bat and cmd files are not always considered executable in cygwin causing which
41131  # to not find them
41132  if test "x$new_path" = x \
41133      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41134      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41135    new_path=`$CYGPATH -u "$path"`
41136  fi
41137  if test "x$new_path" = x; then
41138    # Oops. Which didn't find the executable.
41139    # The splitting of arguments from the executable at a space might have been incorrect,
41140    # since paths with space are more likely in Windows. Give it another try with the whole
41141    # argument.
41142    path="$complete"
41143    arguments="EOL"
41144    new_path=`$CYGPATH -u "$path"`
41145    new_path=`$WHICH "$new_path" 2> /dev/null`
41146    # bat and cmd files are not always considered executable in cygwin causing which
41147    # to not find them
41148    if test "x$new_path" = x \
41149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41151      new_path=`$CYGPATH -u "$path"`
41152    fi
41153    if test "x$new_path" = x; then
41154      # It's still not found. Now this is an unrecoverable error.
41155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41156$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41157      has_space=`$ECHO "$complete" | $GREP " "`
41158      if test "x$has_space" != x; then
41159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41161      fi
41162      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41163    fi
41164  fi
41165
41166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41169  # "foo.exe" is OK but "foo" is an error.
41170  #
41171  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41172  # It is also a way to make sure we got the proper file name for the real test later on.
41173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41174  if test "x$test_shortpath" = x; then
41175    # Short path failed, file does not exist as specified.
41176    # Try adding .exe or .cmd
41177    if test -f "${new_path}.exe"; then
41178      input_to_shortpath="${new_path}.exe"
41179    elif test -f "${new_path}.cmd"; then
41180      input_to_shortpath="${new_path}.cmd"
41181    else
41182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
41183$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
41184      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41185$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41186      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41187    fi
41188  else
41189    input_to_shortpath="$new_path"
41190  fi
41191
41192  # Call helper function which possibly converts this using DOS-style short mode.
41193  # If so, the updated path is stored in $new_path.
41194  new_path="$input_to_shortpath"
41195
41196  input_path="$input_to_shortpath"
41197  # Check if we need to convert this using DOS-style short mode. If the path
41198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41199  # take no chances and rewrite it.
41200  # Note: m4 eats our [], so we need to use [ and ] instead.
41201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41202  if test "x$has_forbidden_chars" != x; then
41203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41207      # Going to short mode and back again did indeed matter. Since short mode is
41208      # case insensitive, let's make it lowercase to improve readability.
41209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41210      # Now convert it back to Unix-style (cygpath)
41211      input_path=`$CYGPATH -u "$shortmode_path"`
41212      new_path="$input_path"
41213    fi
41214  fi
41215
41216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41217  if test "x$test_cygdrive_prefix" = x; then
41218    # As a simple fix, exclude /usr/bin since it's not a real path.
41219    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41221      # a path prefixed by /cygdrive for fixpath to work.
41222      new_path="$CYGWIN_ROOT_PATH$input_path"
41223    fi
41224  fi
41225
41226  # remove trailing .exe if any
41227  new_path="${new_path/%.exe/}"
41228
41229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41230
41231  # First separate the path from the arguments. This will split at the first
41232  # space.
41233  complete="$BUILD_LD"
41234  path="${complete%% *}"
41235  tmp="$complete EOL"
41236  arguments="${tmp#* }"
41237
41238  # Input might be given as Windows format, start by converting to
41239  # unix format.
41240  new_path="$path"
41241
41242  windows_path="$new_path"
41243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41244    unix_path=`$CYGPATH -u "$windows_path"`
41245    new_path="$unix_path"
41246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41248    new_path="$unix_path"
41249  fi
41250
41251
41252  # Now try to locate executable using which
41253  new_path=`$WHICH "$new_path" 2> /dev/null`
41254
41255  if test "x$new_path" = x; then
41256    # Oops. Which didn't find the executable.
41257    # The splitting of arguments from the executable at a space might have been incorrect,
41258    # since paths with space are more likely in Windows. Give it another try with the whole
41259    # argument.
41260    path="$complete"
41261    arguments="EOL"
41262    new_path="$path"
41263
41264  windows_path="$new_path"
41265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41266    unix_path=`$CYGPATH -u "$windows_path"`
41267    new_path="$unix_path"
41268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41270    new_path="$unix_path"
41271  fi
41272
41273
41274    new_path=`$WHICH "$new_path" 2> /dev/null`
41275    # bat and cmd files are not always considered executable in MSYS causing which
41276    # to not find them
41277    if test "x$new_path" = x \
41278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41280      new_path="$path"
41281
41282  windows_path="$new_path"
41283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41284    unix_path=`$CYGPATH -u "$windows_path"`
41285    new_path="$unix_path"
41286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41288    new_path="$unix_path"
41289  fi
41290
41291    fi
41292
41293    if test "x$new_path" = x; then
41294      # It's still not found. Now this is an unrecoverable error.
41295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41296$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41297      has_space=`$ECHO "$complete" | $GREP " "`
41298      if test "x$has_space" != x; then
41299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41301      fi
41302      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41303    fi
41304  fi
41305
41306  # Now new_path has a complete unix path to the binary
41307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41308    # Keep paths in /bin as-is, but remove trailing .exe if any
41309    new_path="${new_path/%.exe/}"
41310    # Do not save /bin paths to all_fixpath_prefixes!
41311  else
41312    # Not in mixed or Windows style, start by that.
41313    new_path=`cmd //c echo $new_path`
41314
41315  input_path="$new_path"
41316  # Check if we need to convert this using DOS-style short mode. If the path
41317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41318  # take no chances and rewrite it.
41319  # Note: m4 eats our [], so we need to use [ and ] instead.
41320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41321  if test "x$has_forbidden_chars" != x; then
41322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41324  fi
41325
41326    # Output is in $new_path
41327
41328  windows_path="$new_path"
41329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41330    unix_path=`$CYGPATH -u "$windows_path"`
41331    new_path="$unix_path"
41332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41334    new_path="$unix_path"
41335  fi
41336
41337    # remove trailing .exe if any
41338    new_path="${new_path/%.exe/}"
41339
41340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41342  fi
41343
41344    else
41345      # We're on a unix platform. Hooray! :)
41346      # First separate the path from the arguments. This will split at the first
41347      # space.
41348      complete="$BUILD_LD"
41349      path="${complete%% *}"
41350      tmp="$complete EOL"
41351      arguments="${tmp#* }"
41352
41353      # Cannot rely on the command "which" here since it doesn't always work.
41354      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41355      if test -z "$is_absolute_path"; then
41356        # Path to executable is not absolute. Find it.
41357        IFS_save="$IFS"
41358        IFS=:
41359        for p in $PATH; do
41360          if test -f "$p/$path" && test -x "$p/$path"; then
41361            new_path="$p/$path"
41362            break
41363          fi
41364        done
41365        IFS="$IFS_save"
41366      else
41367        # This is an absolute path, we can use it without further modifications.
41368        new_path="$path"
41369      fi
41370
41371      if test "x$new_path" = x; then
41372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41373$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41374        has_space=`$ECHO "$complete" | $GREP " "`
41375        if test "x$has_space" != x; then
41376          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41378        fi
41379        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41380      fi
41381    fi
41382
41383    # Now join together the path and the arguments once again
41384    if test "x$arguments" != xEOL; then
41385      new_complete="$new_path ${arguments% *}"
41386    else
41387      new_complete="$new_path"
41388    fi
41389
41390    if test "x$complete" != "x$new_complete"; then
41391      BUILD_LD="$new_complete"
41392      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
41393$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
41394    fi
41395  fi
41396
41397    BUILD_SYSROOT_CFLAGS=""
41398    BUILD_SYSROOT_LDFLAGS=""
41399  else
41400    # If we are not cross compiling, use the normal target compilers for
41401    # building the build platform executables.
41402    BUILD_CC="$CC"
41403    BUILD_CXX="$CXX"
41404    BUILD_LD="$LD"
41405    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
41406    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
41407  fi
41408
41409
41410
41411
41412
41413
41414
41415
41416  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41417    # For hotspot, we need these in Windows mixed path,
41418    # so rewrite them all. Need added .exe suffix.
41419    HOTSPOT_CXX="$CXX.exe"
41420    HOTSPOT_LD="$LD.exe"
41421    HOTSPOT_MT="$MT.exe"
41422    HOTSPOT_RC="$RC.exe"
41423
41424  unix_path="$HOTSPOT_CXX"
41425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41426    windows_path=`$CYGPATH -m "$unix_path"`
41427    HOTSPOT_CXX="$windows_path"
41428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41429    windows_path=`cmd //c echo $unix_path`
41430    HOTSPOT_CXX="$windows_path"
41431  fi
41432
41433
41434  unix_path="$HOTSPOT_LD"
41435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41436    windows_path=`$CYGPATH -m "$unix_path"`
41437    HOTSPOT_LD="$windows_path"
41438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41439    windows_path=`cmd //c echo $unix_path`
41440    HOTSPOT_LD="$windows_path"
41441  fi
41442
41443
41444  unix_path="$HOTSPOT_MT"
41445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41446    windows_path=`$CYGPATH -m "$unix_path"`
41447    HOTSPOT_MT="$windows_path"
41448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41449    windows_path=`cmd //c echo $unix_path`
41450    HOTSPOT_MT="$windows_path"
41451  fi
41452
41453
41454  unix_path="$HOTSPOT_RC"
41455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41456    windows_path=`$CYGPATH -m "$unix_path"`
41457    HOTSPOT_RC="$windows_path"
41458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41459    windows_path=`cmd //c echo $unix_path`
41460    HOTSPOT_RC="$windows_path"
41461  fi
41462
41463
41464
41465  else
41466    HOTSPOT_CXX="$CXX"
41467    HOTSPOT_LD="$LD"
41468  fi
41469
41470
41471
41472  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41473    USE_CLANG=true
41474  fi
41475
41476
41477
41478
41479
41480  # The package path is used only on macosx?
41481  # FIXME: clean this up, and/or move it elsewhere.
41482  PACKAGE_PATH=/opt/local
41483
41484
41485  # Check for extra potential brokenness.
41486  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41487    # On Windows, double-check that we got the right compiler.
41488    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41489    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41490    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41491      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41492        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
41493      fi
41494    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41495      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41496        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41497      fi
41498    fi
41499  fi
41500
41501  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41502    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41503    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41504    # This is later checked when setting flags.
41505
41506    # "-Og" suppported for GCC 4.8 and later
41507    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41508
41509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41510$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41511  supports=yes
41512
41513  saved_cflags="$CFLAGS"
41514  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41515  ac_ext=c
41516ac_cpp='$CPP $CPPFLAGS'
41517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41519ac_compiler_gnu=$ac_cv_c_compiler_gnu
41520
41521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41522/* end confdefs.h.  */
41523int i;
41524_ACEOF
41525if ac_fn_c_try_compile "$LINENO"; then :
41526
41527else
41528  supports=no
41529fi
41530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41531  ac_ext=cpp
41532ac_cpp='$CXXCPP $CPPFLAGS'
41533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41536
41537  CFLAGS="$saved_cflags"
41538
41539  saved_cxxflags="$CXXFLAGS"
41540  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41541  ac_ext=cpp
41542ac_cpp='$CXXCPP $CPPFLAGS'
41543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41546
41547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41548/* end confdefs.h.  */
41549int i;
41550_ACEOF
41551if ac_fn_cxx_try_compile "$LINENO"; then :
41552
41553else
41554  supports=no
41555fi
41556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41557  ac_ext=cpp
41558ac_cpp='$CXXCPP $CPPFLAGS'
41559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41562
41563  CXXFLAGS="$saved_cxxflags"
41564
41565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41566$as_echo "$supports" >&6; }
41567  if test "x$supports" = "xyes" ; then
41568    HAS_CFLAG_OPTIMIZE_DEBUG=true
41569  else
41570    HAS_CFLAG_OPTIMIZE_DEBUG=false
41571  fi
41572
41573
41574    # "-z relro" supported in GNU binutils 2.17 and later
41575    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41576
41577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41578$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41579  supports=yes
41580
41581  saved_ldflags="$LDFLAGS"
41582  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41583  ac_ext=c
41584ac_cpp='$CPP $CPPFLAGS'
41585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41587ac_compiler_gnu=$ac_cv_c_compiler_gnu
41588
41589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41590/* end confdefs.h.  */
41591
41592int
41593main ()
41594{
41595
41596  ;
41597  return 0;
41598}
41599_ACEOF
41600if ac_fn_c_try_link "$LINENO"; then :
41601
41602else
41603  supports=no
41604fi
41605rm -f core conftest.err conftest.$ac_objext \
41606    conftest$ac_exeext conftest.$ac_ext
41607  ac_ext=cpp
41608ac_cpp='$CXXCPP $CPPFLAGS'
41609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41612
41613  LDFLAGS="$saved_ldflags"
41614
41615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41616$as_echo "$supports" >&6; }
41617  if test "x$supports" = "xyes" ; then
41618    HAS_LINKER_RELRO=true
41619  else
41620    HAS_LINKER_RELRO=false
41621  fi
41622
41623
41624    # "-z now" supported in GNU binutils 2.11 and later
41625    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41626
41627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41628$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41629  supports=yes
41630
41631  saved_ldflags="$LDFLAGS"
41632  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41633  ac_ext=c
41634ac_cpp='$CPP $CPPFLAGS'
41635ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41636ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41637ac_compiler_gnu=$ac_cv_c_compiler_gnu
41638
41639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41640/* end confdefs.h.  */
41641
41642int
41643main ()
41644{
41645
41646  ;
41647  return 0;
41648}
41649_ACEOF
41650if ac_fn_c_try_link "$LINENO"; then :
41651
41652else
41653  supports=no
41654fi
41655rm -f core conftest.err conftest.$ac_objext \
41656    conftest$ac_exeext conftest.$ac_ext
41657  ac_ext=cpp
41658ac_cpp='$CXXCPP $CPPFLAGS'
41659ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41660ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41661ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41662
41663  LDFLAGS="$saved_ldflags"
41664
41665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41666$as_echo "$supports" >&6; }
41667  if test "x$supports" = "xyes" ; then
41668    HAS_LINKER_NOW=true
41669  else
41670    HAS_LINKER_NOW=false
41671  fi
41672
41673  fi
41674
41675  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41676  # in executable.'
41677  USING_BROKEN_SUSE_LD=no
41678  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41680$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41681    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41682    $ECHO "int main() { }" > main.c
41683    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41685$as_echo "no" >&6; }
41686      USING_BROKEN_SUSE_LD=no
41687    else
41688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41689$as_echo "yes" >&6; }
41690      USING_BROKEN_SUSE_LD=yes
41691    fi
41692    rm -rf version-script.map main.c a.out
41693  fi
41694
41695
41696
41697# Setup the JTReg Regression Test Harness.
41698
41699
41700# Check whether --with-jtreg was given.
41701if test "${with_jtreg+set}" = set; then :
41702  withval=$with_jtreg;
41703else
41704  with_jtreg=no
41705fi
41706
41707
41708  if test "x$with_jtreg" = xno; then
41709    # jtreg disabled
41710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41711$as_echo_n "checking for jtreg... " >&6; }
41712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41713$as_echo "no" >&6; }
41714  else
41715    if test "x$with_jtreg" != xyes; then
41716      # with path specified.
41717      JT_HOME="$with_jtreg"
41718    fi
41719
41720    if test "x$JT_HOME" != x; then
41721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41722$as_echo_n "checking for jtreg... " >&6; }
41723
41724      # use JT_HOME enviroment var.
41725
41726  # Only process if variable expands to non-empty
41727
41728  if test "x$JT_HOME" != x; then
41729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41730
41731  # Input might be given as Windows format, start by converting to
41732  # unix format.
41733  path="$JT_HOME"
41734  new_path=`$CYGPATH -u "$path"`
41735
41736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41739  # "foo.exe" is OK but "foo" is an error.
41740  #
41741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41742  # It is also a way to make sure we got the proper file name for the real test later on.
41743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41744  if test "x$test_shortpath" = x; then
41745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41746$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41747    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41748  fi
41749
41750  # Call helper function which possibly converts this using DOS-style short mode.
41751  # If so, the updated path is stored in $new_path.
41752
41753  input_path="$new_path"
41754  # Check if we need to convert this using DOS-style short mode. If the path
41755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41756  # take no chances and rewrite it.
41757  # Note: m4 eats our [], so we need to use [ and ] instead.
41758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41759  if test "x$has_forbidden_chars" != x; then
41760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41764      # Going to short mode and back again did indeed matter. Since short mode is
41765      # case insensitive, let's make it lowercase to improve readability.
41766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41767      # Now convert it back to Unix-style (cygpath)
41768      input_path=`$CYGPATH -u "$shortmode_path"`
41769      new_path="$input_path"
41770    fi
41771  fi
41772
41773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41774  if test "x$test_cygdrive_prefix" = x; then
41775    # As a simple fix, exclude /usr/bin since it's not a real path.
41776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41778      # a path prefixed by /cygdrive for fixpath to work.
41779      new_path="$CYGWIN_ROOT_PATH$input_path"
41780    fi
41781  fi
41782
41783
41784  if test "x$path" != "x$new_path"; then
41785    JT_HOME="$new_path"
41786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41787$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41788  fi
41789
41790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41791
41792  path="$JT_HOME"
41793  has_colon=`$ECHO $path | $GREP ^.:`
41794  new_path="$path"
41795  if test "x$has_colon" = x; then
41796    # Not in mixed or Windows style, start by that.
41797    new_path=`cmd //c echo $path`
41798  fi
41799
41800
41801  input_path="$new_path"
41802  # Check if we need to convert this using DOS-style short mode. If the path
41803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41804  # take no chances and rewrite it.
41805  # Note: m4 eats our [], so we need to use [ and ] instead.
41806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41807  if test "x$has_forbidden_chars" != x; then
41808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41810  fi
41811
41812
41813  windows_path="$new_path"
41814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41815    unix_path=`$CYGPATH -u "$windows_path"`
41816    new_path="$unix_path"
41817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41819    new_path="$unix_path"
41820  fi
41821
41822  if test "x$path" != "x$new_path"; then
41823    JT_HOME="$new_path"
41824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41825$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41826  fi
41827
41828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41830
41831    else
41832      # We're on a unix platform. Hooray! :)
41833      path="$JT_HOME"
41834      has_space=`$ECHO "$path" | $GREP " "`
41835      if test "x$has_space" != x; then
41836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41837$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41839      fi
41840
41841      # Use eval to expand a potential ~
41842      eval path="$path"
41843      if test ! -f "$path" && test ! -d "$path"; then
41844        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41845      fi
41846
41847      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41848    fi
41849  fi
41850
41851
41852      # jtreg win32 script works for everybody
41853      JTREGEXE="$JT_HOME/bin/jtreg"
41854
41855      if test ! -f "$JTREGEXE"; then
41856        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41857      fi
41858
41859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41860$as_echo "$JTREGEXE" >&6; }
41861    else
41862      # try to find jtreg on path
41863
41864
41865
41866  # Publish this variable in the help.
41867
41868
41869  if [ -z "${JTREGEXE+x}" ]; then
41870    # The variable is not set by user, try to locate tool using the code snippet
41871    for ac_prog in jtreg
41872do
41873  # Extract the first word of "$ac_prog", so it can be a program name with args.
41874set dummy $ac_prog; ac_word=$2
41875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41876$as_echo_n "checking for $ac_word... " >&6; }
41877if ${ac_cv_path_JTREGEXE+:} false; then :
41878  $as_echo_n "(cached) " >&6
41879else
41880  case $JTREGEXE in
41881  [\\/]* | ?:[\\/]*)
41882  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41883  ;;
41884  *)
41885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41886for as_dir in $PATH
41887do
41888  IFS=$as_save_IFS
41889  test -z "$as_dir" && as_dir=.
41890    for ac_exec_ext in '' $ac_executable_extensions; do
41891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41892    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41894    break 2
41895  fi
41896done
41897  done
41898IFS=$as_save_IFS
41899
41900  ;;
41901esac
41902fi
41903JTREGEXE=$ac_cv_path_JTREGEXE
41904if test -n "$JTREGEXE"; then
41905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41906$as_echo "$JTREGEXE" >&6; }
41907else
41908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41909$as_echo "no" >&6; }
41910fi
41911
41912
41913  test -n "$JTREGEXE" && break
41914done
41915
41916  else
41917    # The variable is set, but is it from the command line or the environment?
41918
41919    # Try to remove the string !JTREGEXE! from our list.
41920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41922      # If it failed, the variable was not from the command line. Ignore it,
41923      # but warn the user (except for BASH, which is always set by the calling BASH).
41924      if test "xJTREGEXE" != xBASH; then
41925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41926$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41927      fi
41928      # Try to locate tool using the code snippet
41929      for ac_prog in jtreg
41930do
41931  # Extract the first word of "$ac_prog", so it can be a program name with args.
41932set dummy $ac_prog; ac_word=$2
41933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41934$as_echo_n "checking for $ac_word... " >&6; }
41935if ${ac_cv_path_JTREGEXE+:} false; then :
41936  $as_echo_n "(cached) " >&6
41937else
41938  case $JTREGEXE in
41939  [\\/]* | ?:[\\/]*)
41940  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41941  ;;
41942  *)
41943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41944for as_dir in $PATH
41945do
41946  IFS=$as_save_IFS
41947  test -z "$as_dir" && as_dir=.
41948    for ac_exec_ext in '' $ac_executable_extensions; do
41949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41950    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41952    break 2
41953  fi
41954done
41955  done
41956IFS=$as_save_IFS
41957
41958  ;;
41959esac
41960fi
41961JTREGEXE=$ac_cv_path_JTREGEXE
41962if test -n "$JTREGEXE"; then
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41964$as_echo "$JTREGEXE" >&6; }
41965else
41966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41967$as_echo "no" >&6; }
41968fi
41969
41970
41971  test -n "$JTREGEXE" && break
41972done
41973
41974    else
41975      # If it succeeded, then it was overridden by the user. We will use it
41976      # for the tool.
41977
41978      # First remove it from the list of overridden variables, so we can test
41979      # for unknown variables in the end.
41980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41981
41982      # Check if we try to supply an empty value
41983      if test "x$JTREGEXE" = x; then
41984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
41985$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
41986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41987$as_echo_n "checking for JTREGEXE... " >&6; }
41988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41989$as_echo "disabled" >&6; }
41990      else
41991        # Check if the provided tool contains a complete path.
41992        tool_specified="$JTREGEXE"
41993        tool_basename="${tool_specified##*/}"
41994        if test "x$tool_basename" = "x$tool_specified"; then
41995          # A command without a complete path is provided, search $PATH.
41996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41997$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41998          # Extract the first word of "$tool_basename", so it can be a program name with args.
41999set dummy $tool_basename; ac_word=$2
42000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42001$as_echo_n "checking for $ac_word... " >&6; }
42002if ${ac_cv_path_JTREGEXE+:} false; then :
42003  $as_echo_n "(cached) " >&6
42004else
42005  case $JTREGEXE in
42006  [\\/]* | ?:[\\/]*)
42007  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
42008  ;;
42009  *)
42010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42011for as_dir in $PATH
42012do
42013  IFS=$as_save_IFS
42014  test -z "$as_dir" && as_dir=.
42015    for ac_exec_ext in '' $ac_executable_extensions; do
42016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42017    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
42018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42019    break 2
42020  fi
42021done
42022  done
42023IFS=$as_save_IFS
42024
42025  ;;
42026esac
42027fi
42028JTREGEXE=$ac_cv_path_JTREGEXE
42029if test -n "$JTREGEXE"; then
42030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
42031$as_echo "$JTREGEXE" >&6; }
42032else
42033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42034$as_echo "no" >&6; }
42035fi
42036
42037
42038          if test "x$JTREGEXE" = x; then
42039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42040          fi
42041        else
42042          # Otherwise we believe it is a complete path. Use it as it is.
42043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
42044$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
42045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
42046$as_echo_n "checking for JTREGEXE... " >&6; }
42047          if test ! -x "$tool_specified"; then
42048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42049$as_echo "not found" >&6; }
42050            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
42051          fi
42052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42053$as_echo "$tool_specified" >&6; }
42054        fi
42055      fi
42056    fi
42057  fi
42058
42059
42060
42061  if test "x$JTREGEXE" = x; then
42062    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
42063  fi
42064
42065
42066      JT_HOME="`$DIRNAME $JTREGEXE`"
42067    fi
42068  fi
42069
42070
42071
42072
42073
42074
42075  # Option used to tell the compiler whether to create 32- or 64-bit executables
42076  if test "x$TOOLCHAIN_TYPE" = xxlc; then
42077    COMPILER_TARGET_BITS_FLAG="-q"
42078  else
42079    COMPILER_TARGET_BITS_FLAG="-m"
42080  fi
42081
42082
42083  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
42084  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42085    ARFLAGS="-r"
42086  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42087    ARFLAGS="-X64"
42088  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
42089    # lib.exe is used as AR to create static libraries.
42090    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
42091  else
42092    ARFLAGS=""
42093  fi
42094
42095
42096  ## Setup strip.
42097  # FIXME: should this really be per platform, or should it be per toolchain type?
42098  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
42099  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
42100  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42101    STRIPFLAGS="-g"
42102  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
42103    STRIPFLAGS="-x"
42104  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
42105    STRIPFLAGS="-S"
42106  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42107    STRIPFLAGS="-X32_64"
42108  fi
42109
42110
42111
42112  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42113    CC_OUT_OPTION=-Fo
42114    EXE_OUT_OPTION=-out:
42115    LD_OUT_OPTION=-out:
42116    AR_OUT_OPTION=-out:
42117  else
42118    # The option used to specify the target .o,.a or .so file.
42119    # When compiling, how to specify the to be created object file.
42120    CC_OUT_OPTION='-o$(SPACE)'
42121    # When linking, how to specify the to be created executable.
42122    EXE_OUT_OPTION='-o$(SPACE)'
42123    # When linking, how to specify the to be created dynamically linkable library.
42124    LD_OUT_OPTION='-o$(SPACE)'
42125    # When archiving, how to specify the to be create static archive for object files.
42126    AR_OUT_OPTION='rcs$(SPACE)'
42127  fi
42128
42129
42130
42131
42132
42133  # On Windows, we need to set RC flags.
42134  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42135    RC_FLAGS="-nologo -l0x409"
42136    if test "x$VARIANT" = xOPT; then
42137      RC_FLAGS="$RC_FLAGS -DNDEBUG"
42138    fi
42139
42140    # The version variables used to create RC_FLAGS may be overridden
42141    # in a custom configure script, or possibly the command line.
42142    # Let those variables be expanded at make time in spec.gmk.
42143    # The \$ are escaped to the shell, and the $(...) variables
42144    # are evaluated by make.
42145    RC_FLAGS="$RC_FLAGS \
42146        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
42147        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
42148        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
42149        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
42150        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
42151        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
42152        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
42153  fi
42154
42155
42156  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42157    # silence copyright notice and other headers.
42158    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
42159  fi
42160
42161
42162# FIXME: Currently we must test this after toolchain but before flags. Fix!
42163
42164# Now we can test some aspects on the target using configure macros.
42165
42166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
42167$as_echo_n "checking for ANSI C header files... " >&6; }
42168if ${ac_cv_header_stdc+:} false; then :
42169  $as_echo_n "(cached) " >&6
42170else
42171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42172/* end confdefs.h.  */
42173#include <stdlib.h>
42174#include <stdarg.h>
42175#include <string.h>
42176#include <float.h>
42177
42178int
42179main ()
42180{
42181
42182  ;
42183  return 0;
42184}
42185_ACEOF
42186if ac_fn_cxx_try_compile "$LINENO"; then :
42187  ac_cv_header_stdc=yes
42188else
42189  ac_cv_header_stdc=no
42190fi
42191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42192
42193if test $ac_cv_header_stdc = yes; then
42194  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
42195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42196/* end confdefs.h.  */
42197#include <string.h>
42198
42199_ACEOF
42200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42201  $EGREP "memchr" >/dev/null 2>&1; then :
42202
42203else
42204  ac_cv_header_stdc=no
42205fi
42206rm -f conftest*
42207
42208fi
42209
42210if test $ac_cv_header_stdc = yes; then
42211  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
42212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42213/* end confdefs.h.  */
42214#include <stdlib.h>
42215
42216_ACEOF
42217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42218  $EGREP "free" >/dev/null 2>&1; then :
42219
42220else
42221  ac_cv_header_stdc=no
42222fi
42223rm -f conftest*
42224
42225fi
42226
42227if test $ac_cv_header_stdc = yes; then
42228  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
42229  if test "$cross_compiling" = yes; then :
42230  :
42231else
42232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42233/* end confdefs.h.  */
42234#include <ctype.h>
42235#include <stdlib.h>
42236#if ((' ' & 0x0FF) == 0x020)
42237# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
42238# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
42239#else
42240# define ISLOWER(c) \
42241		   (('a' <= (c) && (c) <= 'i') \
42242		     || ('j' <= (c) && (c) <= 'r') \
42243		     || ('s' <= (c) && (c) <= 'z'))
42244# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
42245#endif
42246
42247#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
42248int
42249main ()
42250{
42251  int i;
42252  for (i = 0; i < 256; i++)
42253    if (XOR (islower (i), ISLOWER (i))
42254	|| toupper (i) != TOUPPER (i))
42255      return 2;
42256  return 0;
42257}
42258_ACEOF
42259if ac_fn_cxx_try_run "$LINENO"; then :
42260
42261else
42262  ac_cv_header_stdc=no
42263fi
42264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42265  conftest.$ac_objext conftest.beam conftest.$ac_ext
42266fi
42267
42268fi
42269fi
42270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
42271$as_echo "$ac_cv_header_stdc" >&6; }
42272if test $ac_cv_header_stdc = yes; then
42273
42274$as_echo "#define STDC_HEADERS 1" >>confdefs.h
42275
42276fi
42277
42278# On IRIX 5.3, sys/types and inttypes.h are conflicting.
42279for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
42280		  inttypes.h stdint.h unistd.h
42281do :
42282  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42283ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
42284"
42285if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42286  cat >>confdefs.h <<_ACEOF
42287#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42288_ACEOF
42289
42290fi
42291
42292done
42293
42294
42295
42296  ###############################################################################
42297  #
42298  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
42299  # (The JVM can use 32 or 64 bit Java pointers but that decision
42300  # is made at runtime.)
42301  #
42302
42303  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
42304    # Always specify -m flag on Solaris
42305    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
42306
42307  # When we add flags to the "official" CFLAGS etc, we need to
42308  # keep track of these additions in ADDED_CFLAGS etc. These
42309  # will later be checked to make sure only controlled additions
42310  # have been made to CFLAGS etc.
42311  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42312  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42313  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42314
42315  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42316  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42317  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42318
42319  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42320  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42321  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42322
42323  elif test "x$COMPILE_TYPE" = xreduced; then
42324    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
42325      # Specify -m if running reduced on unix platforms
42326
42327  # When we add flags to the "official" CFLAGS etc, we need to
42328  # keep track of these additions in ADDED_CFLAGS etc. These
42329  # will later be checked to make sure only controlled additions
42330  # have been made to CFLAGS etc.
42331  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42332  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42333  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42334
42335  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42336  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42337  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42338
42339  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42340  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42341  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42342
42343    fi
42344  fi
42345
42346  # Make compilation sanity check
42347  for ac_header in stdio.h
42348do :
42349  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
42350if test "x$ac_cv_header_stdio_h" = xyes; then :
42351  cat >>confdefs.h <<_ACEOF
42352#define HAVE_STDIO_H 1
42353_ACEOF
42354
42355else
42356
42357    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42358$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42359    if test "x$COMPILE_TYPE" = xreduced; then
42360
42361  # Print a helpful message on how to acquire the necessary build dependency.
42362  # reduced is the help tag: freetype, cups, alsa etc
42363  MISSING_DEPENDENCY=reduced
42364
42365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42366    cygwin_help $MISSING_DEPENDENCY
42367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42368    msys_help $MISSING_DEPENDENCY
42369  else
42370    PKGHANDLER_COMMAND=
42371
42372    case $PKGHANDLER in
42373      apt-get)
42374        apt_help     $MISSING_DEPENDENCY ;;
42375      yum)
42376        yum_help     $MISSING_DEPENDENCY ;;
42377      port)
42378        port_help    $MISSING_DEPENDENCY ;;
42379      pkgutil)
42380        pkgutil_help $MISSING_DEPENDENCY ;;
42381      pkgadd)
42382        pkgadd_help  $MISSING_DEPENDENCY ;;
42383    esac
42384
42385    if test "x$PKGHANDLER_COMMAND" != x; then
42386      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42387    fi
42388  fi
42389
42390      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42391$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42392    elif test "x$COMPILE_TYPE" = xcross; then
42393      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42394$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42395    fi
42396    as_fn_error $? "Cannot continue." "$LINENO" 5
42397
42398fi
42399
42400done
42401
42402
42403  # The cast to long int works around a bug in the HP C Compiler
42404# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42405# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42406# This bug is HP SR number 8606223364.
42407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42408$as_echo_n "checking size of int *... " >&6; }
42409if ${ac_cv_sizeof_int_p+:} false; then :
42410  $as_echo_n "(cached) " >&6
42411else
42412  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42413
42414else
42415  if test "$ac_cv_type_int_p" = yes; then
42416     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42418as_fn_error 77 "cannot compute sizeof (int *)
42419See \`config.log' for more details" "$LINENO" 5; }
42420   else
42421     ac_cv_sizeof_int_p=0
42422   fi
42423fi
42424
42425fi
42426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42427$as_echo "$ac_cv_sizeof_int_p" >&6; }
42428
42429
42430
42431cat >>confdefs.h <<_ACEOF
42432#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42433_ACEOF
42434
42435
42436
42437  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42438  if test "x$ac_cv_sizeof_int_p" = x; then
42439    # The test failed, lets stick to the assumed value.
42440    { $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
42441$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42442  else
42443    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42444
42445    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42446      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42447      # Let's try to implicitely set the compilers target architecture and retry the test
42448      { $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
42449$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;}
42450      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
42451$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
42452
42453  # When we add flags to the "official" CFLAGS etc, we need to
42454  # keep track of these additions in ADDED_CFLAGS etc. These
42455  # will later be checked to make sure only controlled additions
42456  # have been made to CFLAGS etc.
42457  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42458  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42459  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42460
42461  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42462  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42463  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42464
42465  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42466  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42467  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42468
42469
42470      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42471      unset ac_cv_sizeof_int_p
42472      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42473      cat >>confdefs.h <<_ACEOF
42474#undef SIZEOF_INT_P
42475_ACEOF
42476
42477      # The cast to long int works around a bug in the HP C Compiler
42478# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42479# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42480# This bug is HP SR number 8606223364.
42481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42482$as_echo_n "checking size of int *... " >&6; }
42483if ${ac_cv_sizeof_int_p+:} false; then :
42484  $as_echo_n "(cached) " >&6
42485else
42486  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42487
42488else
42489  if test "$ac_cv_type_int_p" = yes; then
42490     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42492as_fn_error 77 "cannot compute sizeof (int *)
42493See \`config.log' for more details" "$LINENO" 5; }
42494   else
42495     ac_cv_sizeof_int_p=0
42496   fi
42497fi
42498
42499fi
42500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42501$as_echo "$ac_cv_sizeof_int_p" >&6; }
42502
42503
42504
42505cat >>confdefs.h <<_ACEOF
42506#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42507_ACEOF
42508
42509
42510
42511      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42512
42513      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42514        { $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
42515$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;}
42516        if test "x$COMPILE_TYPE" = xreduced; then
42517
42518  # Print a helpful message on how to acquire the necessary build dependency.
42519  # reduced is the help tag: freetype, cups, alsa etc
42520  MISSING_DEPENDENCY=reduced
42521
42522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42523    cygwin_help $MISSING_DEPENDENCY
42524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42525    msys_help $MISSING_DEPENDENCY
42526  else
42527    PKGHANDLER_COMMAND=
42528
42529    case $PKGHANDLER in
42530      apt-get)
42531        apt_help     $MISSING_DEPENDENCY ;;
42532      yum)
42533        yum_help     $MISSING_DEPENDENCY ;;
42534      port)
42535        port_help    $MISSING_DEPENDENCY ;;
42536      pkgutil)
42537        pkgutil_help $MISSING_DEPENDENCY ;;
42538      pkgadd)
42539        pkgadd_help  $MISSING_DEPENDENCY ;;
42540    esac
42541
42542    if test "x$PKGHANDLER_COMMAND" != x; then
42543      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42544    fi
42545  fi
42546
42547          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42548$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42549        elif test "x$COMPILE_TYPE" = xcross; then
42550          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42551$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42552        fi
42553        as_fn_error $? "Cannot continue." "$LINENO" 5
42554      fi
42555    fi
42556  fi
42557
42558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42559$as_echo_n "checking for target address size... " >&6; }
42560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42561$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42562
42563
42564  ###############################################################################
42565  #
42566  # Is the target little of big endian?
42567  #
42568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42569$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42570if ${ac_cv_c_bigendian+:} false; then :
42571  $as_echo_n "(cached) " >&6
42572else
42573  ac_cv_c_bigendian=unknown
42574    # See if we're dealing with a universal compiler.
42575    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42576/* end confdefs.h.  */
42577#ifndef __APPLE_CC__
42578	       not a universal capable compiler
42579	     #endif
42580	     typedef int dummy;
42581
42582_ACEOF
42583if ac_fn_cxx_try_compile "$LINENO"; then :
42584
42585	# Check for potential -arch flags.  It is not universal unless
42586	# there are at least two -arch flags with different values.
42587	ac_arch=
42588	ac_prev=
42589	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42590	 if test -n "$ac_prev"; then
42591	   case $ac_word in
42592	     i?86 | x86_64 | ppc | ppc64)
42593	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42594		 ac_arch=$ac_word
42595	       else
42596		 ac_cv_c_bigendian=universal
42597		 break
42598	       fi
42599	       ;;
42600	   esac
42601	   ac_prev=
42602	 elif test "x$ac_word" = "x-arch"; then
42603	   ac_prev=arch
42604	 fi
42605       done
42606fi
42607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42608    if test $ac_cv_c_bigendian = unknown; then
42609      # See if sys/param.h defines the BYTE_ORDER macro.
42610      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42611/* end confdefs.h.  */
42612#include <sys/types.h>
42613	     #include <sys/param.h>
42614
42615int
42616main ()
42617{
42618#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42619		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42620		     && LITTLE_ENDIAN)
42621	      bogus endian macros
42622	     #endif
42623
42624  ;
42625  return 0;
42626}
42627_ACEOF
42628if ac_fn_cxx_try_compile "$LINENO"; then :
42629  # It does; now see whether it defined to BIG_ENDIAN or not.
42630	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42631/* end confdefs.h.  */
42632#include <sys/types.h>
42633		#include <sys/param.h>
42634
42635int
42636main ()
42637{
42638#if BYTE_ORDER != BIG_ENDIAN
42639		 not big endian
42640		#endif
42641
42642  ;
42643  return 0;
42644}
42645_ACEOF
42646if ac_fn_cxx_try_compile "$LINENO"; then :
42647  ac_cv_c_bigendian=yes
42648else
42649  ac_cv_c_bigendian=no
42650fi
42651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42652fi
42653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42654    fi
42655    if test $ac_cv_c_bigendian = unknown; then
42656      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42657      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42658/* end confdefs.h.  */
42659#include <limits.h>
42660
42661int
42662main ()
42663{
42664#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42665	      bogus endian macros
42666	     #endif
42667
42668  ;
42669  return 0;
42670}
42671_ACEOF
42672if ac_fn_cxx_try_compile "$LINENO"; then :
42673  # It does; now see whether it defined to _BIG_ENDIAN or not.
42674	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42675/* end confdefs.h.  */
42676#include <limits.h>
42677
42678int
42679main ()
42680{
42681#ifndef _BIG_ENDIAN
42682		 not big endian
42683		#endif
42684
42685  ;
42686  return 0;
42687}
42688_ACEOF
42689if ac_fn_cxx_try_compile "$LINENO"; then :
42690  ac_cv_c_bigendian=yes
42691else
42692  ac_cv_c_bigendian=no
42693fi
42694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42695fi
42696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42697    fi
42698    if test $ac_cv_c_bigendian = unknown; then
42699      # Compile a test program.
42700      if test "$cross_compiling" = yes; then :
42701  # Try to guess by grepping values from an object file.
42702	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42703/* end confdefs.h.  */
42704short int ascii_mm[] =
42705		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42706		short int ascii_ii[] =
42707		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42708		int use_ascii (int i) {
42709		  return ascii_mm[i] + ascii_ii[i];
42710		}
42711		short int ebcdic_ii[] =
42712		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42713		short int ebcdic_mm[] =
42714		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42715		int use_ebcdic (int i) {
42716		  return ebcdic_mm[i] + ebcdic_ii[i];
42717		}
42718		extern int foo;
42719
42720int
42721main ()
42722{
42723return use_ascii (foo) == use_ebcdic (foo);
42724  ;
42725  return 0;
42726}
42727_ACEOF
42728if ac_fn_cxx_try_compile "$LINENO"; then :
42729  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42730	      ac_cv_c_bigendian=yes
42731	    fi
42732	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42733	      if test "$ac_cv_c_bigendian" = unknown; then
42734		ac_cv_c_bigendian=no
42735	      else
42736		# finding both strings is unlikely to happen, but who knows?
42737		ac_cv_c_bigendian=unknown
42738	      fi
42739	    fi
42740fi
42741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42742else
42743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42744/* end confdefs.h.  */
42745$ac_includes_default
42746int
42747main ()
42748{
42749
42750	     /* Are we little or big endian?  From Harbison&Steele.  */
42751	     union
42752	     {
42753	       long int l;
42754	       char c[sizeof (long int)];
42755	     } u;
42756	     u.l = 1;
42757	     return u.c[sizeof (long int) - 1] == 1;
42758
42759  ;
42760  return 0;
42761}
42762_ACEOF
42763if ac_fn_cxx_try_run "$LINENO"; then :
42764  ac_cv_c_bigendian=no
42765else
42766  ac_cv_c_bigendian=yes
42767fi
42768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42769  conftest.$ac_objext conftest.beam conftest.$ac_ext
42770fi
42771
42772    fi
42773fi
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42775$as_echo "$ac_cv_c_bigendian" >&6; }
42776 case $ac_cv_c_bigendian in #(
42777   yes)
42778     ENDIAN="big";; #(
42779   no)
42780     ENDIAN="little" ;; #(
42781   universal)
42782     ENDIAN="universal_endianness"
42783     ;; #(
42784   *)
42785     ENDIAN="unknown" ;;
42786 esac
42787
42788
42789  if test "x$ENDIAN" = xuniversal_endianness; then
42790    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42791  fi
42792  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42793    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
42794  fi
42795
42796
42797# Configure flags for the tools
42798
42799  ###############################################################################
42800  #
42801  # How to compile shared libraries.
42802  #
42803
42804  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42805    PICFLAG="-fPIC"
42806    C_FLAG_REORDER=''
42807    CXX_FLAG_REORDER=''
42808
42809    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42810      # Linking is different on MacOSX
42811      if test "x$STATIC_BUILD" = xtrue; then
42812        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
42813      else
42814        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42815      fi
42816      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42817      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42818      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42819      SET_SHARED_LIBRARY_MAPFILE=''
42820    else
42821      # Default works for linux, might work on other platforms as well.
42822      SHARED_LIBRARY_FLAGS='-shared'
42823      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42824      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42825      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42826      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42827    fi
42828  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42829    PICFLAG=''
42830    C_FLAG_REORDER=''
42831    CXX_FLAG_REORDER=''
42832
42833    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42834      # Linking is different on MacOSX
42835      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42836      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42837      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42838      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42839      SET_SHARED_LIBRARY_MAPFILE=''
42840    else
42841      # Default works for linux, might work on other platforms as well.
42842      SHARED_LIBRARY_FLAGS='-shared'
42843      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42844      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42845      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42846      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42847    fi
42848  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42849    PICFLAG="-KPIC"
42850    C_FLAG_REORDER='-xF'
42851    CXX_FLAG_REORDER='-xF'
42852    SHARED_LIBRARY_FLAGS="-G"
42853    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42854    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42855    SET_SHARED_LIBRARY_NAME=''
42856    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42857  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42858    PICFLAG="-qpic=large"
42859    C_FLAG_REORDER=''
42860    CXX_FLAG_REORDER=''
42861    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42862    SET_EXECUTABLE_ORIGIN=""
42863    SET_SHARED_LIBRARY_ORIGIN=''
42864    SET_SHARED_LIBRARY_NAME=''
42865    SET_SHARED_LIBRARY_MAPFILE=''
42866  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42867    PICFLAG=""
42868    C_FLAG_REORDER=''
42869    CXX_FLAG_REORDER=''
42870    SHARED_LIBRARY_FLAGS="-LD"
42871    SET_EXECUTABLE_ORIGIN=''
42872    SET_SHARED_LIBRARY_ORIGIN=''
42873    SET_SHARED_LIBRARY_NAME=''
42874    SET_SHARED_LIBRARY_MAPFILE=''
42875  fi
42876
42877
42878
42879
42880
42881
42882
42883
42884  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42885    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42886    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42887    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42888  fi
42889  # The (cross) compiler is now configured, we can now test capabilities
42890  # of the target platform.
42891
42892
42893
42894  ###############################################################################
42895  #
42896  # Setup the opt flags for different compilers
42897  # and different operating systems.
42898  #
42899
42900  # FIXME: this was indirectly the old default, but just inherited.
42901  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42902  #   C_FLAG_DEPS="-MMD -MF"
42903  # fi
42904
42905  # Generate make dependency files
42906  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42907    C_FLAG_DEPS="-MMD -MF"
42908  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42909    C_FLAG_DEPS="-MMD -MF"
42910  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42911    C_FLAG_DEPS="-xMMD -xMF"
42912  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42913    C_FLAG_DEPS="-qmakedep=gcc -MF"
42914  fi
42915  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42916
42917
42918
42919  # Debug symbols
42920  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42921    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42922      # reduce from default "-g2" option to save space
42923      CFLAGS_DEBUG_SYMBOLS="-g1"
42924      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42925    else
42926      CFLAGS_DEBUG_SYMBOLS="-g"
42927      CXXFLAGS_DEBUG_SYMBOLS="-g"
42928    fi
42929  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42930    CFLAGS_DEBUG_SYMBOLS="-g"
42931    CXXFLAGS_DEBUG_SYMBOLS="-g"
42932  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42933    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42934    # FIXME: likely a bug, this disables debug symbols rather than enables them
42935    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42936  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42937    CFLAGS_DEBUG_SYMBOLS="-g"
42938    CXXFLAGS_DEBUG_SYMBOLS="-g"
42939  fi
42940
42941
42942
42943  # bounds, memory and behavior checking options
42944  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42945    case $DEBUG_LEVEL in
42946    release )
42947      # no adjustment
42948      ;;
42949    fastdebug )
42950      # no adjustment
42951      ;;
42952    slowdebug )
42953      # Add runtime stack smashing and undefined behavior checks.
42954      # Not all versions of gcc support -fstack-protector
42955      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42956
42957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42958$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42959  supports=yes
42960
42961  saved_cflags="$CFLAGS"
42962  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42963  ac_ext=c
42964ac_cpp='$CPP $CPPFLAGS'
42965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42967ac_compiler_gnu=$ac_cv_c_compiler_gnu
42968
42969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42970/* end confdefs.h.  */
42971int i;
42972_ACEOF
42973if ac_fn_c_try_compile "$LINENO"; then :
42974
42975else
42976  supports=no
42977fi
42978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42979  ac_ext=cpp
42980ac_cpp='$CXXCPP $CPPFLAGS'
42981ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42982ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42983ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42984
42985  CFLAGS="$saved_cflags"
42986
42987  saved_cxxflags="$CXXFLAGS"
42988  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42989  ac_ext=cpp
42990ac_cpp='$CXXCPP $CPPFLAGS'
42991ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42992ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42993ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42994
42995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42996/* end confdefs.h.  */
42997int i;
42998_ACEOF
42999if ac_fn_cxx_try_compile "$LINENO"; then :
43000
43001else
43002  supports=no
43003fi
43004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43005  ac_ext=cpp
43006ac_cpp='$CXXCPP $CPPFLAGS'
43007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43010
43011  CXXFLAGS="$saved_cxxflags"
43012
43013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43014$as_echo "$supports" >&6; }
43015  if test "x$supports" = "xyes" ; then
43016    :
43017  else
43018    STACK_PROTECTOR_CFLAG=""
43019  fi
43020
43021
43022      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
43023      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
43024      ;;
43025    esac
43026  fi
43027
43028  # Optimization levels
43029  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43030    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
43031
43032    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
43033      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
43034      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
43035      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
43036      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
43037      C_O_FLAG_DEBUG="-xregs=no%frameptr"
43038      C_O_FLAG_NONE="-xregs=no%frameptr"
43039      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
43040      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
43041      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
43042      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
43043      CXX_O_FLAG_NONE="-xregs=no%frameptr"
43044      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43045        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
43046        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
43047      fi
43048    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43049      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
43050      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
43051      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
43052      C_O_FLAG_DEBUG=""
43053      C_O_FLAG_NONE=""
43054      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
43055      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
43056      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
43057      C_O_FLAG_DEBUG=""
43058      CXX_O_FLAG_NONE=""
43059    fi
43060  else
43061    # The remaining toolchains share opt flags between CC and CXX;
43062    # setup for C and duplicate afterwards.
43063    if test "x$TOOLCHAIN_TYPE" = xgcc; then
43064      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43065        # On MacOSX we optimize for size, something
43066        # we should do for all platforms?
43067        C_O_FLAG_HIGHEST="-Os"
43068        C_O_FLAG_HI="-Os"
43069        C_O_FLAG_NORM="-Os"
43070      else
43071        C_O_FLAG_HIGHEST="-O3"
43072        C_O_FLAG_HI="-O3"
43073        C_O_FLAG_NORM="-O2"
43074      fi
43075      C_O_FLAG_DEBUG="-O0"
43076      C_O_FLAG_NONE="-O0"
43077    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43078      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43079        # On MacOSX we optimize for size, something
43080        # we should do for all platforms?
43081        C_O_FLAG_HIGHEST="-Os"
43082        C_O_FLAG_HI="-Os"
43083        C_O_FLAG_NORM="-Os"
43084      else
43085        C_O_FLAG_HIGHEST="-O3"
43086        C_O_FLAG_HI="-O3"
43087        C_O_FLAG_NORM="-O2"
43088      fi
43089      C_O_FLAG_DEBUG="-O0"
43090      C_O_FLAG_NONE="-O0"
43091    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43092      C_O_FLAG_HIGHEST="-O3"
43093      C_O_FLAG_HI="-O3 -qstrict"
43094      C_O_FLAG_NORM="-O2"
43095      C_O_FLAG_DEBUG="-qnoopt"
43096      C_O_FLAG_NONE="-qnoop"
43097    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43098      C_O_FLAG_HIGHEST="-O2"
43099      C_O_FLAG_HI="-O1"
43100      C_O_FLAG_NORM="-O1"
43101      C_O_FLAG_DEBUG="-Od"
43102      C_O_FLAG_NONE="-Od"
43103    fi
43104    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
43105    CXX_O_FLAG_HI="$C_O_FLAG_HI"
43106    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
43107    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
43108    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
43109  fi
43110
43111  # Adjust optimization flags according to debug level.
43112  case $DEBUG_LEVEL in
43113    release )
43114      # no adjustment
43115      ;;
43116    fastdebug )
43117      # Not quite so much optimization
43118      C_O_FLAG_HI="$C_O_FLAG_NORM"
43119      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
43120      ;;
43121    slowdebug )
43122      # Disable optimization
43123      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
43124      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
43125      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
43126      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
43127      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
43128      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
43129      ;;
43130  esac
43131
43132
43133
43134
43135
43136
43137
43138
43139
43140
43141
43142
43143
43144  # Special extras...
43145  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43146    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43147      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43148      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43149    fi
43150    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43151    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43152  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43153    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43154    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43155  fi
43156
43157  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
43158  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
43159  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
43160
43161  ###############################################################################
43162  #
43163  # Now setup the CFLAGS and LDFLAGS for the JDK build.
43164  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
43165  #
43166
43167  # Setup compiler/platform specific flags into
43168  #    CFLAGS_JDK    - C Compiler flags
43169  #    CXXFLAGS_JDK  - C++ Compiler flags
43170  #    COMMON_CCXXFLAGS_JDK - common to C and C++
43171  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43172    if test "x$OPENJDK_TARGET_CPU" = xx86; then
43173      # Force compatibility with i586 on 32 bit intel platforms.
43174      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
43175    fi
43176    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
43177        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
43178    case $OPENJDK_TARGET_CPU_ARCH in
43179      arm )
43180        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43181        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43182        ;;
43183      ppc )
43184        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43185        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43186        ;;
43187      * )
43188        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
43189        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43190        ;;
43191    esac
43192  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43193    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
43194    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
43195      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
43196    fi
43197
43198    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
43199    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
43200  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43201    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43202    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43203  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43204    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
43205        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
43206        -DWIN32_LEAN_AND_MEAN \
43207        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
43208        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
43209        -DWIN32 -DIAL"
43210    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43211      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
43212    else
43213      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
43214    fi
43215    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
43216    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
43217    # studio.
43218    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
43219      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43220          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
43221    fi
43222  fi
43223
43224  ###############################################################################
43225
43226  # Adjust flags according to debug level.
43227  case $DEBUG_LEVEL in
43228    fastdebug | slowdebug )
43229      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
43230      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
43231      JAVAC_FLAGS="$JAVAC_FLAGS -g"
43232      ;;
43233    release )
43234      ;;
43235    * )
43236      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43237      ;;
43238  esac
43239
43240  # Setup LP64
43241  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
43242
43243  # Set some common defines. These works for all compilers, but assume
43244  # -D is universally accepted.
43245
43246  # Setup endianness
43247  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
43248    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
43249    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
43250    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
43251    #   Note: -Dmacro         is the same as    #define macro 1
43252    #         -Dmacro=        is the same as    #define macro
43253    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43254      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
43255    else
43256      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
43257    fi
43258  else
43259    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
43260    # are defined in the system?
43261    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43262      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
43263    else
43264      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
43265    fi
43266  fi
43267
43268  # Setup target OS define. Use OS target name but in upper case.
43269  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
43270  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
43271
43272  # Setup target CPU
43273  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
43274
43275  # Setup debug/release defines
43276  if test "x$DEBUG_LEVEL" = xrelease; then
43277    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
43278    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43279      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
43280    fi
43281  else
43282    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
43283  fi
43284
43285  # Setup release name
43286  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
43287
43288
43289  # Set some additional per-OS defines.
43290  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43291    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
43292  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43293    # FIXME: PPC64 should not be here.
43294    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
43295  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
43296    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
43297  fi
43298
43299  # Additional macosx handling
43300  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43301    # Setting these parameters makes it an error to link to macosx APIs that are
43302    # newer than the given OS version and makes the linked binaries compatible
43303    # even if built on a newer version of the OS.
43304    # The expected format is X.Y.Z
43305    MACOSX_VERSION_MIN=10.7.0
43306
43307
43308    # The macro takes the version with no dots, ex: 1070
43309    # Let the flags variables get resolved in make for easier override on make
43310    # command line.
43311    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43312    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43313  fi
43314
43315  # Setup some hard coded includes
43316  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43317      -I${JDK_TOPDIR}/src/java.base/share/native/include \
43318      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43319      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
43320      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
43321      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
43322
43323  # The shared libraries are compiled using the picflag.
43324  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43325  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43326
43327  # Executable flags
43328  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43329  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43330
43331
43332
43333
43334
43335
43336  # Flags for compiling test libraries
43337  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43338  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43339
43340  # Flags for compiling test executables
43341  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43342  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43343
43344
43345
43346
43347
43348
43349  # Setup LDFLAGS et al.
43350  #
43351
43352  # Now this is odd. The JDK native libraries have to link against libjvm.so
43353  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
43354  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
43355  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
43356  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
43357  # libraries will link to whatever is in memory. Yuck.
43358  #
43359  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
43360  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43361    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
43362    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43363      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
43364    fi
43365    # TODO: make -debug optional "--disable-full-debug-symbols"
43366    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
43367  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43368    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43369    # We have previously set HAS_GNU_HASH if this is the case
43370    if test -n "$HAS_GNU_HASH"; then
43371      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
43372    fi
43373    if test "x$OPENJDK_TARGET_OS" = xlinux; then
43374      # And since we now know that the linker is gnu, then add -z defs, to forbid
43375      # undefined symbols in object files.
43376      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
43377      case $DEBUG_LEVEL in
43378        release )
43379          # tell linker to optimize libraries.
43380          # Should this be supplied to the OSS linker as well?
43381          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
43382          ;;
43383        slowdebug )
43384          if test "x$HAS_LINKER_NOW" = "xtrue"; then
43385            # do relocations at load
43386            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
43387            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
43388          fi
43389          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43390            # mark relocations read only
43391            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43392            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43393          fi
43394          ;;
43395        fastdebug )
43396          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43397            # mark relocations read only
43398            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43399            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43400          fi
43401          ;;
43402        * )
43403          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43404          ;;
43405        esac
43406    fi
43407  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43408    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43409    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43410  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43411    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
43412  fi
43413
43414  # Customize LDFLAGS for executables
43415
43416  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43417
43418  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43419    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43420      LDFLAGS_STACK_SIZE=1048576
43421    else
43422      LDFLAGS_STACK_SIZE=327680
43423    fi
43424    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43425  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43426    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43427  fi
43428
43429  # Customize LDFLAGS for libs
43430  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43431
43432  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43433    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43434    LDFLAGS_JDKLIB_SUFFIX=""
43435  else
43436    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43437        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43438
43439    # On some platforms (mac) the linker warns about non existing -L dirs.
43440    # Add server first if available. Linking aginst client does not always produce the same results.
43441    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43442    # Default to server for other variants.
43443    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43444      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43445    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43446      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43447    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43448      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43449    else
43450      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43451    fi
43452
43453    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43454    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43455      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43456    fi
43457  fi
43458
43459
43460
43461
43462
43463
43464
43465  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
43466  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
43467  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
43468  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
43469
43470
43471
43472
43473
43474
43475
43476  # Some Zero and Shark settings.
43477  # ZERO_ARCHFLAG tells the compiler which mode to build for
43478  case "${OPENJDK_TARGET_CPU}" in
43479    s390)
43480      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43481      ;;
43482    *)
43483      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43484  esac
43485
43486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43487$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43488  supports=yes
43489
43490  saved_cflags="$CFLAGS"
43491  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43492  ac_ext=c
43493ac_cpp='$CPP $CPPFLAGS'
43494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43496ac_compiler_gnu=$ac_cv_c_compiler_gnu
43497
43498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43499/* end confdefs.h.  */
43500int i;
43501_ACEOF
43502if ac_fn_c_try_compile "$LINENO"; then :
43503
43504else
43505  supports=no
43506fi
43507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43508  ac_ext=cpp
43509ac_cpp='$CXXCPP $CPPFLAGS'
43510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43513
43514  CFLAGS="$saved_cflags"
43515
43516  saved_cxxflags="$CXXFLAGS"
43517  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43518  ac_ext=cpp
43519ac_cpp='$CXXCPP $CPPFLAGS'
43520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43523
43524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43525/* end confdefs.h.  */
43526int i;
43527_ACEOF
43528if ac_fn_cxx_try_compile "$LINENO"; then :
43529
43530else
43531  supports=no
43532fi
43533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43534  ac_ext=cpp
43535ac_cpp='$CXXCPP $CPPFLAGS'
43536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43539
43540  CXXFLAGS="$saved_cxxflags"
43541
43542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43543$as_echo "$supports" >&6; }
43544  if test "x$supports" = "xyes" ; then
43545    :
43546  else
43547    ZERO_ARCHFLAG=""
43548  fi
43549
43550
43551
43552  # Check that the compiler supports -mX (or -qX on AIX) flags
43553  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43554
43555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43556$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43557  supports=yes
43558
43559  saved_cflags="$CFLAGS"
43560  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43561  ac_ext=c
43562ac_cpp='$CPP $CPPFLAGS'
43563ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43564ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43565ac_compiler_gnu=$ac_cv_c_compiler_gnu
43566
43567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43568/* end confdefs.h.  */
43569int i;
43570_ACEOF
43571if ac_fn_c_try_compile "$LINENO"; then :
43572
43573else
43574  supports=no
43575fi
43576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43577  ac_ext=cpp
43578ac_cpp='$CXXCPP $CPPFLAGS'
43579ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43580ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43581ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43582
43583  CFLAGS="$saved_cflags"
43584
43585  saved_cxxflags="$CXXFLAGS"
43586  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43587  ac_ext=cpp
43588ac_cpp='$CXXCPP $CPPFLAGS'
43589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43592
43593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43594/* end confdefs.h.  */
43595int i;
43596_ACEOF
43597if ac_fn_cxx_try_compile "$LINENO"; then :
43598
43599else
43600  supports=no
43601fi
43602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43603  ac_ext=cpp
43604ac_cpp='$CXXCPP $CPPFLAGS'
43605ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43606ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43607ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43608
43609  CXXFLAGS="$saved_cxxflags"
43610
43611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43612$as_echo "$supports" >&6; }
43613  if test "x$supports" = "xyes" ; then
43614    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43615  else
43616    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43617  fi
43618
43619
43620
43621  # Check whether --enable-warnings-as-errors was given.
43622if test "${enable_warnings_as_errors+set}" = set; then :
43623  enableval=$enable_warnings_as_errors;
43624fi
43625
43626
43627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43628$as_echo_n "checking if native warnings are errors... " >&6; }
43629  if test "x$enable_warnings_as_errors" = "xyes"; then
43630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43631$as_echo "yes (explicitely set)" >&6; }
43632    WARNINGS_AS_ERRORS=true
43633  elif test "x$enable_warnings_as_errors" = "xno"; then
43634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43635$as_echo "no" >&6; }
43636    WARNINGS_AS_ERRORS=false
43637  elif test "x$enable_warnings_as_errors" = "x"; then
43638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43639$as_echo "yes (default)" >&6; }
43640    WARNINGS_AS_ERRORS=true
43641  else
43642    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43643  fi
43644
43645
43646  case "${TOOLCHAIN_TYPE}" in
43647    microsoft)
43648      DISABLE_WARNING_PREFIX="-wd"
43649      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43650      ;;
43651    solstudio)
43652      DISABLE_WARNING_PREFIX="-erroff="
43653      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43654      ;;
43655    gcc)
43656      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43657
43658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43659$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43660  supports=yes
43661
43662  saved_cflags="$CFLAGS"
43663  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43664  ac_ext=c
43665ac_cpp='$CPP $CPPFLAGS'
43666ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43667ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43668ac_compiler_gnu=$ac_cv_c_compiler_gnu
43669
43670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43671/* end confdefs.h.  */
43672int i;
43673_ACEOF
43674if ac_fn_c_try_compile "$LINENO"; then :
43675
43676else
43677  supports=no
43678fi
43679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43680  ac_ext=cpp
43681ac_cpp='$CXXCPP $CPPFLAGS'
43682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43685
43686  CFLAGS="$saved_cflags"
43687
43688  saved_cxxflags="$CXXFLAGS"
43689  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43690  ac_ext=cpp
43691ac_cpp='$CXXCPP $CPPFLAGS'
43692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43695
43696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43697/* end confdefs.h.  */
43698int i;
43699_ACEOF
43700if ac_fn_cxx_try_compile "$LINENO"; then :
43701
43702else
43703  supports=no
43704fi
43705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43706  ac_ext=cpp
43707ac_cpp='$CXXCPP $CPPFLAGS'
43708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43711
43712  CXXFLAGS="$saved_cxxflags"
43713
43714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43715$as_echo "$supports" >&6; }
43716  if test "x$supports" = "xyes" ; then
43717    GCC_CAN_DISABLE_WARNINGS=true
43718  else
43719    GCC_CAN_DISABLE_WARNINGS=false
43720
43721  fi
43722
43723      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43724        DISABLE_WARNING_PREFIX="-Wno-"
43725      else
43726        DISABLE_WARNING_PREFIX=
43727      fi
43728      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43729      ;;
43730    clang)
43731      DISABLE_WARNING_PREFIX="-Wno-"
43732      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43733      ;;
43734  esac
43735
43736
43737
43738
43739# Setup debug symbols (need objcopy from the toolchain for that)
43740
43741  #
43742  # ENABLE_DEBUG_SYMBOLS
43743  # This must be done after the toolchain is setup, since we're looking at objcopy.
43744  #
43745  # Check whether --enable-debug-symbols was given.
43746if test "${enable_debug_symbols+set}" = set; then :
43747  enableval=$enable_debug_symbols;
43748fi
43749
43750
43751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43752$as_echo_n "checking if we should generate debug symbols... " >&6; }
43753
43754  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43755    # explicit enabling of enable-debug-symbols and can't find objcopy
43756    #   this is an error
43757    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43758  fi
43759
43760  if test "x$enable_debug_symbols" = "xyes"; then
43761    ENABLE_DEBUG_SYMBOLS=true
43762  elif test "x$enable_debug_symbols" = "xno"; then
43763    ENABLE_DEBUG_SYMBOLS=false
43764  else
43765    # Default is on if objcopy is found
43766    if test "x$OBJCOPY" != x; then
43767      ENABLE_DEBUG_SYMBOLS=true
43768    # MacOS X and Windows don't use objcopy but default is on for those OSes
43769    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43770      ENABLE_DEBUG_SYMBOLS=true
43771    else
43772      ENABLE_DEBUG_SYMBOLS=false
43773    fi
43774  fi
43775
43776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43777$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43778
43779  #
43780  # ZIP_DEBUGINFO_FILES
43781  #
43782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43783$as_echo_n "checking if we should zip debug-info files... " >&6; }
43784  # Check whether --enable-zip-debug-info was given.
43785if test "${enable_zip_debug_info+set}" = set; then :
43786  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43787else
43788  enable_zip_debug_info="yes"
43789fi
43790
43791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43792$as_echo "${enable_zip_debug_info}" >&6; }
43793
43794  if test "x${enable_zip_debug_info}" = "xno"; then
43795    ZIP_DEBUGINFO_FILES=false
43796  else
43797    ZIP_DEBUGINFO_FILES=true
43798  fi
43799
43800
43801
43802
43803
43804  # Check whether --enable-native-coverage was given.
43805if test "${enable_native_coverage+set}" = set; then :
43806  enableval=$enable_native_coverage;
43807fi
43808
43809  GCOV_ENABLED="false"
43810  if test "x$enable_native_coverage" = "xyes"; then
43811    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43813$as_echo_n "checking if native coverage is enabled... " >&6; }
43814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43815$as_echo "yes" >&6; }
43816      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43817      GCOV_LDFLAGS="-fprofile-arcs"
43818      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43819      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43820      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43821      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43822      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43823      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43824      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43825      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43826      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43827      GCOV_ENABLED="true"
43828    else
43829      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43830    fi
43831  elif test "x$enable_native_coverage" = "xno"; then
43832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43833$as_echo_n "checking if native coverage is enabled... " >&6; }
43834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43835$as_echo "no" >&6; }
43836  elif test "x$enable_native_coverage" != "x"; then
43837    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43838  fi
43839
43840
43841
43842
43843###############################################################################
43844#
43845# Check dependencies for external and internal libraries.
43846#
43847###############################################################################
43848
43849# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43850
43851  # When using cygwin or msys, we need a wrapper binary that renames
43852  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43853  # @files and rewrites these too! This wrapper binary is
43854  # called fixpath.
43855  FIXPATH=
43856  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43858$as_echo_n "checking if fixpath can be created... " >&6; }
43859    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43860    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43861    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43862    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43863      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43864      FIXPATH="$FIXPATH_BIN -c"
43865    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43866      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43867      # @ was chosen as separator to minimize risk of other tools messing around with it
43868      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43869          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43870      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43871      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43872    fi
43873    FIXPATH_SRC_W="$FIXPATH_SRC"
43874    FIXPATH_BIN_W="$FIXPATH_BIN"
43875
43876  unix_path="$FIXPATH_SRC_W"
43877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43878    windows_path=`$CYGPATH -m "$unix_path"`
43879    FIXPATH_SRC_W="$windows_path"
43880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43881    windows_path=`cmd //c echo $unix_path`
43882    FIXPATH_SRC_W="$windows_path"
43883  fi
43884
43885
43886  unix_path="$FIXPATH_BIN_W"
43887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43888    windows_path=`$CYGPATH -m "$unix_path"`
43889    FIXPATH_BIN_W="$windows_path"
43890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43891    windows_path=`cmd //c echo $unix_path`
43892    FIXPATH_BIN_W="$windows_path"
43893  fi
43894
43895    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43896    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43897    cd $FIXPATH_DIR
43898    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43899    cd $CURDIR
43900
43901    if test ! -x $FIXPATH_BIN; then
43902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43903$as_echo "no" >&6; }
43904      cat $FIXPATH_DIR/fixpath1.log
43905      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43906    fi
43907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43908$as_echo "yes" >&6; }
43909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43910$as_echo_n "checking if fixpath.exe works... " >&6; }
43911    cd $FIXPATH_DIR
43912    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43913        > $FIXPATH_DIR/fixpath2.log 2>&1
43914    cd $CURDIR
43915    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43917$as_echo "no" >&6; }
43918      cat $FIXPATH_DIR/fixpath2.log
43919      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43920    fi
43921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43922$as_echo "yes" >&6; }
43923  fi
43924
43925
43926
43927
43928
43929  # Check if X11 is needed
43930  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
43931    # No X11 support on windows or macosx
43932    NEEDS_LIB_X11=false
43933  else
43934    if test "x$SUPPORT_HEADFUL" = xno; then
43935      # No X11 support if building headless-only
43936      NEEDS_LIB_X11=false
43937    else
43938      # All other instances need X11
43939      NEEDS_LIB_X11=true
43940    fi
43941  fi
43942
43943  # Check if cups is needed
43944  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43945    # Windows have a separate print system
43946    NEEDS_LIB_CUPS=false
43947  else
43948    NEEDS_LIB_CUPS=true
43949  fi
43950
43951  # Check if freetype is needed
43952  if test "x$OPENJDK" = "xtrue"; then
43953    NEEDS_LIB_FREETYPE=true
43954  else
43955    NEEDS_LIB_FREETYPE=false
43956  fi
43957
43958  # Check if alsa is needed
43959  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43960    NEEDS_LIB_ALSA=true
43961  else
43962    NEEDS_LIB_ALSA=false
43963  fi
43964
43965  # Check if ffi is needed
43966  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
43967    NEEDS_LIB_FFI=true
43968  else
43969    NEEDS_LIB_FFI=false
43970  fi
43971
43972
43973  # statically link libstdc++ before C++ ABI is stablized on Linux unless
43974  # dynamic build is configured on command line.
43975
43976# Check whether --with-stdc++lib was given.
43977if test "${with_stdc__lib+set}" = set; then :
43978  withval=$with_stdc__lib;
43979        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
43980                && test "x$with_stdc__lib" != xdefault; then
43981          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
43982        fi
43983
43984else
43985  with_stdc__lib=default
43986
43987fi
43988
43989
43990  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43991    # Test if -lstdc++ works.
43992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
43993$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
43994    ac_ext=cpp
43995ac_cpp='$CXXCPP $CPPFLAGS'
43996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43999
44000    OLD_CXXFLAGS="$CXXFLAGS"
44001    CXXFLAGS="$CXXFLAGS -lstdc++"
44002    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44003/* end confdefs.h.  */
44004
44005int
44006main ()
44007{
44008return 0;
44009  ;
44010  return 0;
44011}
44012_ACEOF
44013if ac_fn_cxx_try_link "$LINENO"; then :
44014  has_dynamic_libstdcxx=yes
44015else
44016  has_dynamic_libstdcxx=no
44017fi
44018rm -f core conftest.err conftest.$ac_objext \
44019    conftest$ac_exeext conftest.$ac_ext
44020    CXXFLAGS="$OLD_CXXFLAGS"
44021    ac_ext=cpp
44022ac_cpp='$CXXCPP $CPPFLAGS'
44023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44026
44027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
44028$as_echo "$has_dynamic_libstdcxx" >&6; }
44029
44030    # Test if stdc++ can be linked statically.
44031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
44032$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
44033    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
44034    ac_ext=cpp
44035ac_cpp='$CXXCPP $CPPFLAGS'
44036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44039
44040    OLD_LIBS="$LIBS"
44041    OLD_CXX="$CXX"
44042    LIBS="$STATIC_STDCXX_FLAGS"
44043    CXX="$CC"
44044    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44045/* end confdefs.h.  */
44046
44047int
44048main ()
44049{
44050return 0;
44051  ;
44052  return 0;
44053}
44054_ACEOF
44055if ac_fn_cxx_try_link "$LINENO"; then :
44056  has_static_libstdcxx=yes
44057else
44058  has_static_libstdcxx=no
44059fi
44060rm -f core conftest.err conftest.$ac_objext \
44061    conftest$ac_exeext conftest.$ac_ext
44062    LIBS="$OLD_LIBS"
44063    CXX="$OLD_CXX"
44064    ac_ext=cpp
44065ac_cpp='$CXXCPP $CPPFLAGS'
44066ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44067ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44068ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44069
44070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
44071$as_echo "$has_static_libstdcxx" >&6; }
44072
44073    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
44074      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
44075    fi
44076
44077    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
44078      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
44079    fi
44080
44081    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
44082      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
44083    fi
44084
44085    # If dynamic was requested, it's available since it would fail above otherwise.
44086    # If dynamic wasn't requested, go with static unless it isn't available.
44087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
44088$as_echo_n "checking how to link with libstdc++... " >&6; }
44089    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
44090      LIBCXX="$LIBCXX -lstdc++"
44091      LDCXX="$CXX"
44092      STATIC_CXX_SETTING="STATIC_CXX=false"
44093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
44094$as_echo "dynamic" >&6; }
44095    else
44096      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
44097      LDCXX="$CC"
44098      STATIC_CXX_SETTING="STATIC_CXX=true"
44099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
44100$as_echo "static" >&6; }
44101    fi
44102  fi
44103
44104
44105  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
44106  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
44107    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
44108  fi
44109
44110  # TODO better (platform agnostic) test
44111  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
44112    LIBCXX="-lstdc++"
44113  fi
44114
44115
44116  # Setup Windows runtime dlls
44117  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
44118
44119
44120# Check whether --with-msvcr-dll was given.
44121if test "${with_msvcr_dll+set}" = set; then :
44122  withval=$with_msvcr_dll;
44123fi
44124
44125
44126  if test "x$with_msvcr_dll" != x; then
44127    # If given explicitely by user, do not probe. If not present, fail directly.
44128
44129  DLL_NAME="$MSVCR_NAME"
44130  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
44131  METHOD="--with-msvcr-dll"
44132  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44134$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44135
44136    # Need to check if the found msvcr is correct architecture
44137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44138$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44139    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44141      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44142      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44143      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44144        CORRECT_MSVCR_ARCH="PE32 executable"
44145      else
44146        CORRECT_MSVCR_ARCH="PE32+ executable"
44147      fi
44148    else
44149      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44150        CORRECT_MSVCR_ARCH=386
44151      else
44152        CORRECT_MSVCR_ARCH=x86-64
44153      fi
44154    fi
44155    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44157$as_echo "ok" >&6; }
44158      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44159
44160  # Only process if variable expands to non-empty
44161
44162  if test "x$MSVC_DLL" != x; then
44163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44164
44165  # Input might be given as Windows format, start by converting to
44166  # unix format.
44167  path="$MSVC_DLL"
44168  new_path=`$CYGPATH -u "$path"`
44169
44170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44173  # "foo.exe" is OK but "foo" is an error.
44174  #
44175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44176  # It is also a way to make sure we got the proper file name for the real test later on.
44177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44178  if test "x$test_shortpath" = x; then
44179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44180$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44181    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44182  fi
44183
44184  # Call helper function which possibly converts this using DOS-style short mode.
44185  # If so, the updated path is stored in $new_path.
44186
44187  input_path="$new_path"
44188  # Check if we need to convert this using DOS-style short mode. If the path
44189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44190  # take no chances and rewrite it.
44191  # Note: m4 eats our [], so we need to use [ and ] instead.
44192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44193  if test "x$has_forbidden_chars" != x; then
44194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44198      # Going to short mode and back again did indeed matter. Since short mode is
44199      # case insensitive, let's make it lowercase to improve readability.
44200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44201      # Now convert it back to Unix-style (cygpath)
44202      input_path=`$CYGPATH -u "$shortmode_path"`
44203      new_path="$input_path"
44204    fi
44205  fi
44206
44207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44208  if test "x$test_cygdrive_prefix" = x; then
44209    # As a simple fix, exclude /usr/bin since it's not a real path.
44210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44212      # a path prefixed by /cygdrive for fixpath to work.
44213      new_path="$CYGWIN_ROOT_PATH$input_path"
44214    fi
44215  fi
44216
44217
44218  if test "x$path" != "x$new_path"; then
44219    MSVC_DLL="$new_path"
44220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44221$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44222  fi
44223
44224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44225
44226  path="$MSVC_DLL"
44227  has_colon=`$ECHO $path | $GREP ^.:`
44228  new_path="$path"
44229  if test "x$has_colon" = x; then
44230    # Not in mixed or Windows style, start by that.
44231    new_path=`cmd //c echo $path`
44232  fi
44233
44234
44235  input_path="$new_path"
44236  # Check if we need to convert this using DOS-style short mode. If the path
44237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44238  # take no chances and rewrite it.
44239  # Note: m4 eats our [], so we need to use [ and ] instead.
44240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44241  if test "x$has_forbidden_chars" != x; then
44242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44244  fi
44245
44246
44247  windows_path="$new_path"
44248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44249    unix_path=`$CYGPATH -u "$windows_path"`
44250    new_path="$unix_path"
44251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44253    new_path="$unix_path"
44254  fi
44255
44256  if test "x$path" != "x$new_path"; then
44257    MSVC_DLL="$new_path"
44258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44259$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44260  fi
44261
44262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44264
44265    else
44266      # We're on a unix platform. Hooray! :)
44267      path="$MSVC_DLL"
44268      has_space=`$ECHO "$path" | $GREP " "`
44269      if test "x$has_space" != x; then
44270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44271$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44273      fi
44274
44275      # Use eval to expand a potential ~
44276      eval path="$path"
44277      if test ! -f "$path" && test ! -d "$path"; then
44278        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44279      fi
44280
44281      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44282    fi
44283  fi
44284
44285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44286$as_echo_n "checking for $DLL_NAME... " >&6; }
44287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44288$as_echo "$MSVC_DLL" >&6; }
44289    else
44290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44291$as_echo "incorrect, ignoring" >&6; }
44292      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44293$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44294    fi
44295  fi
44296
44297    if test "x$MSVC_DLL" = x; then
44298      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
44299    fi
44300    MSVCR_DLL="$MSVC_DLL"
44301  elif test "x$DEVKIT_MSVCR_DLL" != x; then
44302
44303  DLL_NAME="$MSVCR_NAME"
44304  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
44305  METHOD="devkit"
44306  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44307    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44308$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44309
44310    # Need to check if the found msvcr is correct architecture
44311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44312$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44313    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44315      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44316      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44317      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44318        CORRECT_MSVCR_ARCH="PE32 executable"
44319      else
44320        CORRECT_MSVCR_ARCH="PE32+ executable"
44321      fi
44322    else
44323      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44324        CORRECT_MSVCR_ARCH=386
44325      else
44326        CORRECT_MSVCR_ARCH=x86-64
44327      fi
44328    fi
44329    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44331$as_echo "ok" >&6; }
44332      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44333
44334  # Only process if variable expands to non-empty
44335
44336  if test "x$MSVC_DLL" != x; then
44337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44338
44339  # Input might be given as Windows format, start by converting to
44340  # unix format.
44341  path="$MSVC_DLL"
44342  new_path=`$CYGPATH -u "$path"`
44343
44344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44347  # "foo.exe" is OK but "foo" is an error.
44348  #
44349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44350  # It is also a way to make sure we got the proper file name for the real test later on.
44351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44352  if test "x$test_shortpath" = x; then
44353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44354$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44355    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44356  fi
44357
44358  # Call helper function which possibly converts this using DOS-style short mode.
44359  # If so, the updated path is stored in $new_path.
44360
44361  input_path="$new_path"
44362  # Check if we need to convert this using DOS-style short mode. If the path
44363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44364  # take no chances and rewrite it.
44365  # Note: m4 eats our [], so we need to use [ and ] instead.
44366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44367  if test "x$has_forbidden_chars" != x; then
44368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44372      # Going to short mode and back again did indeed matter. Since short mode is
44373      # case insensitive, let's make it lowercase to improve readability.
44374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44375      # Now convert it back to Unix-style (cygpath)
44376      input_path=`$CYGPATH -u "$shortmode_path"`
44377      new_path="$input_path"
44378    fi
44379  fi
44380
44381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44382  if test "x$test_cygdrive_prefix" = x; then
44383    # As a simple fix, exclude /usr/bin since it's not a real path.
44384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44386      # a path prefixed by /cygdrive for fixpath to work.
44387      new_path="$CYGWIN_ROOT_PATH$input_path"
44388    fi
44389  fi
44390
44391
44392  if test "x$path" != "x$new_path"; then
44393    MSVC_DLL="$new_path"
44394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44395$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44396  fi
44397
44398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44399
44400  path="$MSVC_DLL"
44401  has_colon=`$ECHO $path | $GREP ^.:`
44402  new_path="$path"
44403  if test "x$has_colon" = x; then
44404    # Not in mixed or Windows style, start by that.
44405    new_path=`cmd //c echo $path`
44406  fi
44407
44408
44409  input_path="$new_path"
44410  # Check if we need to convert this using DOS-style short mode. If the path
44411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44412  # take no chances and rewrite it.
44413  # Note: m4 eats our [], so we need to use [ and ] instead.
44414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44415  if test "x$has_forbidden_chars" != x; then
44416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44418  fi
44419
44420
44421  windows_path="$new_path"
44422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44423    unix_path=`$CYGPATH -u "$windows_path"`
44424    new_path="$unix_path"
44425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44427    new_path="$unix_path"
44428  fi
44429
44430  if test "x$path" != "x$new_path"; then
44431    MSVC_DLL="$new_path"
44432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44433$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44434  fi
44435
44436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44438
44439    else
44440      # We're on a unix platform. Hooray! :)
44441      path="$MSVC_DLL"
44442      has_space=`$ECHO "$path" | $GREP " "`
44443      if test "x$has_space" != x; then
44444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44445$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44447      fi
44448
44449      # Use eval to expand a potential ~
44450      eval path="$path"
44451      if test ! -f "$path" && test ! -d "$path"; then
44452        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44453      fi
44454
44455      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44456    fi
44457  fi
44458
44459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44460$as_echo_n "checking for $DLL_NAME... " >&6; }
44461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44462$as_echo "$MSVC_DLL" >&6; }
44463    else
44464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44465$as_echo "incorrect, ignoring" >&6; }
44466      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44467$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44468    fi
44469  fi
44470
44471    if test "x$MSVC_DLL" = x; then
44472      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
44473    fi
44474    MSVCR_DLL="$MSVC_DLL"
44475  else
44476
44477  DLL_NAME="${MSVCR_NAME}"
44478  MSVC_DLL=
44479
44480  if test "x$MSVC_DLL" = x; then
44481    # Probe: Using well-known location from Visual Studio 10.0
44482    if test "x$VCINSTALLDIR" != x; then
44483      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
44484
44485  windows_path="$CYGWIN_VC_INSTALL_DIR"
44486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44487    unix_path=`$CYGPATH -u "$windows_path"`
44488    CYGWIN_VC_INSTALL_DIR="$unix_path"
44489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44491    CYGWIN_VC_INSTALL_DIR="$unix_path"
44492  fi
44493
44494      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44495        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44496      else
44497        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44498      fi
44499      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
44500
44501  DLL_NAME="$DLL_NAME"
44502  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44503  METHOD="well-known location in VCINSTALLDIR"
44504  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44505    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44506$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44507
44508    # Need to check if the found msvcr is correct architecture
44509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44510$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44511    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44513      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44514      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44515      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44516        CORRECT_MSVCR_ARCH="PE32 executable"
44517      else
44518        CORRECT_MSVCR_ARCH="PE32+ executable"
44519      fi
44520    else
44521      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44522        CORRECT_MSVCR_ARCH=386
44523      else
44524        CORRECT_MSVCR_ARCH=x86-64
44525      fi
44526    fi
44527    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44529$as_echo "ok" >&6; }
44530      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44531
44532  # Only process if variable expands to non-empty
44533
44534  if test "x$MSVC_DLL" != x; then
44535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44536
44537  # Input might be given as Windows format, start by converting to
44538  # unix format.
44539  path="$MSVC_DLL"
44540  new_path=`$CYGPATH -u "$path"`
44541
44542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44545  # "foo.exe" is OK but "foo" is an error.
44546  #
44547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44548  # It is also a way to make sure we got the proper file name for the real test later on.
44549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44550  if test "x$test_shortpath" = x; then
44551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44552$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44553    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44554  fi
44555
44556  # Call helper function which possibly converts this using DOS-style short mode.
44557  # If so, the updated path is stored in $new_path.
44558
44559  input_path="$new_path"
44560  # Check if we need to convert this using DOS-style short mode. If the path
44561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44562  # take no chances and rewrite it.
44563  # Note: m4 eats our [], so we need to use [ and ] instead.
44564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44565  if test "x$has_forbidden_chars" != x; then
44566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44570      # Going to short mode and back again did indeed matter. Since short mode is
44571      # case insensitive, let's make it lowercase to improve readability.
44572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44573      # Now convert it back to Unix-style (cygpath)
44574      input_path=`$CYGPATH -u "$shortmode_path"`
44575      new_path="$input_path"
44576    fi
44577  fi
44578
44579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44580  if test "x$test_cygdrive_prefix" = x; then
44581    # As a simple fix, exclude /usr/bin since it's not a real path.
44582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44584      # a path prefixed by /cygdrive for fixpath to work.
44585      new_path="$CYGWIN_ROOT_PATH$input_path"
44586    fi
44587  fi
44588
44589
44590  if test "x$path" != "x$new_path"; then
44591    MSVC_DLL="$new_path"
44592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44593$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44594  fi
44595
44596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44597
44598  path="$MSVC_DLL"
44599  has_colon=`$ECHO $path | $GREP ^.:`
44600  new_path="$path"
44601  if test "x$has_colon" = x; then
44602    # Not in mixed or Windows style, start by that.
44603    new_path=`cmd //c echo $path`
44604  fi
44605
44606
44607  input_path="$new_path"
44608  # Check if we need to convert this using DOS-style short mode. If the path
44609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44610  # take no chances and rewrite it.
44611  # Note: m4 eats our [], so we need to use [ and ] instead.
44612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44613  if test "x$has_forbidden_chars" != x; then
44614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44616  fi
44617
44618
44619  windows_path="$new_path"
44620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44621    unix_path=`$CYGPATH -u "$windows_path"`
44622    new_path="$unix_path"
44623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44625    new_path="$unix_path"
44626  fi
44627
44628  if test "x$path" != "x$new_path"; then
44629    MSVC_DLL="$new_path"
44630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44631$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44632  fi
44633
44634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44636
44637    else
44638      # We're on a unix platform. Hooray! :)
44639      path="$MSVC_DLL"
44640      has_space=`$ECHO "$path" | $GREP " "`
44641      if test "x$has_space" != x; then
44642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44643$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44645      fi
44646
44647      # Use eval to expand a potential ~
44648      eval path="$path"
44649      if test ! -f "$path" && test ! -d "$path"; then
44650        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44651      fi
44652
44653      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44654    fi
44655  fi
44656
44657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44658$as_echo_n "checking for $DLL_NAME... " >&6; }
44659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44660$as_echo "$MSVC_DLL" >&6; }
44661    else
44662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44663$as_echo "incorrect, ignoring" >&6; }
44664      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44665$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44666    fi
44667  fi
44668
44669    fi
44670  fi
44671
44672  if test "x$MSVC_DLL" = x; then
44673    # Probe: Check in the Boot JDK directory.
44674    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
44675
44676  DLL_NAME="$DLL_NAME"
44677  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44678  METHOD="well-known location in Boot JDK"
44679  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44681$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44682
44683    # Need to check if the found msvcr is correct architecture
44684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44685$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44686    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44688      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44689      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44691        CORRECT_MSVCR_ARCH="PE32 executable"
44692      else
44693        CORRECT_MSVCR_ARCH="PE32+ executable"
44694      fi
44695    else
44696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44697        CORRECT_MSVCR_ARCH=386
44698      else
44699        CORRECT_MSVCR_ARCH=x86-64
44700      fi
44701    fi
44702    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44704$as_echo "ok" >&6; }
44705      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44706
44707  # Only process if variable expands to non-empty
44708
44709  if test "x$MSVC_DLL" != x; then
44710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44711
44712  # Input might be given as Windows format, start by converting to
44713  # unix format.
44714  path="$MSVC_DLL"
44715  new_path=`$CYGPATH -u "$path"`
44716
44717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44720  # "foo.exe" is OK but "foo" is an error.
44721  #
44722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44723  # It is also a way to make sure we got the proper file name for the real test later on.
44724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44725  if test "x$test_shortpath" = x; then
44726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44727$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44728    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44729  fi
44730
44731  # Call helper function which possibly converts this using DOS-style short mode.
44732  # If so, the updated path is stored in $new_path.
44733
44734  input_path="$new_path"
44735  # Check if we need to convert this using DOS-style short mode. If the path
44736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44737  # take no chances and rewrite it.
44738  # Note: m4 eats our [], so we need to use [ and ] instead.
44739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44740  if test "x$has_forbidden_chars" != x; then
44741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44745      # Going to short mode and back again did indeed matter. Since short mode is
44746      # case insensitive, let's make it lowercase to improve readability.
44747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44748      # Now convert it back to Unix-style (cygpath)
44749      input_path=`$CYGPATH -u "$shortmode_path"`
44750      new_path="$input_path"
44751    fi
44752  fi
44753
44754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44755  if test "x$test_cygdrive_prefix" = x; then
44756    # As a simple fix, exclude /usr/bin since it's not a real path.
44757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44759      # a path prefixed by /cygdrive for fixpath to work.
44760      new_path="$CYGWIN_ROOT_PATH$input_path"
44761    fi
44762  fi
44763
44764
44765  if test "x$path" != "x$new_path"; then
44766    MSVC_DLL="$new_path"
44767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44768$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44769  fi
44770
44771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44772
44773  path="$MSVC_DLL"
44774  has_colon=`$ECHO $path | $GREP ^.:`
44775  new_path="$path"
44776  if test "x$has_colon" = x; then
44777    # Not in mixed or Windows style, start by that.
44778    new_path=`cmd //c echo $path`
44779  fi
44780
44781
44782  input_path="$new_path"
44783  # Check if we need to convert this using DOS-style short mode. If the path
44784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44785  # take no chances and rewrite it.
44786  # Note: m4 eats our [], so we need to use [ and ] instead.
44787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44788  if test "x$has_forbidden_chars" != x; then
44789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44791  fi
44792
44793
44794  windows_path="$new_path"
44795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44796    unix_path=`$CYGPATH -u "$windows_path"`
44797    new_path="$unix_path"
44798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44800    new_path="$unix_path"
44801  fi
44802
44803  if test "x$path" != "x$new_path"; then
44804    MSVC_DLL="$new_path"
44805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44806$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44807  fi
44808
44809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44811
44812    else
44813      # We're on a unix platform. Hooray! :)
44814      path="$MSVC_DLL"
44815      has_space=`$ECHO "$path" | $GREP " "`
44816      if test "x$has_space" != x; then
44817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44818$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44820      fi
44821
44822      # Use eval to expand a potential ~
44823      eval path="$path"
44824      if test ! -f "$path" && test ! -d "$path"; then
44825        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44826      fi
44827
44828      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44829    fi
44830  fi
44831
44832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44833$as_echo_n "checking for $DLL_NAME... " >&6; }
44834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44835$as_echo "$MSVC_DLL" >&6; }
44836    else
44837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44838$as_echo "incorrect, ignoring" >&6; }
44839      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44840$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44841    fi
44842  fi
44843
44844  fi
44845
44846  if test "x$MSVC_DLL" = x; then
44847    # Probe: Look in the Windows system32 directory
44848    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
44849
44850  windows_path="$CYGWIN_SYSTEMROOT"
44851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44852    unix_path=`$CYGPATH -u "$windows_path"`
44853    CYGWIN_SYSTEMROOT="$unix_path"
44854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44856    CYGWIN_SYSTEMROOT="$unix_path"
44857  fi
44858
44859    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
44860
44861  DLL_NAME="$DLL_NAME"
44862  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44863  METHOD="well-known location in SYSTEMROOT"
44864  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44866$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44867
44868    # Need to check if the found msvcr is correct architecture
44869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44870$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44871    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44873      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44874      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44876        CORRECT_MSVCR_ARCH="PE32 executable"
44877      else
44878        CORRECT_MSVCR_ARCH="PE32+ executable"
44879      fi
44880    else
44881      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44882        CORRECT_MSVCR_ARCH=386
44883      else
44884        CORRECT_MSVCR_ARCH=x86-64
44885      fi
44886    fi
44887    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44889$as_echo "ok" >&6; }
44890      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44891
44892  # Only process if variable expands to non-empty
44893
44894  if test "x$MSVC_DLL" != x; then
44895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44896
44897  # Input might be given as Windows format, start by converting to
44898  # unix format.
44899  path="$MSVC_DLL"
44900  new_path=`$CYGPATH -u "$path"`
44901
44902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44905  # "foo.exe" is OK but "foo" is an error.
44906  #
44907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44908  # It is also a way to make sure we got the proper file name for the real test later on.
44909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44910  if test "x$test_shortpath" = x; then
44911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44912$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44913    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44914  fi
44915
44916  # Call helper function which possibly converts this using DOS-style short mode.
44917  # If so, the updated path is stored in $new_path.
44918
44919  input_path="$new_path"
44920  # Check if we need to convert this using DOS-style short mode. If the path
44921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44922  # take no chances and rewrite it.
44923  # Note: m4 eats our [], so we need to use [ and ] instead.
44924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44925  if test "x$has_forbidden_chars" != x; then
44926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44930      # Going to short mode and back again did indeed matter. Since short mode is
44931      # case insensitive, let's make it lowercase to improve readability.
44932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44933      # Now convert it back to Unix-style (cygpath)
44934      input_path=`$CYGPATH -u "$shortmode_path"`
44935      new_path="$input_path"
44936    fi
44937  fi
44938
44939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44940  if test "x$test_cygdrive_prefix" = x; then
44941    # As a simple fix, exclude /usr/bin since it's not a real path.
44942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44944      # a path prefixed by /cygdrive for fixpath to work.
44945      new_path="$CYGWIN_ROOT_PATH$input_path"
44946    fi
44947  fi
44948
44949
44950  if test "x$path" != "x$new_path"; then
44951    MSVC_DLL="$new_path"
44952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44953$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44954  fi
44955
44956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44957
44958  path="$MSVC_DLL"
44959  has_colon=`$ECHO $path | $GREP ^.:`
44960  new_path="$path"
44961  if test "x$has_colon" = x; then
44962    # Not in mixed or Windows style, start by that.
44963    new_path=`cmd //c echo $path`
44964  fi
44965
44966
44967  input_path="$new_path"
44968  # Check if we need to convert this using DOS-style short mode. If the path
44969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44970  # take no chances and rewrite it.
44971  # Note: m4 eats our [], so we need to use [ and ] instead.
44972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44973  if test "x$has_forbidden_chars" != x; then
44974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44976  fi
44977
44978
44979  windows_path="$new_path"
44980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44981    unix_path=`$CYGPATH -u "$windows_path"`
44982    new_path="$unix_path"
44983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44985    new_path="$unix_path"
44986  fi
44987
44988  if test "x$path" != "x$new_path"; then
44989    MSVC_DLL="$new_path"
44990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44991$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44992  fi
44993
44994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44996
44997    else
44998      # We're on a unix platform. Hooray! :)
44999      path="$MSVC_DLL"
45000      has_space=`$ECHO "$path" | $GREP " "`
45001      if test "x$has_space" != x; then
45002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45003$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45005      fi
45006
45007      # Use eval to expand a potential ~
45008      eval path="$path"
45009      if test ! -f "$path" && test ! -d "$path"; then
45010        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45011      fi
45012
45013      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45014    fi
45015  fi
45016
45017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45018$as_echo_n "checking for $DLL_NAME... " >&6; }
45019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45020$as_echo "$MSVC_DLL" >&6; }
45021    else
45022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45023$as_echo "incorrect, ignoring" >&6; }
45024      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45025$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45026    fi
45027  fi
45028
45029  fi
45030
45031  if test "x$MSVC_DLL" = x; then
45032    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
45033    if test "x$VS100COMNTOOLS" != x; then
45034      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
45035
45036  windows_path="$CYGWIN_VS_TOOLS_DIR"
45037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45038    unix_path=`$CYGPATH -u "$windows_path"`
45039    CYGWIN_VS_TOOLS_DIR="$unix_path"
45040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45042    CYGWIN_VS_TOOLS_DIR="$unix_path"
45043  fi
45044
45045      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45046        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
45047	    | $GREP -i /x64/ | $HEAD --lines 1`
45048      else
45049        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
45050	    | $GREP -i /x86/ | $HEAD --lines 1`
45051      fi
45052
45053  DLL_NAME="$DLL_NAME"
45054  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45055  METHOD="search of VS100COMNTOOLS"
45056  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45058$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45059
45060    # Need to check if the found msvcr is correct architecture
45061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45062$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45063    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45065      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45066      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45068        CORRECT_MSVCR_ARCH="PE32 executable"
45069      else
45070        CORRECT_MSVCR_ARCH="PE32+ executable"
45071      fi
45072    else
45073      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45074        CORRECT_MSVCR_ARCH=386
45075      else
45076        CORRECT_MSVCR_ARCH=x86-64
45077      fi
45078    fi
45079    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45081$as_echo "ok" >&6; }
45082      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45083
45084  # Only process if variable expands to non-empty
45085
45086  if test "x$MSVC_DLL" != x; then
45087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45088
45089  # Input might be given as Windows format, start by converting to
45090  # unix format.
45091  path="$MSVC_DLL"
45092  new_path=`$CYGPATH -u "$path"`
45093
45094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45097  # "foo.exe" is OK but "foo" is an error.
45098  #
45099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45100  # It is also a way to make sure we got the proper file name for the real test later on.
45101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45102  if test "x$test_shortpath" = x; then
45103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45104$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45105    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45106  fi
45107
45108  # Call helper function which possibly converts this using DOS-style short mode.
45109  # If so, the updated path is stored in $new_path.
45110
45111  input_path="$new_path"
45112  # Check if we need to convert this using DOS-style short mode. If the path
45113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45114  # take no chances and rewrite it.
45115  # Note: m4 eats our [], so we need to use [ and ] instead.
45116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45117  if test "x$has_forbidden_chars" != x; then
45118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45122      # Going to short mode and back again did indeed matter. Since short mode is
45123      # case insensitive, let's make it lowercase to improve readability.
45124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45125      # Now convert it back to Unix-style (cygpath)
45126      input_path=`$CYGPATH -u "$shortmode_path"`
45127      new_path="$input_path"
45128    fi
45129  fi
45130
45131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45132  if test "x$test_cygdrive_prefix" = x; then
45133    # As a simple fix, exclude /usr/bin since it's not a real path.
45134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45136      # a path prefixed by /cygdrive for fixpath to work.
45137      new_path="$CYGWIN_ROOT_PATH$input_path"
45138    fi
45139  fi
45140
45141
45142  if test "x$path" != "x$new_path"; then
45143    MSVC_DLL="$new_path"
45144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45145$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45146  fi
45147
45148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45149
45150  path="$MSVC_DLL"
45151  has_colon=`$ECHO $path | $GREP ^.:`
45152  new_path="$path"
45153  if test "x$has_colon" = x; then
45154    # Not in mixed or Windows style, start by that.
45155    new_path=`cmd //c echo $path`
45156  fi
45157
45158
45159  input_path="$new_path"
45160  # Check if we need to convert this using DOS-style short mode. If the path
45161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45162  # take no chances and rewrite it.
45163  # Note: m4 eats our [], so we need to use [ and ] instead.
45164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45165  if test "x$has_forbidden_chars" != x; then
45166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45168  fi
45169
45170
45171  windows_path="$new_path"
45172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45173    unix_path=`$CYGPATH -u "$windows_path"`
45174    new_path="$unix_path"
45175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45177    new_path="$unix_path"
45178  fi
45179
45180  if test "x$path" != "x$new_path"; then
45181    MSVC_DLL="$new_path"
45182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45183$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45184  fi
45185
45186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45188
45189    else
45190      # We're on a unix platform. Hooray! :)
45191      path="$MSVC_DLL"
45192      has_space=`$ECHO "$path" | $GREP " "`
45193      if test "x$has_space" != x; then
45194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45195$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45197      fi
45198
45199      # Use eval to expand a potential ~
45200      eval path="$path"
45201      if test ! -f "$path" && test ! -d "$path"; then
45202        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45203      fi
45204
45205      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45206    fi
45207  fi
45208
45209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45210$as_echo_n "checking for $DLL_NAME... " >&6; }
45211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45212$as_echo "$MSVC_DLL" >&6; }
45213    else
45214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45215$as_echo "incorrect, ignoring" >&6; }
45216      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45217$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45218    fi
45219  fi
45220
45221    fi
45222  fi
45223
45224  if test "x$MSVC_DLL" = x; then
45225    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
45226    # (This was the original behaviour; kept since it might turn something up)
45227    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
45228      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45229        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45230	    | $GREP x64 | $HEAD --lines 1`
45231      else
45232        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45233	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
45234        if test "x$POSSIBLE_MSVC_DLL" = x; then
45235          # We're grasping at straws now...
45236          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45237	      | $HEAD --lines 1`
45238        fi
45239      fi
45240
45241
45242  DLL_NAME="$DLL_NAME"
45243  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45244  METHOD="search of VCINSTALLDIR"
45245  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45246    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45247$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45248
45249    # Need to check if the found msvcr is correct architecture
45250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45251$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45252    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45254      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45255      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45256      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45257        CORRECT_MSVCR_ARCH="PE32 executable"
45258      else
45259        CORRECT_MSVCR_ARCH="PE32+ executable"
45260      fi
45261    else
45262      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45263        CORRECT_MSVCR_ARCH=386
45264      else
45265        CORRECT_MSVCR_ARCH=x86-64
45266      fi
45267    fi
45268    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45270$as_echo "ok" >&6; }
45271      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45272
45273  # Only process if variable expands to non-empty
45274
45275  if test "x$MSVC_DLL" != x; then
45276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45277
45278  # Input might be given as Windows format, start by converting to
45279  # unix format.
45280  path="$MSVC_DLL"
45281  new_path=`$CYGPATH -u "$path"`
45282
45283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45286  # "foo.exe" is OK but "foo" is an error.
45287  #
45288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45289  # It is also a way to make sure we got the proper file name for the real test later on.
45290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45291  if test "x$test_shortpath" = x; then
45292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45293$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45294    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45295  fi
45296
45297  # Call helper function which possibly converts this using DOS-style short mode.
45298  # If so, the updated path is stored in $new_path.
45299
45300  input_path="$new_path"
45301  # Check if we need to convert this using DOS-style short mode. If the path
45302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45303  # take no chances and rewrite it.
45304  # Note: m4 eats our [], so we need to use [ and ] instead.
45305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45306  if test "x$has_forbidden_chars" != x; then
45307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45311      # Going to short mode and back again did indeed matter. Since short mode is
45312      # case insensitive, let's make it lowercase to improve readability.
45313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45314      # Now convert it back to Unix-style (cygpath)
45315      input_path=`$CYGPATH -u "$shortmode_path"`
45316      new_path="$input_path"
45317    fi
45318  fi
45319
45320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45321  if test "x$test_cygdrive_prefix" = x; then
45322    # As a simple fix, exclude /usr/bin since it's not a real path.
45323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45325      # a path prefixed by /cygdrive for fixpath to work.
45326      new_path="$CYGWIN_ROOT_PATH$input_path"
45327    fi
45328  fi
45329
45330
45331  if test "x$path" != "x$new_path"; then
45332    MSVC_DLL="$new_path"
45333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45334$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45335  fi
45336
45337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45338
45339  path="$MSVC_DLL"
45340  has_colon=`$ECHO $path | $GREP ^.:`
45341  new_path="$path"
45342  if test "x$has_colon" = x; then
45343    # Not in mixed or Windows style, start by that.
45344    new_path=`cmd //c echo $path`
45345  fi
45346
45347
45348  input_path="$new_path"
45349  # Check if we need to convert this using DOS-style short mode. If the path
45350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45351  # take no chances and rewrite it.
45352  # Note: m4 eats our [], so we need to use [ and ] instead.
45353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45354  if test "x$has_forbidden_chars" != x; then
45355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45357  fi
45358
45359
45360  windows_path="$new_path"
45361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45362    unix_path=`$CYGPATH -u "$windows_path"`
45363    new_path="$unix_path"
45364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45366    new_path="$unix_path"
45367  fi
45368
45369  if test "x$path" != "x$new_path"; then
45370    MSVC_DLL="$new_path"
45371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45372$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45373  fi
45374
45375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45377
45378    else
45379      # We're on a unix platform. Hooray! :)
45380      path="$MSVC_DLL"
45381      has_space=`$ECHO "$path" | $GREP " "`
45382      if test "x$has_space" != x; then
45383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45384$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45386      fi
45387
45388      # Use eval to expand a potential ~
45389      eval path="$path"
45390      if test ! -f "$path" && test ! -d "$path"; then
45391        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45392      fi
45393
45394      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45395    fi
45396  fi
45397
45398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45399$as_echo_n "checking for $DLL_NAME... " >&6; }
45400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45401$as_echo "$MSVC_DLL" >&6; }
45402    else
45403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45404$as_echo "incorrect, ignoring" >&6; }
45405      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45406$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45407    fi
45408  fi
45409
45410    fi
45411  fi
45412
45413  if test "x$MSVC_DLL" = x; then
45414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45415$as_echo_n "checking for $DLL_NAME... " >&6; }
45416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45417$as_echo "no" >&6; }
45418    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
45419  fi
45420
45421    MSVCR_DLL="$MSVC_DLL"
45422  fi
45423
45424
45425
45426# Check whether --with-msvcp-dll was given.
45427if test "${with_msvcp_dll+set}" = set; then :
45428  withval=$with_msvcp_dll;
45429fi
45430
45431
45432  if test "x$MSVCP_NAME" != "x"; then
45433    if test "x$with_msvcp_dll" != x; then
45434      # If given explicitely by user, do not probe. If not present, fail directly.
45435
45436  DLL_NAME="$MSVCP_NAME"
45437  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
45438  METHOD="--with-msvcp-dll"
45439  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45440    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45441$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45442
45443    # Need to check if the found msvcr is correct architecture
45444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45445$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45446    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45448      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45449      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45451        CORRECT_MSVCR_ARCH="PE32 executable"
45452      else
45453        CORRECT_MSVCR_ARCH="PE32+ executable"
45454      fi
45455    else
45456      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45457        CORRECT_MSVCR_ARCH=386
45458      else
45459        CORRECT_MSVCR_ARCH=x86-64
45460      fi
45461    fi
45462    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45464$as_echo "ok" >&6; }
45465      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45466
45467  # Only process if variable expands to non-empty
45468
45469  if test "x$MSVC_DLL" != x; then
45470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45471
45472  # Input might be given as Windows format, start by converting to
45473  # unix format.
45474  path="$MSVC_DLL"
45475  new_path=`$CYGPATH -u "$path"`
45476
45477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45480  # "foo.exe" is OK but "foo" is an error.
45481  #
45482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45483  # It is also a way to make sure we got the proper file name for the real test later on.
45484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45485  if test "x$test_shortpath" = x; then
45486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45488    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45489  fi
45490
45491  # Call helper function which possibly converts this using DOS-style short mode.
45492  # If so, the updated path is stored in $new_path.
45493
45494  input_path="$new_path"
45495  # Check if we need to convert this using DOS-style short mode. If the path
45496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45497  # take no chances and rewrite it.
45498  # Note: m4 eats our [], so we need to use [ and ] instead.
45499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45500  if test "x$has_forbidden_chars" != x; then
45501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45505      # Going to short mode and back again did indeed matter. Since short mode is
45506      # case insensitive, let's make it lowercase to improve readability.
45507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45508      # Now convert it back to Unix-style (cygpath)
45509      input_path=`$CYGPATH -u "$shortmode_path"`
45510      new_path="$input_path"
45511    fi
45512  fi
45513
45514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45515  if test "x$test_cygdrive_prefix" = x; then
45516    # As a simple fix, exclude /usr/bin since it's not a real path.
45517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45519      # a path prefixed by /cygdrive for fixpath to work.
45520      new_path="$CYGWIN_ROOT_PATH$input_path"
45521    fi
45522  fi
45523
45524
45525  if test "x$path" != "x$new_path"; then
45526    MSVC_DLL="$new_path"
45527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45529  fi
45530
45531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45532
45533  path="$MSVC_DLL"
45534  has_colon=`$ECHO $path | $GREP ^.:`
45535  new_path="$path"
45536  if test "x$has_colon" = x; then
45537    # Not in mixed or Windows style, start by that.
45538    new_path=`cmd //c echo $path`
45539  fi
45540
45541
45542  input_path="$new_path"
45543  # Check if we need to convert this using DOS-style short mode. If the path
45544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45545  # take no chances and rewrite it.
45546  # Note: m4 eats our [], so we need to use [ and ] instead.
45547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45548  if test "x$has_forbidden_chars" != x; then
45549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45551  fi
45552
45553
45554  windows_path="$new_path"
45555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45556    unix_path=`$CYGPATH -u "$windows_path"`
45557    new_path="$unix_path"
45558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45560    new_path="$unix_path"
45561  fi
45562
45563  if test "x$path" != "x$new_path"; then
45564    MSVC_DLL="$new_path"
45565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45567  fi
45568
45569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45571
45572    else
45573      # We're on a unix platform. Hooray! :)
45574      path="$MSVC_DLL"
45575      has_space=`$ECHO "$path" | $GREP " "`
45576      if test "x$has_space" != x; then
45577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45580      fi
45581
45582      # Use eval to expand a potential ~
45583      eval path="$path"
45584      if test ! -f "$path" && test ! -d "$path"; then
45585        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45586      fi
45587
45588      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45589    fi
45590  fi
45591
45592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45593$as_echo_n "checking for $DLL_NAME... " >&6; }
45594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45595$as_echo "$MSVC_DLL" >&6; }
45596    else
45597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45598$as_echo "incorrect, ignoring" >&6; }
45599      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45600$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45601    fi
45602  fi
45603
45604      if test "x$MSVC_DLL" = x; then
45605        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
45606      fi
45607      MSVCP_DLL="$MSVC_DLL"
45608    elif test "x$DEVKIT_MSVCP_DLL" != x; then
45609
45610  DLL_NAME="$MSVCP_NAME"
45611  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
45612  METHOD="devkit"
45613  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45615$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45616
45617    # Need to check if the found msvcr is correct architecture
45618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45619$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45620    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45622      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45623      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45624      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45625        CORRECT_MSVCR_ARCH="PE32 executable"
45626      else
45627        CORRECT_MSVCR_ARCH="PE32+ executable"
45628      fi
45629    else
45630      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45631        CORRECT_MSVCR_ARCH=386
45632      else
45633        CORRECT_MSVCR_ARCH=x86-64
45634      fi
45635    fi
45636    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45638$as_echo "ok" >&6; }
45639      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45640
45641  # Only process if variable expands to non-empty
45642
45643  if test "x$MSVC_DLL" != x; then
45644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45645
45646  # Input might be given as Windows format, start by converting to
45647  # unix format.
45648  path="$MSVC_DLL"
45649  new_path=`$CYGPATH -u "$path"`
45650
45651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45654  # "foo.exe" is OK but "foo" is an error.
45655  #
45656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45657  # It is also a way to make sure we got the proper file name for the real test later on.
45658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45659  if test "x$test_shortpath" = x; then
45660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45661$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45662    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45663  fi
45664
45665  # Call helper function which possibly converts this using DOS-style short mode.
45666  # If so, the updated path is stored in $new_path.
45667
45668  input_path="$new_path"
45669  # Check if we need to convert this using DOS-style short mode. If the path
45670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45671  # take no chances and rewrite it.
45672  # Note: m4 eats our [], so we need to use [ and ] instead.
45673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45674  if test "x$has_forbidden_chars" != x; then
45675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45679      # Going to short mode and back again did indeed matter. Since short mode is
45680      # case insensitive, let's make it lowercase to improve readability.
45681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45682      # Now convert it back to Unix-style (cygpath)
45683      input_path=`$CYGPATH -u "$shortmode_path"`
45684      new_path="$input_path"
45685    fi
45686  fi
45687
45688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45689  if test "x$test_cygdrive_prefix" = x; then
45690    # As a simple fix, exclude /usr/bin since it's not a real path.
45691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45693      # a path prefixed by /cygdrive for fixpath to work.
45694      new_path="$CYGWIN_ROOT_PATH$input_path"
45695    fi
45696  fi
45697
45698
45699  if test "x$path" != "x$new_path"; then
45700    MSVC_DLL="$new_path"
45701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45702$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45703  fi
45704
45705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45706
45707  path="$MSVC_DLL"
45708  has_colon=`$ECHO $path | $GREP ^.:`
45709  new_path="$path"
45710  if test "x$has_colon" = x; then
45711    # Not in mixed or Windows style, start by that.
45712    new_path=`cmd //c echo $path`
45713  fi
45714
45715
45716  input_path="$new_path"
45717  # Check if we need to convert this using DOS-style short mode. If the path
45718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45719  # take no chances and rewrite it.
45720  # Note: m4 eats our [], so we need to use [ and ] instead.
45721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45722  if test "x$has_forbidden_chars" != x; then
45723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45725  fi
45726
45727
45728  windows_path="$new_path"
45729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45730    unix_path=`$CYGPATH -u "$windows_path"`
45731    new_path="$unix_path"
45732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45734    new_path="$unix_path"
45735  fi
45736
45737  if test "x$path" != "x$new_path"; then
45738    MSVC_DLL="$new_path"
45739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45740$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45741  fi
45742
45743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45745
45746    else
45747      # We're on a unix platform. Hooray! :)
45748      path="$MSVC_DLL"
45749      has_space=`$ECHO "$path" | $GREP " "`
45750      if test "x$has_space" != x; then
45751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45752$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45754      fi
45755
45756      # Use eval to expand a potential ~
45757      eval path="$path"
45758      if test ! -f "$path" && test ! -d "$path"; then
45759        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45760      fi
45761
45762      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45763    fi
45764  fi
45765
45766      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45767$as_echo_n "checking for $DLL_NAME... " >&6; }
45768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45769$as_echo "$MSVC_DLL" >&6; }
45770    else
45771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45772$as_echo "incorrect, ignoring" >&6; }
45773      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45774$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45775    fi
45776  fi
45777
45778      if test "x$MSVC_DLL" = x; then
45779        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
45780      fi
45781      MSVCP_DLL="$MSVC_DLL"
45782    else
45783
45784  DLL_NAME="${MSVCP_NAME}"
45785  MSVC_DLL=
45786
45787  if test "x$MSVC_DLL" = x; then
45788    # Probe: Using well-known location from Visual Studio 10.0
45789    if test "x$VCINSTALLDIR" != x; then
45790      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
45791
45792  windows_path="$CYGWIN_VC_INSTALL_DIR"
45793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45794    unix_path=`$CYGPATH -u "$windows_path"`
45795    CYGWIN_VC_INSTALL_DIR="$unix_path"
45796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45798    CYGWIN_VC_INSTALL_DIR="$unix_path"
45799  fi
45800
45801      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45802        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45803      else
45804        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45805      fi
45806      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
45807
45808  DLL_NAME="$DLL_NAME"
45809  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45810  METHOD="well-known location in VCINSTALLDIR"
45811  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45812    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45813$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45814
45815    # Need to check if the found msvcr is correct architecture
45816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45817$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45818    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45820      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45821      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45822      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45823        CORRECT_MSVCR_ARCH="PE32 executable"
45824      else
45825        CORRECT_MSVCR_ARCH="PE32+ executable"
45826      fi
45827    else
45828      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45829        CORRECT_MSVCR_ARCH=386
45830      else
45831        CORRECT_MSVCR_ARCH=x86-64
45832      fi
45833    fi
45834    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45836$as_echo "ok" >&6; }
45837      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45838
45839  # Only process if variable expands to non-empty
45840
45841  if test "x$MSVC_DLL" != x; then
45842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45843
45844  # Input might be given as Windows format, start by converting to
45845  # unix format.
45846  path="$MSVC_DLL"
45847  new_path=`$CYGPATH -u "$path"`
45848
45849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45852  # "foo.exe" is OK but "foo" is an error.
45853  #
45854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45855  # It is also a way to make sure we got the proper file name for the real test later on.
45856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45857  if test "x$test_shortpath" = x; then
45858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45859$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45860    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45861  fi
45862
45863  # Call helper function which possibly converts this using DOS-style short mode.
45864  # If so, the updated path is stored in $new_path.
45865
45866  input_path="$new_path"
45867  # Check if we need to convert this using DOS-style short mode. If the path
45868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45869  # take no chances and rewrite it.
45870  # Note: m4 eats our [], so we need to use [ and ] instead.
45871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45872  if test "x$has_forbidden_chars" != x; then
45873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45877      # Going to short mode and back again did indeed matter. Since short mode is
45878      # case insensitive, let's make it lowercase to improve readability.
45879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45880      # Now convert it back to Unix-style (cygpath)
45881      input_path=`$CYGPATH -u "$shortmode_path"`
45882      new_path="$input_path"
45883    fi
45884  fi
45885
45886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45887  if test "x$test_cygdrive_prefix" = x; then
45888    # As a simple fix, exclude /usr/bin since it's not a real path.
45889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45891      # a path prefixed by /cygdrive for fixpath to work.
45892      new_path="$CYGWIN_ROOT_PATH$input_path"
45893    fi
45894  fi
45895
45896
45897  if test "x$path" != "x$new_path"; then
45898    MSVC_DLL="$new_path"
45899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45900$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45901  fi
45902
45903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45904
45905  path="$MSVC_DLL"
45906  has_colon=`$ECHO $path | $GREP ^.:`
45907  new_path="$path"
45908  if test "x$has_colon" = x; then
45909    # Not in mixed or Windows style, start by that.
45910    new_path=`cmd //c echo $path`
45911  fi
45912
45913
45914  input_path="$new_path"
45915  # Check if we need to convert this using DOS-style short mode. If the path
45916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45917  # take no chances and rewrite it.
45918  # Note: m4 eats our [], so we need to use [ and ] instead.
45919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45920  if test "x$has_forbidden_chars" != x; then
45921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45923  fi
45924
45925
45926  windows_path="$new_path"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    new_path="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    new_path="$unix_path"
45933  fi
45934
45935  if test "x$path" != "x$new_path"; then
45936    MSVC_DLL="$new_path"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45938$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45939  fi
45940
45941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45943
45944    else
45945      # We're on a unix platform. Hooray! :)
45946      path="$MSVC_DLL"
45947      has_space=`$ECHO "$path" | $GREP " "`
45948      if test "x$has_space" != x; then
45949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45950$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45952      fi
45953
45954      # Use eval to expand a potential ~
45955      eval path="$path"
45956      if test ! -f "$path" && test ! -d "$path"; then
45957        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45958      fi
45959
45960      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45961    fi
45962  fi
45963
45964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45965$as_echo_n "checking for $DLL_NAME... " >&6; }
45966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45967$as_echo "$MSVC_DLL" >&6; }
45968    else
45969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45970$as_echo "incorrect, ignoring" >&6; }
45971      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45972$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45973    fi
45974  fi
45975
45976    fi
45977  fi
45978
45979  if test "x$MSVC_DLL" = x; then
45980    # Probe: Check in the Boot JDK directory.
45981    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
45982
45983  DLL_NAME="$DLL_NAME"
45984  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45985  METHOD="well-known location in Boot JDK"
45986  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45988$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45989
45990    # Need to check if the found msvcr is correct architecture
45991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45992$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45993    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45995      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45996      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45997      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45998        CORRECT_MSVCR_ARCH="PE32 executable"
45999      else
46000        CORRECT_MSVCR_ARCH="PE32+ executable"
46001      fi
46002    else
46003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46004        CORRECT_MSVCR_ARCH=386
46005      else
46006        CORRECT_MSVCR_ARCH=x86-64
46007      fi
46008    fi
46009    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46011$as_echo "ok" >&6; }
46012      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46013
46014  # Only process if variable expands to non-empty
46015
46016  if test "x$MSVC_DLL" != x; then
46017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46018
46019  # Input might be given as Windows format, start by converting to
46020  # unix format.
46021  path="$MSVC_DLL"
46022  new_path=`$CYGPATH -u "$path"`
46023
46024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46027  # "foo.exe" is OK but "foo" is an error.
46028  #
46029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46030  # It is also a way to make sure we got the proper file name for the real test later on.
46031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46032  if test "x$test_shortpath" = x; then
46033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46034$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46035    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46036  fi
46037
46038  # Call helper function which possibly converts this using DOS-style short mode.
46039  # If so, the updated path is stored in $new_path.
46040
46041  input_path="$new_path"
46042  # Check if we need to convert this using DOS-style short mode. If the path
46043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46044  # take no chances and rewrite it.
46045  # Note: m4 eats our [], so we need to use [ and ] instead.
46046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46047  if test "x$has_forbidden_chars" != x; then
46048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46052      # Going to short mode and back again did indeed matter. Since short mode is
46053      # case insensitive, let's make it lowercase to improve readability.
46054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46055      # Now convert it back to Unix-style (cygpath)
46056      input_path=`$CYGPATH -u "$shortmode_path"`
46057      new_path="$input_path"
46058    fi
46059  fi
46060
46061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46062  if test "x$test_cygdrive_prefix" = x; then
46063    # As a simple fix, exclude /usr/bin since it's not a real path.
46064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46066      # a path prefixed by /cygdrive for fixpath to work.
46067      new_path="$CYGWIN_ROOT_PATH$input_path"
46068    fi
46069  fi
46070
46071
46072  if test "x$path" != "x$new_path"; then
46073    MSVC_DLL="$new_path"
46074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46076  fi
46077
46078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46079
46080  path="$MSVC_DLL"
46081  has_colon=`$ECHO $path | $GREP ^.:`
46082  new_path="$path"
46083  if test "x$has_colon" = x; then
46084    # Not in mixed or Windows style, start by that.
46085    new_path=`cmd //c echo $path`
46086  fi
46087
46088
46089  input_path="$new_path"
46090  # Check if we need to convert this using DOS-style short mode. If the path
46091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46092  # take no chances and rewrite it.
46093  # Note: m4 eats our [], so we need to use [ and ] instead.
46094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46095  if test "x$has_forbidden_chars" != x; then
46096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46098  fi
46099
46100
46101  windows_path="$new_path"
46102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46103    unix_path=`$CYGPATH -u "$windows_path"`
46104    new_path="$unix_path"
46105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46107    new_path="$unix_path"
46108  fi
46109
46110  if test "x$path" != "x$new_path"; then
46111    MSVC_DLL="$new_path"
46112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46114  fi
46115
46116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46118
46119    else
46120      # We're on a unix platform. Hooray! :)
46121      path="$MSVC_DLL"
46122      has_space=`$ECHO "$path" | $GREP " "`
46123      if test "x$has_space" != x; then
46124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46125$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46127      fi
46128
46129      # Use eval to expand a potential ~
46130      eval path="$path"
46131      if test ! -f "$path" && test ! -d "$path"; then
46132        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46133      fi
46134
46135      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46136    fi
46137  fi
46138
46139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46140$as_echo_n "checking for $DLL_NAME... " >&6; }
46141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46142$as_echo "$MSVC_DLL" >&6; }
46143    else
46144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46145$as_echo "incorrect, ignoring" >&6; }
46146      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46147$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46148    fi
46149  fi
46150
46151  fi
46152
46153  if test "x$MSVC_DLL" = x; then
46154    # Probe: Look in the Windows system32 directory
46155    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46156
46157  windows_path="$CYGWIN_SYSTEMROOT"
46158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46159    unix_path=`$CYGPATH -u "$windows_path"`
46160    CYGWIN_SYSTEMROOT="$unix_path"
46161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46163    CYGWIN_SYSTEMROOT="$unix_path"
46164  fi
46165
46166    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46167
46168  DLL_NAME="$DLL_NAME"
46169  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46170  METHOD="well-known location in SYSTEMROOT"
46171  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46172    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46173$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46174
46175    # Need to check if the found msvcr is correct architecture
46176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46177$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46178    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46180      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46181      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46182      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46183        CORRECT_MSVCR_ARCH="PE32 executable"
46184      else
46185        CORRECT_MSVCR_ARCH="PE32+ executable"
46186      fi
46187    else
46188      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46189        CORRECT_MSVCR_ARCH=386
46190      else
46191        CORRECT_MSVCR_ARCH=x86-64
46192      fi
46193    fi
46194    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46196$as_echo "ok" >&6; }
46197      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46198
46199  # Only process if variable expands to non-empty
46200
46201  if test "x$MSVC_DLL" != x; then
46202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46203
46204  # Input might be given as Windows format, start by converting to
46205  # unix format.
46206  path="$MSVC_DLL"
46207  new_path=`$CYGPATH -u "$path"`
46208
46209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46212  # "foo.exe" is OK but "foo" is an error.
46213  #
46214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46215  # It is also a way to make sure we got the proper file name for the real test later on.
46216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46217  if test "x$test_shortpath" = x; then
46218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46219$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46220    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46221  fi
46222
46223  # Call helper function which possibly converts this using DOS-style short mode.
46224  # If so, the updated path is stored in $new_path.
46225
46226  input_path="$new_path"
46227  # Check if we need to convert this using DOS-style short mode. If the path
46228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46229  # take no chances and rewrite it.
46230  # Note: m4 eats our [], so we need to use [ and ] instead.
46231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46232  if test "x$has_forbidden_chars" != x; then
46233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46237      # Going to short mode and back again did indeed matter. Since short mode is
46238      # case insensitive, let's make it lowercase to improve readability.
46239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46240      # Now convert it back to Unix-style (cygpath)
46241      input_path=`$CYGPATH -u "$shortmode_path"`
46242      new_path="$input_path"
46243    fi
46244  fi
46245
46246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46247  if test "x$test_cygdrive_prefix" = x; then
46248    # As a simple fix, exclude /usr/bin since it's not a real path.
46249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46251      # a path prefixed by /cygdrive for fixpath to work.
46252      new_path="$CYGWIN_ROOT_PATH$input_path"
46253    fi
46254  fi
46255
46256
46257  if test "x$path" != "x$new_path"; then
46258    MSVC_DLL="$new_path"
46259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46260$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46261  fi
46262
46263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46264
46265  path="$MSVC_DLL"
46266  has_colon=`$ECHO $path | $GREP ^.:`
46267  new_path="$path"
46268  if test "x$has_colon" = x; then
46269    # Not in mixed or Windows style, start by that.
46270    new_path=`cmd //c echo $path`
46271  fi
46272
46273
46274  input_path="$new_path"
46275  # Check if we need to convert this using DOS-style short mode. If the path
46276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46277  # take no chances and rewrite it.
46278  # Note: m4 eats our [], so we need to use [ and ] instead.
46279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46280  if test "x$has_forbidden_chars" != x; then
46281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46283  fi
46284
46285
46286  windows_path="$new_path"
46287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46288    unix_path=`$CYGPATH -u "$windows_path"`
46289    new_path="$unix_path"
46290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46292    new_path="$unix_path"
46293  fi
46294
46295  if test "x$path" != "x$new_path"; then
46296    MSVC_DLL="$new_path"
46297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46298$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46299  fi
46300
46301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46303
46304    else
46305      # We're on a unix platform. Hooray! :)
46306      path="$MSVC_DLL"
46307      has_space=`$ECHO "$path" | $GREP " "`
46308      if test "x$has_space" != x; then
46309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46310$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46312      fi
46313
46314      # Use eval to expand a potential ~
46315      eval path="$path"
46316      if test ! -f "$path" && test ! -d "$path"; then
46317        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46318      fi
46319
46320      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46321    fi
46322  fi
46323
46324      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46325$as_echo_n "checking for $DLL_NAME... " >&6; }
46326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46327$as_echo "$MSVC_DLL" >&6; }
46328    else
46329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46330$as_echo "incorrect, ignoring" >&6; }
46331      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46332$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46333    fi
46334  fi
46335
46336  fi
46337
46338  if test "x$MSVC_DLL" = x; then
46339    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46340    if test "x$VS100COMNTOOLS" != x; then
46341      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46342
46343  windows_path="$CYGWIN_VS_TOOLS_DIR"
46344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46345    unix_path=`$CYGPATH -u "$windows_path"`
46346    CYGWIN_VS_TOOLS_DIR="$unix_path"
46347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46349    CYGWIN_VS_TOOLS_DIR="$unix_path"
46350  fi
46351
46352      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46353        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46354	    | $GREP -i /x64/ | $HEAD --lines 1`
46355      else
46356        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46357	    | $GREP -i /x86/ | $HEAD --lines 1`
46358      fi
46359
46360  DLL_NAME="$DLL_NAME"
46361  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46362  METHOD="search of VS100COMNTOOLS"
46363  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46365$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46366
46367    # Need to check if the found msvcr is correct architecture
46368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46369$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46370    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46372      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46373      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46374      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46375        CORRECT_MSVCR_ARCH="PE32 executable"
46376      else
46377        CORRECT_MSVCR_ARCH="PE32+ executable"
46378      fi
46379    else
46380      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46381        CORRECT_MSVCR_ARCH=386
46382      else
46383        CORRECT_MSVCR_ARCH=x86-64
46384      fi
46385    fi
46386    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46388$as_echo "ok" >&6; }
46389      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46390
46391  # Only process if variable expands to non-empty
46392
46393  if test "x$MSVC_DLL" != x; then
46394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46395
46396  # Input might be given as Windows format, start by converting to
46397  # unix format.
46398  path="$MSVC_DLL"
46399  new_path=`$CYGPATH -u "$path"`
46400
46401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46404  # "foo.exe" is OK but "foo" is an error.
46405  #
46406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46407  # It is also a way to make sure we got the proper file name for the real test later on.
46408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46409  if test "x$test_shortpath" = x; then
46410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46411$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46412    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46413  fi
46414
46415  # Call helper function which possibly converts this using DOS-style short mode.
46416  # If so, the updated path is stored in $new_path.
46417
46418  input_path="$new_path"
46419  # Check if we need to convert this using DOS-style short mode. If the path
46420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46421  # take no chances and rewrite it.
46422  # Note: m4 eats our [], so we need to use [ and ] instead.
46423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46424  if test "x$has_forbidden_chars" != x; then
46425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46429      # Going to short mode and back again did indeed matter. Since short mode is
46430      # case insensitive, let's make it lowercase to improve readability.
46431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46432      # Now convert it back to Unix-style (cygpath)
46433      input_path=`$CYGPATH -u "$shortmode_path"`
46434      new_path="$input_path"
46435    fi
46436  fi
46437
46438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46439  if test "x$test_cygdrive_prefix" = x; then
46440    # As a simple fix, exclude /usr/bin since it's not a real path.
46441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46443      # a path prefixed by /cygdrive for fixpath to work.
46444      new_path="$CYGWIN_ROOT_PATH$input_path"
46445    fi
46446  fi
46447
46448
46449  if test "x$path" != "x$new_path"; then
46450    MSVC_DLL="$new_path"
46451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46452$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46453  fi
46454
46455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46456
46457  path="$MSVC_DLL"
46458  has_colon=`$ECHO $path | $GREP ^.:`
46459  new_path="$path"
46460  if test "x$has_colon" = x; then
46461    # Not in mixed or Windows style, start by that.
46462    new_path=`cmd //c echo $path`
46463  fi
46464
46465
46466  input_path="$new_path"
46467  # Check if we need to convert this using DOS-style short mode. If the path
46468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46469  # take no chances and rewrite it.
46470  # Note: m4 eats our [], so we need to use [ and ] instead.
46471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46472  if test "x$has_forbidden_chars" != x; then
46473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46475  fi
46476
46477
46478  windows_path="$new_path"
46479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46480    unix_path=`$CYGPATH -u "$windows_path"`
46481    new_path="$unix_path"
46482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46484    new_path="$unix_path"
46485  fi
46486
46487  if test "x$path" != "x$new_path"; then
46488    MSVC_DLL="$new_path"
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46490$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46491  fi
46492
46493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46495
46496    else
46497      # We're on a unix platform. Hooray! :)
46498      path="$MSVC_DLL"
46499      has_space=`$ECHO "$path" | $GREP " "`
46500      if test "x$has_space" != x; then
46501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46502$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46504      fi
46505
46506      # Use eval to expand a potential ~
46507      eval path="$path"
46508      if test ! -f "$path" && test ! -d "$path"; then
46509        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46510      fi
46511
46512      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46513    fi
46514  fi
46515
46516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46517$as_echo_n "checking for $DLL_NAME... " >&6; }
46518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46519$as_echo "$MSVC_DLL" >&6; }
46520    else
46521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46522$as_echo "incorrect, ignoring" >&6; }
46523      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46524$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46525    fi
46526  fi
46527
46528    fi
46529  fi
46530
46531  if test "x$MSVC_DLL" = x; then
46532    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46533    # (This was the original behaviour; kept since it might turn something up)
46534    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46535      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46536        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46537	    | $GREP x64 | $HEAD --lines 1`
46538      else
46539        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46540	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46541        if test "x$POSSIBLE_MSVC_DLL" = x; then
46542          # We're grasping at straws now...
46543          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46544	      | $HEAD --lines 1`
46545        fi
46546      fi
46547
46548
46549  DLL_NAME="$DLL_NAME"
46550  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46551  METHOD="search of VCINSTALLDIR"
46552  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46554$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46555
46556    # Need to check if the found msvcr is correct architecture
46557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46558$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46559    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46561      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46562      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46563      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46564        CORRECT_MSVCR_ARCH="PE32 executable"
46565      else
46566        CORRECT_MSVCR_ARCH="PE32+ executable"
46567      fi
46568    else
46569      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46570        CORRECT_MSVCR_ARCH=386
46571      else
46572        CORRECT_MSVCR_ARCH=x86-64
46573      fi
46574    fi
46575    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46577$as_echo "ok" >&6; }
46578      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46579
46580  # Only process if variable expands to non-empty
46581
46582  if test "x$MSVC_DLL" != x; then
46583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46584
46585  # Input might be given as Windows format, start by converting to
46586  # unix format.
46587  path="$MSVC_DLL"
46588  new_path=`$CYGPATH -u "$path"`
46589
46590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46593  # "foo.exe" is OK but "foo" is an error.
46594  #
46595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46596  # It is also a way to make sure we got the proper file name for the real test later on.
46597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46598  if test "x$test_shortpath" = x; then
46599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46600$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46601    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46602  fi
46603
46604  # Call helper function which possibly converts this using DOS-style short mode.
46605  # If so, the updated path is stored in $new_path.
46606
46607  input_path="$new_path"
46608  # Check if we need to convert this using DOS-style short mode. If the path
46609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46610  # take no chances and rewrite it.
46611  # Note: m4 eats our [], so we need to use [ and ] instead.
46612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46613  if test "x$has_forbidden_chars" != x; then
46614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46618      # Going to short mode and back again did indeed matter. Since short mode is
46619      # case insensitive, let's make it lowercase to improve readability.
46620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46621      # Now convert it back to Unix-style (cygpath)
46622      input_path=`$CYGPATH -u "$shortmode_path"`
46623      new_path="$input_path"
46624    fi
46625  fi
46626
46627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46628  if test "x$test_cygdrive_prefix" = x; then
46629    # As a simple fix, exclude /usr/bin since it's not a real path.
46630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46632      # a path prefixed by /cygdrive for fixpath to work.
46633      new_path="$CYGWIN_ROOT_PATH$input_path"
46634    fi
46635  fi
46636
46637
46638  if test "x$path" != "x$new_path"; then
46639    MSVC_DLL="$new_path"
46640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46641$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46642  fi
46643
46644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46645
46646  path="$MSVC_DLL"
46647  has_colon=`$ECHO $path | $GREP ^.:`
46648  new_path="$path"
46649  if test "x$has_colon" = x; then
46650    # Not in mixed or Windows style, start by that.
46651    new_path=`cmd //c echo $path`
46652  fi
46653
46654
46655  input_path="$new_path"
46656  # Check if we need to convert this using DOS-style short mode. If the path
46657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46658  # take no chances and rewrite it.
46659  # Note: m4 eats our [], so we need to use [ and ] instead.
46660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46661  if test "x$has_forbidden_chars" != x; then
46662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46664  fi
46665
46666
46667  windows_path="$new_path"
46668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46669    unix_path=`$CYGPATH -u "$windows_path"`
46670    new_path="$unix_path"
46671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46673    new_path="$unix_path"
46674  fi
46675
46676  if test "x$path" != "x$new_path"; then
46677    MSVC_DLL="$new_path"
46678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46679$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46680  fi
46681
46682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46684
46685    else
46686      # We're on a unix platform. Hooray! :)
46687      path="$MSVC_DLL"
46688      has_space=`$ECHO "$path" | $GREP " "`
46689      if test "x$has_space" != x; then
46690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46691$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46693      fi
46694
46695      # Use eval to expand a potential ~
46696      eval path="$path"
46697      if test ! -f "$path" && test ! -d "$path"; then
46698        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46699      fi
46700
46701      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46702    fi
46703  fi
46704
46705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46706$as_echo_n "checking for $DLL_NAME... " >&6; }
46707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46708$as_echo "$MSVC_DLL" >&6; }
46709    else
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46711$as_echo "incorrect, ignoring" >&6; }
46712      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46713$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46714    fi
46715  fi
46716
46717    fi
46718  fi
46719
46720  if test "x$MSVC_DLL" = x; then
46721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46722$as_echo_n "checking for $DLL_NAME... " >&6; }
46723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46724$as_echo "no" >&6; }
46725    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46726  fi
46727
46728      MSVCP_DLL="$MSVC_DLL"
46729    fi
46730
46731  fi
46732
46733  fi
46734
46735
46736  if test "x$NEEDS_LIB_X11" = xfalse; then
46737    if test "x${with_x}" != x; then
46738      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
46739$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
46740    fi
46741    X_CFLAGS=
46742    X_LIBS=
46743  else
46744
46745    if test "x${with_x}" = xno; then
46746      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
46747    fi
46748
46749    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
46750      # The user has specified a X11 base directory. Use it for includes and
46751      # libraries, unless explicitely overridden.
46752      if test "x$x_includes" = xNONE; then
46753        x_includes="${with_x}/include"
46754      fi
46755      if test "x$x_libraries" = xNONE; then
46756        x_libraries="${with_x}/lib"
46757      fi
46758    else
46759      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
46760      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
46761      # --x-libraries for the sysroot, if that seems to be correct.
46762      if test "x$SYSROOT" != "x"; then
46763        if test "x$x_includes" = xNONE; then
46764          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
46765            x_includes="$SYSROOT/usr/X11R6/include"
46766          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
46767            x_includes="$SYSROOT/usr/include"
46768          fi
46769        fi
46770        if test "x$x_libraries" = xNONE; then
46771          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
46772            x_libraries="$SYSROOT/usr/X11R6/lib"
46773          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46774            x_libraries="$SYSROOT/usr/lib64"
46775          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
46776            x_libraries="$SYSROOT/usr/lib"
46777          fi
46778        fi
46779      fi
46780    fi
46781
46782    # Now let autoconf do it's magic
46783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
46784$as_echo_n "checking for X... " >&6; }
46785
46786
46787# Check whether --with-x was given.
46788if test "${with_x+set}" = set; then :
46789  withval=$with_x;
46790fi
46791
46792# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
46793if test "x$with_x" = xno; then
46794  # The user explicitly disabled X.
46795  have_x=disabled
46796else
46797  case $x_includes,$x_libraries in #(
46798    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
46799    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
46800  $as_echo_n "(cached) " >&6
46801else
46802  # One or both of the vars are not set, and there is no cached value.
46803ac_x_includes=no ac_x_libraries=no
46804rm -f -r conftest.dir
46805if mkdir conftest.dir; then
46806  cd conftest.dir
46807  cat >Imakefile <<'_ACEOF'
46808incroot:
46809	@echo incroot='${INCROOT}'
46810usrlibdir:
46811	@echo usrlibdir='${USRLIBDIR}'
46812libdir:
46813	@echo libdir='${LIBDIR}'
46814_ACEOF
46815  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
46816    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
46817    for ac_var in incroot usrlibdir libdir; do
46818      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
46819    done
46820    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
46821    for ac_extension in a so sl dylib la dll; do
46822      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
46823	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
46824	ac_im_usrlibdir=$ac_im_libdir; break
46825      fi
46826    done
46827    # Screen out bogus values from the imake configuration.  They are
46828    # bogus both because they are the default anyway, and because
46829    # using them would break gcc on systems where it needs fixed includes.
46830    case $ac_im_incroot in
46831	/usr/include) ac_x_includes= ;;
46832	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
46833    esac
46834    case $ac_im_usrlibdir in
46835	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
46836	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
46837    esac
46838  fi
46839  cd ..
46840  rm -f -r conftest.dir
46841fi
46842
46843# Standard set of common directories for X headers.
46844# Check X11 before X11Rn because it is often a symlink to the current release.
46845ac_x_header_dirs='
46846/usr/X11/include
46847/usr/X11R7/include
46848/usr/X11R6/include
46849/usr/X11R5/include
46850/usr/X11R4/include
46851
46852/usr/include/X11
46853/usr/include/X11R7
46854/usr/include/X11R6
46855/usr/include/X11R5
46856/usr/include/X11R4
46857
46858/usr/local/X11/include
46859/usr/local/X11R7/include
46860/usr/local/X11R6/include
46861/usr/local/X11R5/include
46862/usr/local/X11R4/include
46863
46864/usr/local/include/X11
46865/usr/local/include/X11R7
46866/usr/local/include/X11R6
46867/usr/local/include/X11R5
46868/usr/local/include/X11R4
46869
46870/usr/X386/include
46871/usr/x386/include
46872/usr/XFree86/include/X11
46873
46874/usr/include
46875/usr/local/include
46876/usr/unsupported/include
46877/usr/athena/include
46878/usr/local/x11r5/include
46879/usr/lpp/Xamples/include
46880
46881/usr/openwin/include
46882/usr/openwin/share/include'
46883
46884if test "$ac_x_includes" = no; then
46885  # Guess where to find include files, by looking for Xlib.h.
46886  # First, try using that file with no special directory specified.
46887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46888/* end confdefs.h.  */
46889#include <X11/Xlib.h>
46890_ACEOF
46891if ac_fn_cxx_try_cpp "$LINENO"; then :
46892  # We can compile using X headers with no special include directory.
46893ac_x_includes=
46894else
46895  for ac_dir in $ac_x_header_dirs; do
46896  if test -r "$ac_dir/X11/Xlib.h"; then
46897    ac_x_includes=$ac_dir
46898    break
46899  fi
46900done
46901fi
46902rm -f conftest.err conftest.i conftest.$ac_ext
46903fi # $ac_x_includes = no
46904
46905if test "$ac_x_libraries" = no; then
46906  # Check for the libraries.
46907  # See if we find them without any special options.
46908  # Don't add to $LIBS permanently.
46909  ac_save_LIBS=$LIBS
46910  LIBS="-lX11 $LIBS"
46911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46912/* end confdefs.h.  */
46913#include <X11/Xlib.h>
46914int
46915main ()
46916{
46917XrmInitialize ()
46918  ;
46919  return 0;
46920}
46921_ACEOF
46922if ac_fn_cxx_try_link "$LINENO"; then :
46923  LIBS=$ac_save_LIBS
46924# We can link X programs with no special library path.
46925ac_x_libraries=
46926else
46927  LIBS=$ac_save_LIBS
46928for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
46929do
46930  # Don't even attempt the hair of trying to link an X program!
46931  for ac_extension in a so sl dylib la dll; do
46932    if test -r "$ac_dir/libX11.$ac_extension"; then
46933      ac_x_libraries=$ac_dir
46934      break 2
46935    fi
46936  done
46937done
46938fi
46939rm -f core conftest.err conftest.$ac_objext \
46940    conftest$ac_exeext conftest.$ac_ext
46941fi # $ac_x_libraries = no
46942
46943case $ac_x_includes,$ac_x_libraries in #(
46944  no,* | *,no | *\'*)
46945    # Didn't find X, or a directory has "'" in its name.
46946    ac_cv_have_x="have_x=no";; #(
46947  *)
46948    # Record where we found X for the cache.
46949    ac_cv_have_x="have_x=yes\
46950	ac_x_includes='$ac_x_includes'\
46951	ac_x_libraries='$ac_x_libraries'"
46952esac
46953fi
46954;; #(
46955    *) have_x=yes;;
46956  esac
46957  eval "$ac_cv_have_x"
46958fi # $with_x != no
46959
46960if test "$have_x" != yes; then
46961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
46962$as_echo "$have_x" >&6; }
46963  no_x=yes
46964else
46965  # If each of the values was on the command line, it overrides each guess.
46966  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
46967  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
46968  # Update the cache value to reflect the command line values.
46969  ac_cv_have_x="have_x=yes\
46970	ac_x_includes='$x_includes'\
46971	ac_x_libraries='$x_libraries'"
46972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
46973$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
46974fi
46975
46976    if test "$no_x" = yes; then
46977  # Not all programs may use this symbol, but it does not hurt to define it.
46978
46979$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
46980
46981  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
46982else
46983  if test -n "$x_includes"; then
46984    X_CFLAGS="$X_CFLAGS -I$x_includes"
46985  fi
46986
46987  # It would also be nice to do this for all -L options, not just this one.
46988  if test -n "$x_libraries"; then
46989    X_LIBS="$X_LIBS -L$x_libraries"
46990    # For Solaris; some versions of Sun CC require a space after -R and
46991    # others require no space.  Words are not sufficient . . . .
46992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
46993$as_echo_n "checking whether -R must be followed by a space... " >&6; }
46994    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
46995    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
46996    ac_cxx_werror_flag=yes
46997    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46998/* end confdefs.h.  */
46999
47000int
47001main ()
47002{
47003
47004  ;
47005  return 0;
47006}
47007_ACEOF
47008if ac_fn_cxx_try_link "$LINENO"; then :
47009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47010$as_echo "no" >&6; }
47011       X_LIBS="$X_LIBS -R$x_libraries"
47012else
47013  LIBS="$ac_xsave_LIBS -R $x_libraries"
47014       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47015/* end confdefs.h.  */
47016
47017int
47018main ()
47019{
47020
47021  ;
47022  return 0;
47023}
47024_ACEOF
47025if ac_fn_cxx_try_link "$LINENO"; then :
47026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47027$as_echo "yes" >&6; }
47028	  X_LIBS="$X_LIBS -R $x_libraries"
47029else
47030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
47031$as_echo "neither works" >&6; }
47032fi
47033rm -f core conftest.err conftest.$ac_objext \
47034    conftest$ac_exeext conftest.$ac_ext
47035fi
47036rm -f core conftest.err conftest.$ac_objext \
47037    conftest$ac_exeext conftest.$ac_ext
47038    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
47039    LIBS=$ac_xsave_LIBS
47040  fi
47041
47042  # Check for system-dependent libraries X programs must link with.
47043  # Do this before checking for the system-independent R6 libraries
47044  # (-lICE), since we may need -lsocket or whatever for X linking.
47045
47046  if test "$ISC" = yes; then
47047    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
47048  else
47049    # Martyn Johnson says this is needed for Ultrix, if the X
47050    # libraries were built with DECnet support.  And Karl Berry says
47051    # the Alpha needs dnet_stub (dnet does not exist).
47052    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
47053    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47054/* end confdefs.h.  */
47055
47056/* Override any GCC internal prototype to avoid an error.
47057   Use char because int might match the return type of a GCC
47058   builtin and then its argument prototype would still apply.  */
47059#ifdef __cplusplus
47060extern "C"
47061#endif
47062char XOpenDisplay ();
47063int
47064main ()
47065{
47066return XOpenDisplay ();
47067  ;
47068  return 0;
47069}
47070_ACEOF
47071if ac_fn_cxx_try_link "$LINENO"; then :
47072
47073else
47074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
47075$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
47076if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
47077  $as_echo_n "(cached) " >&6
47078else
47079  ac_check_lib_save_LIBS=$LIBS
47080LIBS="-ldnet  $LIBS"
47081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47082/* end confdefs.h.  */
47083
47084/* Override any GCC internal prototype to avoid an error.
47085   Use char because int might match the return type of a GCC
47086   builtin and then its argument prototype would still apply.  */
47087#ifdef __cplusplus
47088extern "C"
47089#endif
47090char dnet_ntoa ();
47091int
47092main ()
47093{
47094return dnet_ntoa ();
47095  ;
47096  return 0;
47097}
47098_ACEOF
47099if ac_fn_cxx_try_link "$LINENO"; then :
47100  ac_cv_lib_dnet_dnet_ntoa=yes
47101else
47102  ac_cv_lib_dnet_dnet_ntoa=no
47103fi
47104rm -f core conftest.err conftest.$ac_objext \
47105    conftest$ac_exeext conftest.$ac_ext
47106LIBS=$ac_check_lib_save_LIBS
47107fi
47108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
47109$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
47110if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
47111  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
47112fi
47113
47114    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
47116$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
47117if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
47118  $as_echo_n "(cached) " >&6
47119else
47120  ac_check_lib_save_LIBS=$LIBS
47121LIBS="-ldnet_stub  $LIBS"
47122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47123/* end confdefs.h.  */
47124
47125/* Override any GCC internal prototype to avoid an error.
47126   Use char because int might match the return type of a GCC
47127   builtin and then its argument prototype would still apply.  */
47128#ifdef __cplusplus
47129extern "C"
47130#endif
47131char dnet_ntoa ();
47132int
47133main ()
47134{
47135return dnet_ntoa ();
47136  ;
47137  return 0;
47138}
47139_ACEOF
47140if ac_fn_cxx_try_link "$LINENO"; then :
47141  ac_cv_lib_dnet_stub_dnet_ntoa=yes
47142else
47143  ac_cv_lib_dnet_stub_dnet_ntoa=no
47144fi
47145rm -f core conftest.err conftest.$ac_objext \
47146    conftest$ac_exeext conftest.$ac_ext
47147LIBS=$ac_check_lib_save_LIBS
47148fi
47149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
47150$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
47151if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
47152  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
47153fi
47154
47155    fi
47156fi
47157rm -f core conftest.err conftest.$ac_objext \
47158    conftest$ac_exeext conftest.$ac_ext
47159    LIBS="$ac_xsave_LIBS"
47160
47161    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
47162    # to get the SysV transport functions.
47163    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
47164    # needs -lnsl.
47165    # The nsl library prevents programs from opening the X display
47166    # on Irix 5.2, according to T.E. Dickey.
47167    # The functions gethostbyname, getservbyname, and inet_addr are
47168    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
47169    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
47170if test "x$ac_cv_func_gethostbyname" = xyes; then :
47171
47172fi
47173
47174    if test $ac_cv_func_gethostbyname = no; then
47175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
47176$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
47177if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
47178  $as_echo_n "(cached) " >&6
47179else
47180  ac_check_lib_save_LIBS=$LIBS
47181LIBS="-lnsl  $LIBS"
47182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47183/* end confdefs.h.  */
47184
47185/* Override any GCC internal prototype to avoid an error.
47186   Use char because int might match the return type of a GCC
47187   builtin and then its argument prototype would still apply.  */
47188#ifdef __cplusplus
47189extern "C"
47190#endif
47191char gethostbyname ();
47192int
47193main ()
47194{
47195return gethostbyname ();
47196  ;
47197  return 0;
47198}
47199_ACEOF
47200if ac_fn_cxx_try_link "$LINENO"; then :
47201  ac_cv_lib_nsl_gethostbyname=yes
47202else
47203  ac_cv_lib_nsl_gethostbyname=no
47204fi
47205rm -f core conftest.err conftest.$ac_objext \
47206    conftest$ac_exeext conftest.$ac_ext
47207LIBS=$ac_check_lib_save_LIBS
47208fi
47209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
47210$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
47211if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
47212  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
47213fi
47214
47215      if test $ac_cv_lib_nsl_gethostbyname = no; then
47216	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
47217$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
47218if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
47219  $as_echo_n "(cached) " >&6
47220else
47221  ac_check_lib_save_LIBS=$LIBS
47222LIBS="-lbsd  $LIBS"
47223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47224/* end confdefs.h.  */
47225
47226/* Override any GCC internal prototype to avoid an error.
47227   Use char because int might match the return type of a GCC
47228   builtin and then its argument prototype would still apply.  */
47229#ifdef __cplusplus
47230extern "C"
47231#endif
47232char gethostbyname ();
47233int
47234main ()
47235{
47236return gethostbyname ();
47237  ;
47238  return 0;
47239}
47240_ACEOF
47241if ac_fn_cxx_try_link "$LINENO"; then :
47242  ac_cv_lib_bsd_gethostbyname=yes
47243else
47244  ac_cv_lib_bsd_gethostbyname=no
47245fi
47246rm -f core conftest.err conftest.$ac_objext \
47247    conftest$ac_exeext conftest.$ac_ext
47248LIBS=$ac_check_lib_save_LIBS
47249fi
47250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
47251$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
47252if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
47253  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
47254fi
47255
47256      fi
47257    fi
47258
47259    # lieder@skyler.mavd.honeywell.com says without -lsocket,
47260    # socket/setsockopt and other routines are undefined under SCO ODT
47261    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
47262    # on later versions), says Simon Leinen: it contains gethostby*
47263    # variants that don't use the name server (or something).  -lsocket
47264    # must be given before -lnsl if both are needed.  We assume that
47265    # if connect needs -lnsl, so does gethostbyname.
47266    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
47267if test "x$ac_cv_func_connect" = xyes; then :
47268
47269fi
47270
47271    if test $ac_cv_func_connect = no; then
47272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
47273$as_echo_n "checking for connect in -lsocket... " >&6; }
47274if ${ac_cv_lib_socket_connect+:} false; then :
47275  $as_echo_n "(cached) " >&6
47276else
47277  ac_check_lib_save_LIBS=$LIBS
47278LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
47279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47280/* end confdefs.h.  */
47281
47282/* Override any GCC internal prototype to avoid an error.
47283   Use char because int might match the return type of a GCC
47284   builtin and then its argument prototype would still apply.  */
47285#ifdef __cplusplus
47286extern "C"
47287#endif
47288char connect ();
47289int
47290main ()
47291{
47292return connect ();
47293  ;
47294  return 0;
47295}
47296_ACEOF
47297if ac_fn_cxx_try_link "$LINENO"; then :
47298  ac_cv_lib_socket_connect=yes
47299else
47300  ac_cv_lib_socket_connect=no
47301fi
47302rm -f core conftest.err conftest.$ac_objext \
47303    conftest$ac_exeext conftest.$ac_ext
47304LIBS=$ac_check_lib_save_LIBS
47305fi
47306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
47307$as_echo "$ac_cv_lib_socket_connect" >&6; }
47308if test "x$ac_cv_lib_socket_connect" = xyes; then :
47309  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
47310fi
47311
47312    fi
47313
47314    # Guillermo Gomez says -lposix is necessary on A/UX.
47315    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
47316if test "x$ac_cv_func_remove" = xyes; then :
47317
47318fi
47319
47320    if test $ac_cv_func_remove = no; then
47321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
47322$as_echo_n "checking for remove in -lposix... " >&6; }
47323if ${ac_cv_lib_posix_remove+:} false; then :
47324  $as_echo_n "(cached) " >&6
47325else
47326  ac_check_lib_save_LIBS=$LIBS
47327LIBS="-lposix  $LIBS"
47328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47329/* end confdefs.h.  */
47330
47331/* Override any GCC internal prototype to avoid an error.
47332   Use char because int might match the return type of a GCC
47333   builtin and then its argument prototype would still apply.  */
47334#ifdef __cplusplus
47335extern "C"
47336#endif
47337char remove ();
47338int
47339main ()
47340{
47341return remove ();
47342  ;
47343  return 0;
47344}
47345_ACEOF
47346if ac_fn_cxx_try_link "$LINENO"; then :
47347  ac_cv_lib_posix_remove=yes
47348else
47349  ac_cv_lib_posix_remove=no
47350fi
47351rm -f core conftest.err conftest.$ac_objext \
47352    conftest$ac_exeext conftest.$ac_ext
47353LIBS=$ac_check_lib_save_LIBS
47354fi
47355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
47356$as_echo "$ac_cv_lib_posix_remove" >&6; }
47357if test "x$ac_cv_lib_posix_remove" = xyes; then :
47358  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
47359fi
47360
47361    fi
47362
47363    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
47364    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
47365if test "x$ac_cv_func_shmat" = xyes; then :
47366
47367fi
47368
47369    if test $ac_cv_func_shmat = no; then
47370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
47371$as_echo_n "checking for shmat in -lipc... " >&6; }
47372if ${ac_cv_lib_ipc_shmat+:} false; then :
47373  $as_echo_n "(cached) " >&6
47374else
47375  ac_check_lib_save_LIBS=$LIBS
47376LIBS="-lipc  $LIBS"
47377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47378/* end confdefs.h.  */
47379
47380/* Override any GCC internal prototype to avoid an error.
47381   Use char because int might match the return type of a GCC
47382   builtin and then its argument prototype would still apply.  */
47383#ifdef __cplusplus
47384extern "C"
47385#endif
47386char shmat ();
47387int
47388main ()
47389{
47390return shmat ();
47391  ;
47392  return 0;
47393}
47394_ACEOF
47395if ac_fn_cxx_try_link "$LINENO"; then :
47396  ac_cv_lib_ipc_shmat=yes
47397else
47398  ac_cv_lib_ipc_shmat=no
47399fi
47400rm -f core conftest.err conftest.$ac_objext \
47401    conftest$ac_exeext conftest.$ac_ext
47402LIBS=$ac_check_lib_save_LIBS
47403fi
47404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
47405$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
47406if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
47407  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
47408fi
47409
47410    fi
47411  fi
47412
47413  # Check for libraries that X11R6 Xt/Xaw programs need.
47414  ac_save_LDFLAGS=$LDFLAGS
47415  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
47416  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
47417  # check for ICE first), but we must link in the order -lSM -lICE or
47418  # we get undefined symbols.  So assume we have SM if we have ICE.
47419  # These have to be linked with before -lX11, unlike the other
47420  # libraries we check for below, so use a different variable.
47421  # John Interrante, Karl Berry
47422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
47423$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
47424if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
47425  $as_echo_n "(cached) " >&6
47426else
47427  ac_check_lib_save_LIBS=$LIBS
47428LIBS="-lICE $X_EXTRA_LIBS $LIBS"
47429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47430/* end confdefs.h.  */
47431
47432/* Override any GCC internal prototype to avoid an error.
47433   Use char because int might match the return type of a GCC
47434   builtin and then its argument prototype would still apply.  */
47435#ifdef __cplusplus
47436extern "C"
47437#endif
47438char IceConnectionNumber ();
47439int
47440main ()
47441{
47442return IceConnectionNumber ();
47443  ;
47444  return 0;
47445}
47446_ACEOF
47447if ac_fn_cxx_try_link "$LINENO"; then :
47448  ac_cv_lib_ICE_IceConnectionNumber=yes
47449else
47450  ac_cv_lib_ICE_IceConnectionNumber=no
47451fi
47452rm -f core conftest.err conftest.$ac_objext \
47453    conftest$ac_exeext conftest.$ac_ext
47454LIBS=$ac_check_lib_save_LIBS
47455fi
47456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
47457$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
47458if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
47459  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
47460fi
47461
47462  LDFLAGS=$ac_save_LDFLAGS
47463
47464fi
47465
47466
47467    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
47468    # this doesn't make sense so we remove it.
47469    if test "x$COMPILE_TYPE" = xcross; then
47470      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
47471    fi
47472
47473    if test "x$no_x" = xyes; then
47474
47475  # Print a helpful message on how to acquire the necessary build dependency.
47476  # x11 is the help tag: freetype, cups, alsa etc
47477  MISSING_DEPENDENCY=x11
47478
47479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47480    cygwin_help $MISSING_DEPENDENCY
47481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47482    msys_help $MISSING_DEPENDENCY
47483  else
47484    PKGHANDLER_COMMAND=
47485
47486    case $PKGHANDLER in
47487      apt-get)
47488        apt_help     $MISSING_DEPENDENCY ;;
47489      yum)
47490        yum_help     $MISSING_DEPENDENCY ;;
47491      port)
47492        port_help    $MISSING_DEPENDENCY ;;
47493      pkgutil)
47494        pkgutil_help $MISSING_DEPENDENCY ;;
47495      pkgadd)
47496        pkgadd_help  $MISSING_DEPENDENCY ;;
47497    esac
47498
47499    if test "x$PKGHANDLER_COMMAND" != x; then
47500      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47501    fi
47502  fi
47503
47504      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
47505    fi
47506
47507    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47508      OPENWIN_HOME="/usr/openwin"
47509      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
47510      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47511          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
47512          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47513          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
47514    fi
47515
47516    ac_ext=c
47517ac_cpp='$CPP $CPPFLAGS'
47518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47520ac_compiler_gnu=$ac_cv_c_compiler_gnu
47521
47522    OLD_CFLAGS="$CFLAGS"
47523    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
47524
47525    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
47526    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
47527do :
47528  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47529ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
47530          # include <X11/Xlib.h>
47531          # include <X11/Xutil.h>
47532
47533
47534"
47535if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47536  cat >>confdefs.h <<_ACEOF
47537#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47538_ACEOF
47539 X11_HEADERS_OK=yes
47540else
47541  X11_HEADERS_OK=no; break
47542fi
47543
47544done
47545
47546
47547    if test "x$X11_HEADERS_OK" = xno; then
47548
47549  # Print a helpful message on how to acquire the necessary build dependency.
47550  # x11 is the help tag: freetype, cups, alsa etc
47551  MISSING_DEPENDENCY=x11
47552
47553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47554    cygwin_help $MISSING_DEPENDENCY
47555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47556    msys_help $MISSING_DEPENDENCY
47557  else
47558    PKGHANDLER_COMMAND=
47559
47560    case $PKGHANDLER in
47561      apt-get)
47562        apt_help     $MISSING_DEPENDENCY ;;
47563      yum)
47564        yum_help     $MISSING_DEPENDENCY ;;
47565      port)
47566        port_help    $MISSING_DEPENDENCY ;;
47567      pkgutil)
47568        pkgutil_help $MISSING_DEPENDENCY ;;
47569      pkgadd)
47570        pkgadd_help  $MISSING_DEPENDENCY ;;
47571    esac
47572
47573    if test "x$PKGHANDLER_COMMAND" != x; then
47574      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47575    fi
47576  fi
47577
47578      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
47579    fi
47580
47581    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
47582    # defined in libawt_xawt.
47583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
47584$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
47585    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47586/* end confdefs.h.  */
47587#include <X11/extensions/Xrender.h>
47588int
47589main ()
47590{
47591XLinearGradient x;
47592  ;
47593  return 0;
47594}
47595_ACEOF
47596if ac_fn_c_try_compile "$LINENO"; then :
47597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47598$as_echo "yes" >&6; }
47599else
47600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47601$as_echo "no" >&6; }
47602         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
47603fi
47604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47605
47606    CFLAGS="$OLD_CFLAGS"
47607    ac_ext=cpp
47608ac_cpp='$CXXCPP $CPPFLAGS'
47609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47612
47613  fi # NEEDS_LIB_X11
47614
47615
47616
47617
47618
47619
47620# Check whether --with-cups was given.
47621if test "${with_cups+set}" = set; then :
47622  withval=$with_cups;
47623fi
47624
47625
47626# Check whether --with-cups-include was given.
47627if test "${with_cups_include+set}" = set; then :
47628  withval=$with_cups_include;
47629fi
47630
47631
47632  if test "x$NEEDS_LIB_CUPS" = xfalse; then
47633    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
47634      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
47635$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
47636    fi
47637    CUPS_CFLAGS=
47638  else
47639    CUPS_FOUND=no
47640
47641    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
47642      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
47643    fi
47644
47645    if test "x${with_cups}" != x; then
47646      CUPS_CFLAGS="-I${with_cups}/include"
47647      CUPS_FOUND=yes
47648    fi
47649    if test "x${with_cups_include}" != x; then
47650      CUPS_CFLAGS="-I${with_cups_include}"
47651      CUPS_FOUND=yes
47652    fi
47653    if test "x$CUPS_FOUND" = xno; then
47654      # Are the cups headers installed in the default /usr/include location?
47655      for ac_header in cups/cups.h cups/ppd.h
47656do :
47657  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47658ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
47659if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47660  cat >>confdefs.h <<_ACEOF
47661#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47662_ACEOF
47663
47664          CUPS_FOUND=yes
47665          CUPS_CFLAGS=
47666          DEFAULT_CUPS=yes
47667
47668fi
47669
47670done
47671
47672    fi
47673    if test "x$CUPS_FOUND" = xno; then
47674      # Getting nervous now? Lets poke around for standard Solaris third-party
47675      # package installation locations.
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
47677$as_echo_n "checking for cups headers... " >&6; }
47678      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
47679        # An SFW package seems to be installed!
47680        CUPS_FOUND=yes
47681        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
47682      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
47683        # A CSW package seems to be installed!
47684        CUPS_FOUND=yes
47685        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
47686      fi
47687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
47688$as_echo "$CUPS_FOUND" >&6; }
47689    fi
47690    if test "x$CUPS_FOUND" = xno; then
47691
47692  # Print a helpful message on how to acquire the necessary build dependency.
47693  # cups is the help tag: freetype, cups, alsa etc
47694  MISSING_DEPENDENCY=cups
47695
47696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47697    cygwin_help $MISSING_DEPENDENCY
47698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47699    msys_help $MISSING_DEPENDENCY
47700  else
47701    PKGHANDLER_COMMAND=
47702
47703    case $PKGHANDLER in
47704      apt-get)
47705        apt_help     $MISSING_DEPENDENCY ;;
47706      yum)
47707        yum_help     $MISSING_DEPENDENCY ;;
47708      port)
47709        port_help    $MISSING_DEPENDENCY ;;
47710      pkgutil)
47711        pkgutil_help $MISSING_DEPENDENCY ;;
47712      pkgadd)
47713        pkgadd_help  $MISSING_DEPENDENCY ;;
47714    esac
47715
47716    if test "x$PKGHANDLER_COMMAND" != x; then
47717      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47718    fi
47719  fi
47720
47721      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
47722    fi
47723  fi
47724
47725
47726
47727
47728
47729# Check whether --with-freetype was given.
47730if test "${with_freetype+set}" = set; then :
47731  withval=$with_freetype;
47732fi
47733
47734
47735# Check whether --with-freetype-include was given.
47736if test "${with_freetype_include+set}" = set; then :
47737  withval=$with_freetype_include;
47738fi
47739
47740
47741# Check whether --with-freetype-lib was given.
47742if test "${with_freetype_lib+set}" = set; then :
47743  withval=$with_freetype_lib;
47744fi
47745
47746
47747# Check whether --with-freetype-src was given.
47748if test "${with_freetype_src+set}" = set; then :
47749  withval=$with_freetype_src;
47750fi
47751
47752  # Check whether --enable-freetype-bundling was given.
47753if test "${enable_freetype_bundling+set}" = set; then :
47754  enableval=$enable_freetype_bundling;
47755fi
47756
47757
47758  # Need to specify explicitly since it needs to be overridden on some versions of macosx
47759  FREETYPE_BASE_NAME=freetype
47760  FREETYPE_CFLAGS=
47761  FREETYPE_LIBS=
47762  FREETYPE_BUNDLE_LIB_PATH=
47763
47764  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
47765    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
47766      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
47767$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
47768    fi
47769    if test "x$enable_freetype_bundling" != x; then
47770      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
47771$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
47772    fi
47773  else
47774    # freetype is needed to build; go get it!
47775
47776    BUNDLE_FREETYPE="$enable_freetype_bundling"
47777
47778    if  test "x$with_freetype_src" != x; then
47779      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47780        # Try to build freetype if --with-freetype-src was given on Windows
47781
47782  FREETYPE_SRC_PATH="$with_freetype_src"
47783  BUILD_FREETYPE=yes
47784
47785  # Check if the freetype sources are acessible..
47786  if ! test -d $FREETYPE_SRC_PATH; then
47787    { $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
47788$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
47789    BUILD_FREETYPE=no
47790  fi
47791  # ..and contain a vc2010 project file
47792  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
47793  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
47794    { $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
47795$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
47796    BUILD_FREETYPE=no
47797  fi
47798  # Now check if configure found a version of 'msbuild.exe'
47799  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
47800    { $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
47801$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;}
47802    BUILD_FREETYPE=no
47803  fi
47804
47805  # Ready to go..
47806  if test "x$BUILD_FREETYPE" = xyes; then
47807    # msbuild requires trailing slashes for output directories
47808    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
47809    freetype_lib_path_unix="$freetype_lib_path"
47810    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
47811
47812  unix_path="$vcxproj_path"
47813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47814    windows_path=`$CYGPATH -m "$unix_path"`
47815    vcxproj_path="$windows_path"
47816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47817    windows_path=`cmd //c echo $unix_path`
47818    vcxproj_path="$windows_path"
47819  fi
47820
47821
47822  unix_path="$freetype_lib_path"
47823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47824    windows_path=`$CYGPATH -m "$unix_path"`
47825    freetype_lib_path="$windows_path"
47826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47827    windows_path=`cmd //c echo $unix_path`
47828    freetype_lib_path="$windows_path"
47829  fi
47830
47831
47832  unix_path="$freetype_obj_path"
47833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47834    windows_path=`$CYGPATH -m "$unix_path"`
47835    freetype_obj_path="$windows_path"
47836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47837    windows_path=`cmd //c echo $unix_path`
47838    freetype_obj_path="$windows_path"
47839  fi
47840
47841    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47842      freetype_platform=x64
47843    else
47844      freetype_platform=win32
47845    fi
47846
47847    # The original freetype project file is for VS 2010 (i.e. 'v100'),
47848    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
47849    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
47850    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
47851    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
47852$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
47853
47854    # First we try to build the freetype.dll
47855    $ECHO -e "@echo off\n"\
47856        "$MSBUILD $vcxproj_path "\
47857        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
47858        "/p:Configuration=\"Release Multithreaded\" "\
47859        "/p:Platform=$freetype_platform "\
47860        "/p:ConfigurationType=DynamicLibrary "\
47861        "/p:TargetName=freetype "\
47862        "/p:OutDir=\"$freetype_lib_path\" "\
47863        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
47864    cmd /c freetype.bat
47865
47866    if test -s "$freetype_lib_path_unix/freetype.dll"; then
47867      # If that succeeds we also build freetype.lib
47868      $ECHO -e "@echo off\n"\
47869          "$MSBUILD $vcxproj_path "\
47870          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
47871          "/p:Configuration=\"Release Multithreaded\" "\
47872          "/p:Platform=$freetype_platform "\
47873          "/p:ConfigurationType=StaticLibrary "\
47874          "/p:TargetName=freetype "\
47875          "/p:OutDir=\"$freetype_lib_path\" "\
47876          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
47877      cmd /c freetype.bat
47878
47879      if test -s "$freetype_lib_path_unix/freetype.lib"; then
47880        # Once we build both, lib and dll, set freetype lib and include path appropriately
47881        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
47882        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
47883        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
47884$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
47885      else
47886        BUILD_FREETYPE=no
47887      fi
47888    else
47889      BUILD_FREETYPE=no
47890    fi
47891  fi
47892
47893        if test "x$BUILD_FREETYPE" = xyes; then
47894          # Okay, we built it. Check that it works.
47895
47896  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47897  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47898  METHOD="--with-freetype-src"
47899
47900  # Let's start with an optimistic view of the world :-)
47901  FOUND_FREETYPE=yes
47902
47903  # First look for the canonical freetype main include file ft2build.h.
47904  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47905    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47906    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47907    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47908      # Fail.
47909      FOUND_FREETYPE=no
47910    fi
47911  fi
47912
47913  if test "x$FOUND_FREETYPE" = xyes; then
47914    # Include file found, let's continue the sanity check.
47915    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47916$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47917
47918    # Reset to default value
47919    FREETYPE_BASE_NAME=freetype
47920    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47921    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47922      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47923          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47924        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47925        # for the .6 version explicitly.
47926        FREETYPE_BASE_NAME=freetype.6
47927        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47928        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47929$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47930      else
47931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47932$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47933        FOUND_FREETYPE=no
47934      fi
47935    else
47936      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47937        # On Windows, we will need both .lib and .dll file.
47938        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47939          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47940$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47941          FOUND_FREETYPE=no
47942        fi
47943      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47944          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47945        # Found lib in isa dir, use that instead.
47946        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47947        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47948$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47949      fi
47950    fi
47951  fi
47952
47953  if test "x$FOUND_FREETYPE" = xyes; then
47954
47955  # Only process if variable expands to non-empty
47956
47957  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47959
47960  # Input might be given as Windows format, start by converting to
47961  # unix format.
47962  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47963  new_path=`$CYGPATH -u "$path"`
47964
47965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47968  # "foo.exe" is OK but "foo" is an error.
47969  #
47970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47971  # It is also a way to make sure we got the proper file name for the real test later on.
47972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47973  if test "x$test_shortpath" = x; then
47974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47976    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47977  fi
47978
47979  # Call helper function which possibly converts this using DOS-style short mode.
47980  # If so, the updated path is stored in $new_path.
47981
47982  input_path="$new_path"
47983  # Check if we need to convert this using DOS-style short mode. If the path
47984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47985  # take no chances and rewrite it.
47986  # Note: m4 eats our [], so we need to use [ and ] instead.
47987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47988  if test "x$has_forbidden_chars" != x; then
47989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47993      # Going to short mode and back again did indeed matter. Since short mode is
47994      # case insensitive, let's make it lowercase to improve readability.
47995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47996      # Now convert it back to Unix-style (cygpath)
47997      input_path=`$CYGPATH -u "$shortmode_path"`
47998      new_path="$input_path"
47999    fi
48000  fi
48001
48002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48003  if test "x$test_cygdrive_prefix" = x; then
48004    # As a simple fix, exclude /usr/bin since it's not a real path.
48005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48007      # a path prefixed by /cygdrive for fixpath to work.
48008      new_path="$CYGWIN_ROOT_PATH$input_path"
48009    fi
48010  fi
48011
48012
48013  if test "x$path" != "x$new_path"; then
48014    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48016$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48017  fi
48018
48019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48020
48021  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48022  has_colon=`$ECHO $path | $GREP ^.:`
48023  new_path="$path"
48024  if test "x$has_colon" = x; then
48025    # Not in mixed or Windows style, start by that.
48026    new_path=`cmd //c echo $path`
48027  fi
48028
48029
48030  input_path="$new_path"
48031  # Check if we need to convert this using DOS-style short mode. If the path
48032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48033  # take no chances and rewrite it.
48034  # Note: m4 eats our [], so we need to use [ and ] instead.
48035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48036  if test "x$has_forbidden_chars" != x; then
48037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48039  fi
48040
48041
48042  windows_path="$new_path"
48043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48044    unix_path=`$CYGPATH -u "$windows_path"`
48045    new_path="$unix_path"
48046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48048    new_path="$unix_path"
48049  fi
48050
48051  if test "x$path" != "x$new_path"; then
48052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48055  fi
48056
48057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48059
48060    else
48061      # We're on a unix platform. Hooray! :)
48062      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48063      has_space=`$ECHO "$path" | $GREP " "`
48064      if test "x$has_space" != x; then
48065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48067        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48068      fi
48069
48070      # Use eval to expand a potential ~
48071      eval path="$path"
48072      if test ! -f "$path" && test ! -d "$path"; then
48073        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48074      fi
48075
48076      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48077    fi
48078  fi
48079
48080
48081  # Only process if variable expands to non-empty
48082
48083  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48085
48086  # Input might be given as Windows format, start by converting to
48087  # unix format.
48088  path="$POTENTIAL_FREETYPE_LIB_PATH"
48089  new_path=`$CYGPATH -u "$path"`
48090
48091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48094  # "foo.exe" is OK but "foo" is an error.
48095  #
48096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48097  # It is also a way to make sure we got the proper file name for the real test later on.
48098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48099  if test "x$test_shortpath" = x; then
48100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48102    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48103  fi
48104
48105  # Call helper function which possibly converts this using DOS-style short mode.
48106  # If so, the updated path is stored in $new_path.
48107
48108  input_path="$new_path"
48109  # Check if we need to convert this using DOS-style short mode. If the path
48110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48111  # take no chances and rewrite it.
48112  # Note: m4 eats our [], so we need to use [ and ] instead.
48113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48114  if test "x$has_forbidden_chars" != x; then
48115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48119      # Going to short mode and back again did indeed matter. Since short mode is
48120      # case insensitive, let's make it lowercase to improve readability.
48121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48122      # Now convert it back to Unix-style (cygpath)
48123      input_path=`$CYGPATH -u "$shortmode_path"`
48124      new_path="$input_path"
48125    fi
48126  fi
48127
48128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48129  if test "x$test_cygdrive_prefix" = x; then
48130    # As a simple fix, exclude /usr/bin since it's not a real path.
48131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48133      # a path prefixed by /cygdrive for fixpath to work.
48134      new_path="$CYGWIN_ROOT_PATH$input_path"
48135    fi
48136  fi
48137
48138
48139  if test "x$path" != "x$new_path"; then
48140    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48143  fi
48144
48145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48146
48147  path="$POTENTIAL_FREETYPE_LIB_PATH"
48148  has_colon=`$ECHO $path | $GREP ^.:`
48149  new_path="$path"
48150  if test "x$has_colon" = x; then
48151    # Not in mixed or Windows style, start by that.
48152    new_path=`cmd //c echo $path`
48153  fi
48154
48155
48156  input_path="$new_path"
48157  # Check if we need to convert this using DOS-style short mode. If the path
48158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48159  # take no chances and rewrite it.
48160  # Note: m4 eats our [], so we need to use [ and ] instead.
48161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48162  if test "x$has_forbidden_chars" != x; then
48163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48165  fi
48166
48167
48168  windows_path="$new_path"
48169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48170    unix_path=`$CYGPATH -u "$windows_path"`
48171    new_path="$unix_path"
48172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48174    new_path="$unix_path"
48175  fi
48176
48177  if test "x$path" != "x$new_path"; then
48178    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48181  fi
48182
48183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48185
48186    else
48187      # We're on a unix platform. Hooray! :)
48188      path="$POTENTIAL_FREETYPE_LIB_PATH"
48189      has_space=`$ECHO "$path" | $GREP " "`
48190      if test "x$has_space" != x; then
48191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48193        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48194      fi
48195
48196      # Use eval to expand a potential ~
48197      eval path="$path"
48198      if test ! -f "$path" && test ! -d "$path"; then
48199        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48200      fi
48201
48202      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48203    fi
48204  fi
48205
48206
48207    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48209$as_echo_n "checking for freetype includes... " >&6; }
48210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48211$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48212    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48214$as_echo_n "checking for freetype libraries... " >&6; }
48215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48216$as_echo "$FREETYPE_LIB_PATH" >&6; }
48217  fi
48218
48219          if test "x$FOUND_FREETYPE" != xyes; then
48220            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
48221          fi
48222        else
48223          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
48224$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
48225          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
48226        fi
48227      else
48228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
48229$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
48230      fi
48231    fi
48232
48233    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
48234      # User has specified settings
48235
48236      if test "x$BUNDLE_FREETYPE" = x; then
48237        # If not specified, default is to bundle freetype
48238        BUNDLE_FREETYPE=yes
48239      fi
48240
48241      if test "x$with_freetype" != x; then
48242        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
48243        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
48244      fi
48245
48246      # Allow --with-freetype-lib and --with-freetype-include to override
48247      if test "x$with_freetype_include" != x; then
48248        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
48249      fi
48250      if test "x$with_freetype_lib" != x; then
48251        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
48252      fi
48253
48254      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48255        # Okay, we got it. Check that it works.
48256
48257  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48258  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48259  METHOD="--with-freetype"
48260
48261  # Let's start with an optimistic view of the world :-)
48262  FOUND_FREETYPE=yes
48263
48264  # First look for the canonical freetype main include file ft2build.h.
48265  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48266    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48267    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48268    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48269      # Fail.
48270      FOUND_FREETYPE=no
48271    fi
48272  fi
48273
48274  if test "x$FOUND_FREETYPE" = xyes; then
48275    # Include file found, let's continue the sanity check.
48276    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48277$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48278
48279    # Reset to default value
48280    FREETYPE_BASE_NAME=freetype
48281    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48282    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48283      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48284          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48285        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48286        # for the .6 version explicitly.
48287        FREETYPE_BASE_NAME=freetype.6
48288        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48289        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48290$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48291      else
48292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48293$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48294        FOUND_FREETYPE=no
48295      fi
48296    else
48297      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48298        # On Windows, we will need both .lib and .dll file.
48299        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48300          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48301$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48302          FOUND_FREETYPE=no
48303        fi
48304      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48305          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48306        # Found lib in isa dir, use that instead.
48307        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48308        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48309$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48310      fi
48311    fi
48312  fi
48313
48314  if test "x$FOUND_FREETYPE" = xyes; then
48315
48316  # Only process if variable expands to non-empty
48317
48318  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48320
48321  # Input might be given as Windows format, start by converting to
48322  # unix format.
48323  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48324  new_path=`$CYGPATH -u "$path"`
48325
48326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48329  # "foo.exe" is OK but "foo" is an error.
48330  #
48331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48332  # It is also a way to make sure we got the proper file name for the real test later on.
48333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48334  if test "x$test_shortpath" = x; then
48335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48338  fi
48339
48340  # Call helper function which possibly converts this using DOS-style short mode.
48341  # If so, the updated path is stored in $new_path.
48342
48343  input_path="$new_path"
48344  # Check if we need to convert this using DOS-style short mode. If the path
48345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48346  # take no chances and rewrite it.
48347  # Note: m4 eats our [], so we need to use [ and ] instead.
48348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48349  if test "x$has_forbidden_chars" != x; then
48350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48354      # Going to short mode and back again did indeed matter. Since short mode is
48355      # case insensitive, let's make it lowercase to improve readability.
48356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48357      # Now convert it back to Unix-style (cygpath)
48358      input_path=`$CYGPATH -u "$shortmode_path"`
48359      new_path="$input_path"
48360    fi
48361  fi
48362
48363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48364  if test "x$test_cygdrive_prefix" = x; then
48365    # As a simple fix, exclude /usr/bin since it's not a real path.
48366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48368      # a path prefixed by /cygdrive for fixpath to work.
48369      new_path="$CYGWIN_ROOT_PATH$input_path"
48370    fi
48371  fi
48372
48373
48374  if test "x$path" != "x$new_path"; then
48375    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48378  fi
48379
48380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48381
48382  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48383  has_colon=`$ECHO $path | $GREP ^.:`
48384  new_path="$path"
48385  if test "x$has_colon" = x; then
48386    # Not in mixed or Windows style, start by that.
48387    new_path=`cmd //c echo $path`
48388  fi
48389
48390
48391  input_path="$new_path"
48392  # Check if we need to convert this using DOS-style short mode. If the path
48393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48394  # take no chances and rewrite it.
48395  # Note: m4 eats our [], so we need to use [ and ] instead.
48396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48397  if test "x$has_forbidden_chars" != x; then
48398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48400  fi
48401
48402
48403  windows_path="$new_path"
48404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48405    unix_path=`$CYGPATH -u "$windows_path"`
48406    new_path="$unix_path"
48407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48409    new_path="$unix_path"
48410  fi
48411
48412  if test "x$path" != "x$new_path"; then
48413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48416  fi
48417
48418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48420
48421    else
48422      # We're on a unix platform. Hooray! :)
48423      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48424      has_space=`$ECHO "$path" | $GREP " "`
48425      if test "x$has_space" != x; then
48426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48429      fi
48430
48431      # Use eval to expand a potential ~
48432      eval path="$path"
48433      if test ! -f "$path" && test ! -d "$path"; then
48434        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48435      fi
48436
48437      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48438    fi
48439  fi
48440
48441
48442  # Only process if variable expands to non-empty
48443
48444  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48446
48447  # Input might be given as Windows format, start by converting to
48448  # unix format.
48449  path="$POTENTIAL_FREETYPE_LIB_PATH"
48450  new_path=`$CYGPATH -u "$path"`
48451
48452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48455  # "foo.exe" is OK but "foo" is an error.
48456  #
48457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48458  # It is also a way to make sure we got the proper file name for the real test later on.
48459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48460  if test "x$test_shortpath" = x; then
48461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48463    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48464  fi
48465
48466  # Call helper function which possibly converts this using DOS-style short mode.
48467  # If so, the updated path is stored in $new_path.
48468
48469  input_path="$new_path"
48470  # Check if we need to convert this using DOS-style short mode. If the path
48471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48472  # take no chances and rewrite it.
48473  # Note: m4 eats our [], so we need to use [ and ] instead.
48474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48475  if test "x$has_forbidden_chars" != x; then
48476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48480      # Going to short mode and back again did indeed matter. Since short mode is
48481      # case insensitive, let's make it lowercase to improve readability.
48482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48483      # Now convert it back to Unix-style (cygpath)
48484      input_path=`$CYGPATH -u "$shortmode_path"`
48485      new_path="$input_path"
48486    fi
48487  fi
48488
48489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48490  if test "x$test_cygdrive_prefix" = x; then
48491    # As a simple fix, exclude /usr/bin since it's not a real path.
48492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48494      # a path prefixed by /cygdrive for fixpath to work.
48495      new_path="$CYGWIN_ROOT_PATH$input_path"
48496    fi
48497  fi
48498
48499
48500  if test "x$path" != "x$new_path"; then
48501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48504  fi
48505
48506    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48507
48508  path="$POTENTIAL_FREETYPE_LIB_PATH"
48509  has_colon=`$ECHO $path | $GREP ^.:`
48510  new_path="$path"
48511  if test "x$has_colon" = x; then
48512    # Not in mixed or Windows style, start by that.
48513    new_path=`cmd //c echo $path`
48514  fi
48515
48516
48517  input_path="$new_path"
48518  # Check if we need to convert this using DOS-style short mode. If the path
48519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48520  # take no chances and rewrite it.
48521  # Note: m4 eats our [], so we need to use [ and ] instead.
48522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48523  if test "x$has_forbidden_chars" != x; then
48524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48526  fi
48527
48528
48529  windows_path="$new_path"
48530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48531    unix_path=`$CYGPATH -u "$windows_path"`
48532    new_path="$unix_path"
48533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48535    new_path="$unix_path"
48536  fi
48537
48538  if test "x$path" != "x$new_path"; then
48539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48542  fi
48543
48544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48546
48547    else
48548      # We're on a unix platform. Hooray! :)
48549      path="$POTENTIAL_FREETYPE_LIB_PATH"
48550      has_space=`$ECHO "$path" | $GREP " "`
48551      if test "x$has_space" != x; then
48552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48554        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48555      fi
48556
48557      # Use eval to expand a potential ~
48558      eval path="$path"
48559      if test ! -f "$path" && test ! -d "$path"; then
48560        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48561      fi
48562
48563      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48564    fi
48565  fi
48566
48567
48568    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48570$as_echo_n "checking for freetype includes... " >&6; }
48571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48572$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48573    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48575$as_echo_n "checking for freetype libraries... " >&6; }
48576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48577$as_echo "$FREETYPE_LIB_PATH" >&6; }
48578  fi
48579
48580        if test "x$FOUND_FREETYPE" != xyes; then
48581          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
48582        fi
48583      else
48584        # User specified only one of lib or include. This is an error.
48585        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
48586          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
48587$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
48588          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48589        else
48590          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
48591$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
48592          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48593        fi
48594      fi
48595    else
48596      # User did not specify settings, but we need freetype. Try to locate it.
48597
48598      if test "x$BUNDLE_FREETYPE" = x; then
48599        # If not specified, default is to bundle freetype only on windows
48600        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48601          BUNDLE_FREETYPE=yes
48602        else
48603          BUNDLE_FREETYPE=no
48604        fi
48605      fi
48606
48607      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
48608      if test "x$SYSROOT" = x; then
48609        if test "x$FOUND_FREETYPE" != xyes; then
48610          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
48611          if test "x$PKG_CONFIG" != x; then
48612
48613pkg_failed=no
48614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
48615$as_echo_n "checking for FREETYPE... " >&6; }
48616
48617if test -n "$FREETYPE_CFLAGS"; then
48618    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
48619 elif test -n "$PKG_CONFIG"; then
48620    if test -n "$PKG_CONFIG" && \
48621    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48622  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48623  ac_status=$?
48624  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48625  test $ac_status = 0; }; then
48626  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
48627else
48628  pkg_failed=yes
48629fi
48630 else
48631    pkg_failed=untried
48632fi
48633if test -n "$FREETYPE_LIBS"; then
48634    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
48635 elif test -n "$PKG_CONFIG"; then
48636    if test -n "$PKG_CONFIG" && \
48637    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48638  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48639  ac_status=$?
48640  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48641  test $ac_status = 0; }; then
48642  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
48643else
48644  pkg_failed=yes
48645fi
48646 else
48647    pkg_failed=untried
48648fi
48649
48650
48651
48652if test $pkg_failed = yes; then
48653
48654if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48655        _pkg_short_errors_supported=yes
48656else
48657        _pkg_short_errors_supported=no
48658fi
48659        if test $_pkg_short_errors_supported = yes; then
48660	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
48661        else
48662	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
48663        fi
48664	# Put the nasty error message in config.log where it belongs
48665	echo "$FREETYPE_PKG_ERRORS" >&5
48666
48667	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48668$as_echo "no" >&6; }
48669                FOUND_FREETYPE=no
48670elif test $pkg_failed = untried; then
48671	FOUND_FREETYPE=no
48672else
48673	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
48674	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
48675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48676$as_echo "yes" >&6; }
48677	FOUND_FREETYPE=yes
48678fi
48679            if test "x$FOUND_FREETYPE" = xyes; then
48680              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
48681              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
48682              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
48683              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48684                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
48685              fi
48686              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
48687              if test "x$BUNDLE_FREETYPE" = xyes; then
48688                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
48689$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
48690                FOUND_FREETYPE=no
48691              else
48692                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
48693$as_echo_n "checking for freetype... " >&6; }
48694                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
48695$as_echo "yes (using pkg-config)" >&6; }
48696              fi
48697            fi
48698          fi
48699        fi
48700      fi
48701
48702      if test "x$FOUND_FREETYPE" != xyes; then
48703        # Check in well-known locations
48704        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48705          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
48706
48707  windows_path="$FREETYPE_BASE_DIR"
48708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48709    unix_path=`$CYGPATH -u "$windows_path"`
48710    FREETYPE_BASE_DIR="$unix_path"
48711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48713    FREETYPE_BASE_DIR="$unix_path"
48714  fi
48715
48716
48717  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48718  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
48719  METHOD="well-known location"
48720
48721  # Let's start with an optimistic view of the world :-)
48722  FOUND_FREETYPE=yes
48723
48724  # First look for the canonical freetype main include file ft2build.h.
48725  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48726    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48727    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48728    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48729      # Fail.
48730      FOUND_FREETYPE=no
48731    fi
48732  fi
48733
48734  if test "x$FOUND_FREETYPE" = xyes; then
48735    # Include file found, let's continue the sanity check.
48736    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48737$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48738
48739    # Reset to default value
48740    FREETYPE_BASE_NAME=freetype
48741    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48742    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48743      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48744          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48745        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48746        # for the .6 version explicitly.
48747        FREETYPE_BASE_NAME=freetype.6
48748        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48749        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48750$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48751      else
48752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48754        FOUND_FREETYPE=no
48755      fi
48756    else
48757      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48758        # On Windows, we will need both .lib and .dll file.
48759        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48760          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48761$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48762          FOUND_FREETYPE=no
48763        fi
48764      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48765          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48766        # Found lib in isa dir, use that instead.
48767        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48768        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48769$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48770      fi
48771    fi
48772  fi
48773
48774  if test "x$FOUND_FREETYPE" = xyes; then
48775
48776  # Only process if variable expands to non-empty
48777
48778  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48780
48781  # Input might be given as Windows format, start by converting to
48782  # unix format.
48783  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48784  new_path=`$CYGPATH -u "$path"`
48785
48786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48789  # "foo.exe" is OK but "foo" is an error.
48790  #
48791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48792  # It is also a way to make sure we got the proper file name for the real test later on.
48793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48794  if test "x$test_shortpath" = x; then
48795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48797    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48798  fi
48799
48800  # Call helper function which possibly converts this using DOS-style short mode.
48801  # If so, the updated path is stored in $new_path.
48802
48803  input_path="$new_path"
48804  # Check if we need to convert this using DOS-style short mode. If the path
48805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48806  # take no chances and rewrite it.
48807  # Note: m4 eats our [], so we need to use [ and ] instead.
48808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48809  if test "x$has_forbidden_chars" != x; then
48810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48814      # Going to short mode and back again did indeed matter. Since short mode is
48815      # case insensitive, let's make it lowercase to improve readability.
48816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48817      # Now convert it back to Unix-style (cygpath)
48818      input_path=`$CYGPATH -u "$shortmode_path"`
48819      new_path="$input_path"
48820    fi
48821  fi
48822
48823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48824  if test "x$test_cygdrive_prefix" = x; then
48825    # As a simple fix, exclude /usr/bin since it's not a real path.
48826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48828      # a path prefixed by /cygdrive for fixpath to work.
48829      new_path="$CYGWIN_ROOT_PATH$input_path"
48830    fi
48831  fi
48832
48833
48834  if test "x$path" != "x$new_path"; then
48835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48838  fi
48839
48840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48841
48842  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48843  has_colon=`$ECHO $path | $GREP ^.:`
48844  new_path="$path"
48845  if test "x$has_colon" = x; then
48846    # Not in mixed or Windows style, start by that.
48847    new_path=`cmd //c echo $path`
48848  fi
48849
48850
48851  input_path="$new_path"
48852  # Check if we need to convert this using DOS-style short mode. If the path
48853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48854  # take no chances and rewrite it.
48855  # Note: m4 eats our [], so we need to use [ and ] instead.
48856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48857  if test "x$has_forbidden_chars" != x; then
48858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48860  fi
48861
48862
48863  windows_path="$new_path"
48864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48865    unix_path=`$CYGPATH -u "$windows_path"`
48866    new_path="$unix_path"
48867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48869    new_path="$unix_path"
48870  fi
48871
48872  if test "x$path" != "x$new_path"; then
48873    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48876  fi
48877
48878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48880
48881    else
48882      # We're on a unix platform. Hooray! :)
48883      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48884      has_space=`$ECHO "$path" | $GREP " "`
48885      if test "x$has_space" != x; then
48886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48889      fi
48890
48891      # Use eval to expand a potential ~
48892      eval path="$path"
48893      if test ! -f "$path" && test ! -d "$path"; then
48894        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48895      fi
48896
48897      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48898    fi
48899  fi
48900
48901
48902  # Only process if variable expands to non-empty
48903
48904  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48906
48907  # Input might be given as Windows format, start by converting to
48908  # unix format.
48909  path="$POTENTIAL_FREETYPE_LIB_PATH"
48910  new_path=`$CYGPATH -u "$path"`
48911
48912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48915  # "foo.exe" is OK but "foo" is an error.
48916  #
48917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48918  # It is also a way to make sure we got the proper file name for the real test later on.
48919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48920  if test "x$test_shortpath" = x; then
48921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48923    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48924  fi
48925
48926  # Call helper function which possibly converts this using DOS-style short mode.
48927  # If so, the updated path is stored in $new_path.
48928
48929  input_path="$new_path"
48930  # Check if we need to convert this using DOS-style short mode. If the path
48931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48932  # take no chances and rewrite it.
48933  # Note: m4 eats our [], so we need to use [ and ] instead.
48934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48935  if test "x$has_forbidden_chars" != x; then
48936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48940      # Going to short mode and back again did indeed matter. Since short mode is
48941      # case insensitive, let's make it lowercase to improve readability.
48942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48943      # Now convert it back to Unix-style (cygpath)
48944      input_path=`$CYGPATH -u "$shortmode_path"`
48945      new_path="$input_path"
48946    fi
48947  fi
48948
48949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48950  if test "x$test_cygdrive_prefix" = x; then
48951    # As a simple fix, exclude /usr/bin since it's not a real path.
48952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48954      # a path prefixed by /cygdrive for fixpath to work.
48955      new_path="$CYGWIN_ROOT_PATH$input_path"
48956    fi
48957  fi
48958
48959
48960  if test "x$path" != "x$new_path"; then
48961    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48964  fi
48965
48966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48967
48968  path="$POTENTIAL_FREETYPE_LIB_PATH"
48969  has_colon=`$ECHO $path | $GREP ^.:`
48970  new_path="$path"
48971  if test "x$has_colon" = x; then
48972    # Not in mixed or Windows style, start by that.
48973    new_path=`cmd //c echo $path`
48974  fi
48975
48976
48977  input_path="$new_path"
48978  # Check if we need to convert this using DOS-style short mode. If the path
48979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48980  # take no chances and rewrite it.
48981  # Note: m4 eats our [], so we need to use [ and ] instead.
48982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48983  if test "x$has_forbidden_chars" != x; then
48984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48986  fi
48987
48988
48989  windows_path="$new_path"
48990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48991    unix_path=`$CYGPATH -u "$windows_path"`
48992    new_path="$unix_path"
48993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48995    new_path="$unix_path"
48996  fi
48997
48998  if test "x$path" != "x$new_path"; then
48999    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49002  fi
49003
49004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49006
49007    else
49008      # We're on a unix platform. Hooray! :)
49009      path="$POTENTIAL_FREETYPE_LIB_PATH"
49010      has_space=`$ECHO "$path" | $GREP " "`
49011      if test "x$has_space" != x; then
49012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49015      fi
49016
49017      # Use eval to expand a potential ~
49018      eval path="$path"
49019      if test ! -f "$path" && test ! -d "$path"; then
49020        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49021      fi
49022
49023      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49024    fi
49025  fi
49026
49027
49028    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49030$as_echo_n "checking for freetype includes... " >&6; }
49031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49032$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49033    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49035$as_echo_n "checking for freetype libraries... " >&6; }
49036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49037$as_echo "$FREETYPE_LIB_PATH" >&6; }
49038  fi
49039
49040          if test "x$FOUND_FREETYPE" != xyes; then
49041            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
49042
49043  windows_path="$FREETYPE_BASE_DIR"
49044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49045    unix_path=`$CYGPATH -u "$windows_path"`
49046    FREETYPE_BASE_DIR="$unix_path"
49047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49049    FREETYPE_BASE_DIR="$unix_path"
49050  fi
49051
49052
49053  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49054  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49055  METHOD="well-known location"
49056
49057  # Let's start with an optimistic view of the world :-)
49058  FOUND_FREETYPE=yes
49059
49060  # First look for the canonical freetype main include file ft2build.h.
49061  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49062    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49063    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49064    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49065      # Fail.
49066      FOUND_FREETYPE=no
49067    fi
49068  fi
49069
49070  if test "x$FOUND_FREETYPE" = xyes; then
49071    # Include file found, let's continue the sanity check.
49072    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49073$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49074
49075    # Reset to default value
49076    FREETYPE_BASE_NAME=freetype
49077    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49078    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49079      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49080          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49081        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49082        # for the .6 version explicitly.
49083        FREETYPE_BASE_NAME=freetype.6
49084        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49085        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49086$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49087      else
49088        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49089$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49090        FOUND_FREETYPE=no
49091      fi
49092    else
49093      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49094        # On Windows, we will need both .lib and .dll file.
49095        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49096          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49097$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49098          FOUND_FREETYPE=no
49099        fi
49100      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49101          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49102        # Found lib in isa dir, use that instead.
49103        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49104        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49105$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49106      fi
49107    fi
49108  fi
49109
49110  if test "x$FOUND_FREETYPE" = xyes; then
49111
49112  # Only process if variable expands to non-empty
49113
49114  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49116
49117  # Input might be given as Windows format, start by converting to
49118  # unix format.
49119  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49120  new_path=`$CYGPATH -u "$path"`
49121
49122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49125  # "foo.exe" is OK but "foo" is an error.
49126  #
49127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49128  # It is also a way to make sure we got the proper file name for the real test later on.
49129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49130  if test "x$test_shortpath" = x; then
49131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49133    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49134  fi
49135
49136  # Call helper function which possibly converts this using DOS-style short mode.
49137  # If so, the updated path is stored in $new_path.
49138
49139  input_path="$new_path"
49140  # Check if we need to convert this using DOS-style short mode. If the path
49141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49142  # take no chances and rewrite it.
49143  # Note: m4 eats our [], so we need to use [ and ] instead.
49144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49145  if test "x$has_forbidden_chars" != x; then
49146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49150      # Going to short mode and back again did indeed matter. Since short mode is
49151      # case insensitive, let's make it lowercase to improve readability.
49152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49153      # Now convert it back to Unix-style (cygpath)
49154      input_path=`$CYGPATH -u "$shortmode_path"`
49155      new_path="$input_path"
49156    fi
49157  fi
49158
49159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49160  if test "x$test_cygdrive_prefix" = x; then
49161    # As a simple fix, exclude /usr/bin since it's not a real path.
49162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49164      # a path prefixed by /cygdrive for fixpath to work.
49165      new_path="$CYGWIN_ROOT_PATH$input_path"
49166    fi
49167  fi
49168
49169
49170  if test "x$path" != "x$new_path"; then
49171    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49174  fi
49175
49176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49177
49178  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49179  has_colon=`$ECHO $path | $GREP ^.:`
49180  new_path="$path"
49181  if test "x$has_colon" = x; then
49182    # Not in mixed or Windows style, start by that.
49183    new_path=`cmd //c echo $path`
49184  fi
49185
49186
49187  input_path="$new_path"
49188  # Check if we need to convert this using DOS-style short mode. If the path
49189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49190  # take no chances and rewrite it.
49191  # Note: m4 eats our [], so we need to use [ and ] instead.
49192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49193  if test "x$has_forbidden_chars" != x; then
49194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49196  fi
49197
49198
49199  windows_path="$new_path"
49200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49201    unix_path=`$CYGPATH -u "$windows_path"`
49202    new_path="$unix_path"
49203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49205    new_path="$unix_path"
49206  fi
49207
49208  if test "x$path" != "x$new_path"; then
49209    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49212  fi
49213
49214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49216
49217    else
49218      # We're on a unix platform. Hooray! :)
49219      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49220      has_space=`$ECHO "$path" | $GREP " "`
49221      if test "x$has_space" != x; then
49222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49225      fi
49226
49227      # Use eval to expand a potential ~
49228      eval path="$path"
49229      if test ! -f "$path" && test ! -d "$path"; then
49230        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49231      fi
49232
49233      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49234    fi
49235  fi
49236
49237
49238  # Only process if variable expands to non-empty
49239
49240  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49242
49243  # Input might be given as Windows format, start by converting to
49244  # unix format.
49245  path="$POTENTIAL_FREETYPE_LIB_PATH"
49246  new_path=`$CYGPATH -u "$path"`
49247
49248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49251  # "foo.exe" is OK but "foo" is an error.
49252  #
49253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49254  # It is also a way to make sure we got the proper file name for the real test later on.
49255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49256  if test "x$test_shortpath" = x; then
49257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49259    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49260  fi
49261
49262  # Call helper function which possibly converts this using DOS-style short mode.
49263  # If so, the updated path is stored in $new_path.
49264
49265  input_path="$new_path"
49266  # Check if we need to convert this using DOS-style short mode. If the path
49267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49268  # take no chances and rewrite it.
49269  # Note: m4 eats our [], so we need to use [ and ] instead.
49270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49271  if test "x$has_forbidden_chars" != x; then
49272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49276      # Going to short mode and back again did indeed matter. Since short mode is
49277      # case insensitive, let's make it lowercase to improve readability.
49278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49279      # Now convert it back to Unix-style (cygpath)
49280      input_path=`$CYGPATH -u "$shortmode_path"`
49281      new_path="$input_path"
49282    fi
49283  fi
49284
49285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49286  if test "x$test_cygdrive_prefix" = x; then
49287    # As a simple fix, exclude /usr/bin since it's not a real path.
49288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49290      # a path prefixed by /cygdrive for fixpath to work.
49291      new_path="$CYGWIN_ROOT_PATH$input_path"
49292    fi
49293  fi
49294
49295
49296  if test "x$path" != "x$new_path"; then
49297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49300  fi
49301
49302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49303
49304  path="$POTENTIAL_FREETYPE_LIB_PATH"
49305  has_colon=`$ECHO $path | $GREP ^.:`
49306  new_path="$path"
49307  if test "x$has_colon" = x; then
49308    # Not in mixed or Windows style, start by that.
49309    new_path=`cmd //c echo $path`
49310  fi
49311
49312
49313  input_path="$new_path"
49314  # Check if we need to convert this using DOS-style short mode. If the path
49315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49316  # take no chances and rewrite it.
49317  # Note: m4 eats our [], so we need to use [ and ] instead.
49318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49319  if test "x$has_forbidden_chars" != x; then
49320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49322  fi
49323
49324
49325  windows_path="$new_path"
49326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49327    unix_path=`$CYGPATH -u "$windows_path"`
49328    new_path="$unix_path"
49329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49331    new_path="$unix_path"
49332  fi
49333
49334  if test "x$path" != "x$new_path"; then
49335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49338  fi
49339
49340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49342
49343    else
49344      # We're on a unix platform. Hooray! :)
49345      path="$POTENTIAL_FREETYPE_LIB_PATH"
49346      has_space=`$ECHO "$path" | $GREP " "`
49347      if test "x$has_space" != x; then
49348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49351      fi
49352
49353      # Use eval to expand a potential ~
49354      eval path="$path"
49355      if test ! -f "$path" && test ! -d "$path"; then
49356        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49357      fi
49358
49359      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49360    fi
49361  fi
49362
49363
49364    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49366$as_echo_n "checking for freetype includes... " >&6; }
49367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49368$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49369    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49371$as_echo_n "checking for freetype libraries... " >&6; }
49372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49373$as_echo "$FREETYPE_LIB_PATH" >&6; }
49374  fi
49375
49376          fi
49377        else
49378          FREETYPE_BASE_DIR="$SYSROOT/usr"
49379
49380  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49381  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49382  METHOD="well-known location"
49383
49384  # Let's start with an optimistic view of the world :-)
49385  FOUND_FREETYPE=yes
49386
49387  # First look for the canonical freetype main include file ft2build.h.
49388  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49389    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49390    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49391    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49392      # Fail.
49393      FOUND_FREETYPE=no
49394    fi
49395  fi
49396
49397  if test "x$FOUND_FREETYPE" = xyes; then
49398    # Include file found, let's continue the sanity check.
49399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49400$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49401
49402    # Reset to default value
49403    FREETYPE_BASE_NAME=freetype
49404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49406      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49408        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49409        # for the .6 version explicitly.
49410        FREETYPE_BASE_NAME=freetype.6
49411        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49412        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49413$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49414      else
49415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49417        FOUND_FREETYPE=no
49418      fi
49419    else
49420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49421        # On Windows, we will need both .lib and .dll file.
49422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49425          FOUND_FREETYPE=no
49426        fi
49427      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49428          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49429        # Found lib in isa dir, use that instead.
49430        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49431        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49432$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49433      fi
49434    fi
49435  fi
49436
49437  if test "x$FOUND_FREETYPE" = xyes; then
49438
49439  # Only process if variable expands to non-empty
49440
49441  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49443
49444  # Input might be given as Windows format, start by converting to
49445  # unix format.
49446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49447  new_path=`$CYGPATH -u "$path"`
49448
49449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49452  # "foo.exe" is OK but "foo" is an error.
49453  #
49454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49455  # It is also a way to make sure we got the proper file name for the real test later on.
49456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49457  if test "x$test_shortpath" = x; then
49458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49460    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49461  fi
49462
49463  # Call helper function which possibly converts this using DOS-style short mode.
49464  # If so, the updated path is stored in $new_path.
49465
49466  input_path="$new_path"
49467  # Check if we need to convert this using DOS-style short mode. If the path
49468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49469  # take no chances and rewrite it.
49470  # Note: m4 eats our [], so we need to use [ and ] instead.
49471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49472  if test "x$has_forbidden_chars" != x; then
49473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49477      # Going to short mode and back again did indeed matter. Since short mode is
49478      # case insensitive, let's make it lowercase to improve readability.
49479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49480      # Now convert it back to Unix-style (cygpath)
49481      input_path=`$CYGPATH -u "$shortmode_path"`
49482      new_path="$input_path"
49483    fi
49484  fi
49485
49486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49487  if test "x$test_cygdrive_prefix" = x; then
49488    # As a simple fix, exclude /usr/bin since it's not a real path.
49489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49491      # a path prefixed by /cygdrive for fixpath to work.
49492      new_path="$CYGWIN_ROOT_PATH$input_path"
49493    fi
49494  fi
49495
49496
49497  if test "x$path" != "x$new_path"; then
49498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49501  fi
49502
49503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49504
49505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49506  has_colon=`$ECHO $path | $GREP ^.:`
49507  new_path="$path"
49508  if test "x$has_colon" = x; then
49509    # Not in mixed or Windows style, start by that.
49510    new_path=`cmd //c echo $path`
49511  fi
49512
49513
49514  input_path="$new_path"
49515  # Check if we need to convert this using DOS-style short mode. If the path
49516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49517  # take no chances and rewrite it.
49518  # Note: m4 eats our [], so we need to use [ and ] instead.
49519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49520  if test "x$has_forbidden_chars" != x; then
49521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49523  fi
49524
49525
49526  windows_path="$new_path"
49527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49528    unix_path=`$CYGPATH -u "$windows_path"`
49529    new_path="$unix_path"
49530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49532    new_path="$unix_path"
49533  fi
49534
49535  if test "x$path" != "x$new_path"; then
49536    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49538$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49539  fi
49540
49541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49543
49544    else
49545      # We're on a unix platform. Hooray! :)
49546      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49547      has_space=`$ECHO "$path" | $GREP " "`
49548      if test "x$has_space" != x; then
49549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49552      fi
49553
49554      # Use eval to expand a potential ~
49555      eval path="$path"
49556      if test ! -f "$path" && test ! -d "$path"; then
49557        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49558      fi
49559
49560      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49561    fi
49562  fi
49563
49564
49565  # Only process if variable expands to non-empty
49566
49567  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49569
49570  # Input might be given as Windows format, start by converting to
49571  # unix format.
49572  path="$POTENTIAL_FREETYPE_LIB_PATH"
49573  new_path=`$CYGPATH -u "$path"`
49574
49575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49578  # "foo.exe" is OK but "foo" is an error.
49579  #
49580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49581  # It is also a way to make sure we got the proper file name for the real test later on.
49582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49583  if test "x$test_shortpath" = x; then
49584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49586    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49587  fi
49588
49589  # Call helper function which possibly converts this using DOS-style short mode.
49590  # If so, the updated path is stored in $new_path.
49591
49592  input_path="$new_path"
49593  # Check if we need to convert this using DOS-style short mode. If the path
49594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49595  # take no chances and rewrite it.
49596  # Note: m4 eats our [], so we need to use [ and ] instead.
49597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49598  if test "x$has_forbidden_chars" != x; then
49599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49603      # Going to short mode and back again did indeed matter. Since short mode is
49604      # case insensitive, let's make it lowercase to improve readability.
49605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49606      # Now convert it back to Unix-style (cygpath)
49607      input_path=`$CYGPATH -u "$shortmode_path"`
49608      new_path="$input_path"
49609    fi
49610  fi
49611
49612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49613  if test "x$test_cygdrive_prefix" = x; then
49614    # As a simple fix, exclude /usr/bin since it's not a real path.
49615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49617      # a path prefixed by /cygdrive for fixpath to work.
49618      new_path="$CYGWIN_ROOT_PATH$input_path"
49619    fi
49620  fi
49621
49622
49623  if test "x$path" != "x$new_path"; then
49624    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49626$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49627  fi
49628
49629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49630
49631  path="$POTENTIAL_FREETYPE_LIB_PATH"
49632  has_colon=`$ECHO $path | $GREP ^.:`
49633  new_path="$path"
49634  if test "x$has_colon" = x; then
49635    # Not in mixed or Windows style, start by that.
49636    new_path=`cmd //c echo $path`
49637  fi
49638
49639
49640  input_path="$new_path"
49641  # Check if we need to convert this using DOS-style short mode. If the path
49642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49643  # take no chances and rewrite it.
49644  # Note: m4 eats our [], so we need to use [ and ] instead.
49645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49646  if test "x$has_forbidden_chars" != x; then
49647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49649  fi
49650
49651
49652  windows_path="$new_path"
49653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49654    unix_path=`$CYGPATH -u "$windows_path"`
49655    new_path="$unix_path"
49656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49658    new_path="$unix_path"
49659  fi
49660
49661  if test "x$path" != "x$new_path"; then
49662    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49665  fi
49666
49667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49669
49670    else
49671      # We're on a unix platform. Hooray! :)
49672      path="$POTENTIAL_FREETYPE_LIB_PATH"
49673      has_space=`$ECHO "$path" | $GREP " "`
49674      if test "x$has_space" != x; then
49675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49678      fi
49679
49680      # Use eval to expand a potential ~
49681      eval path="$path"
49682      if test ! -f "$path" && test ! -d "$path"; then
49683        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49684      fi
49685
49686      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49687    fi
49688  fi
49689
49690
49691    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49693$as_echo_n "checking for freetype includes... " >&6; }
49694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49695$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49696    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49698$as_echo_n "checking for freetype libraries... " >&6; }
49699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49700$as_echo "$FREETYPE_LIB_PATH" >&6; }
49701  fi
49702
49703
49704          if test "x$FOUND_FREETYPE" != xyes; then
49705            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
49706
49707  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49708  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49709  METHOD="well-known location"
49710
49711  # Let's start with an optimistic view of the world :-)
49712  FOUND_FREETYPE=yes
49713
49714  # First look for the canonical freetype main include file ft2build.h.
49715  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49716    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49717    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49718    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49719      # Fail.
49720      FOUND_FREETYPE=no
49721    fi
49722  fi
49723
49724  if test "x$FOUND_FREETYPE" = xyes; then
49725    # Include file found, let's continue the sanity check.
49726    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49727$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49728
49729    # Reset to default value
49730    FREETYPE_BASE_NAME=freetype
49731    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49732    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49733      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49734          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49735        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49736        # for the .6 version explicitly.
49737        FREETYPE_BASE_NAME=freetype.6
49738        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49739        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49740$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49741      else
49742        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49743$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49744        FOUND_FREETYPE=no
49745      fi
49746    else
49747      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49748        # On Windows, we will need both .lib and .dll file.
49749        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49750          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49751$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49752          FOUND_FREETYPE=no
49753        fi
49754      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49755          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49756        # Found lib in isa dir, use that instead.
49757        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49758        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49759$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49760      fi
49761    fi
49762  fi
49763
49764  if test "x$FOUND_FREETYPE" = xyes; then
49765
49766  # Only process if variable expands to non-empty
49767
49768  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49770
49771  # Input might be given as Windows format, start by converting to
49772  # unix format.
49773  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49774  new_path=`$CYGPATH -u "$path"`
49775
49776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49779  # "foo.exe" is OK but "foo" is an error.
49780  #
49781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49782  # It is also a way to make sure we got the proper file name for the real test later on.
49783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49784  if test "x$test_shortpath" = x; then
49785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49786$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49787    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49788  fi
49789
49790  # Call helper function which possibly converts this using DOS-style short mode.
49791  # If so, the updated path is stored in $new_path.
49792
49793  input_path="$new_path"
49794  # Check if we need to convert this using DOS-style short mode. If the path
49795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49796  # take no chances and rewrite it.
49797  # Note: m4 eats our [], so we need to use [ and ] instead.
49798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49799  if test "x$has_forbidden_chars" != x; then
49800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49804      # Going to short mode and back again did indeed matter. Since short mode is
49805      # case insensitive, let's make it lowercase to improve readability.
49806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49807      # Now convert it back to Unix-style (cygpath)
49808      input_path=`$CYGPATH -u "$shortmode_path"`
49809      new_path="$input_path"
49810    fi
49811  fi
49812
49813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49814  if test "x$test_cygdrive_prefix" = x; then
49815    # As a simple fix, exclude /usr/bin since it's not a real path.
49816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49818      # a path prefixed by /cygdrive for fixpath to work.
49819      new_path="$CYGWIN_ROOT_PATH$input_path"
49820    fi
49821  fi
49822
49823
49824  if test "x$path" != "x$new_path"; then
49825    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49828  fi
49829
49830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49831
49832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49833  has_colon=`$ECHO $path | $GREP ^.:`
49834  new_path="$path"
49835  if test "x$has_colon" = x; then
49836    # Not in mixed or Windows style, start by that.
49837    new_path=`cmd //c echo $path`
49838  fi
49839
49840
49841  input_path="$new_path"
49842  # Check if we need to convert this using DOS-style short mode. If the path
49843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49844  # take no chances and rewrite it.
49845  # Note: m4 eats our [], so we need to use [ and ] instead.
49846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49847  if test "x$has_forbidden_chars" != x; then
49848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49850  fi
49851
49852
49853  windows_path="$new_path"
49854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49855    unix_path=`$CYGPATH -u "$windows_path"`
49856    new_path="$unix_path"
49857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49859    new_path="$unix_path"
49860  fi
49861
49862  if test "x$path" != "x$new_path"; then
49863    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49865$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49866  fi
49867
49868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49870
49871    else
49872      # We're on a unix platform. Hooray! :)
49873      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49874      has_space=`$ECHO "$path" | $GREP " "`
49875      if test "x$has_space" != x; then
49876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49877$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49879      fi
49880
49881      # Use eval to expand a potential ~
49882      eval path="$path"
49883      if test ! -f "$path" && test ! -d "$path"; then
49884        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49885      fi
49886
49887      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49888    fi
49889  fi
49890
49891
49892  # Only process if variable expands to non-empty
49893
49894  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49896
49897  # Input might be given as Windows format, start by converting to
49898  # unix format.
49899  path="$POTENTIAL_FREETYPE_LIB_PATH"
49900  new_path=`$CYGPATH -u "$path"`
49901
49902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49905  # "foo.exe" is OK but "foo" is an error.
49906  #
49907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49908  # It is also a way to make sure we got the proper file name for the real test later on.
49909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49910  if test "x$test_shortpath" = x; then
49911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49913    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49914  fi
49915
49916  # Call helper function which possibly converts this using DOS-style short mode.
49917  # If so, the updated path is stored in $new_path.
49918
49919  input_path="$new_path"
49920  # Check if we need to convert this using DOS-style short mode. If the path
49921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49922  # take no chances and rewrite it.
49923  # Note: m4 eats our [], so we need to use [ and ] instead.
49924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49925  if test "x$has_forbidden_chars" != x; then
49926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49930      # Going to short mode and back again did indeed matter. Since short mode is
49931      # case insensitive, let's make it lowercase to improve readability.
49932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49933      # Now convert it back to Unix-style (cygpath)
49934      input_path=`$CYGPATH -u "$shortmode_path"`
49935      new_path="$input_path"
49936    fi
49937  fi
49938
49939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49940  if test "x$test_cygdrive_prefix" = x; then
49941    # As a simple fix, exclude /usr/bin since it's not a real path.
49942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49944      # a path prefixed by /cygdrive for fixpath to work.
49945      new_path="$CYGWIN_ROOT_PATH$input_path"
49946    fi
49947  fi
49948
49949
49950  if test "x$path" != "x$new_path"; then
49951    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49954  fi
49955
49956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49957
49958  path="$POTENTIAL_FREETYPE_LIB_PATH"
49959  has_colon=`$ECHO $path | $GREP ^.:`
49960  new_path="$path"
49961  if test "x$has_colon" = x; then
49962    # Not in mixed or Windows style, start by that.
49963    new_path=`cmd //c echo $path`
49964  fi
49965
49966
49967  input_path="$new_path"
49968  # Check if we need to convert this using DOS-style short mode. If the path
49969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49970  # take no chances and rewrite it.
49971  # Note: m4 eats our [], so we need to use [ and ] instead.
49972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49973  if test "x$has_forbidden_chars" != x; then
49974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49976  fi
49977
49978
49979  windows_path="$new_path"
49980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49981    unix_path=`$CYGPATH -u "$windows_path"`
49982    new_path="$unix_path"
49983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49985    new_path="$unix_path"
49986  fi
49987
49988  if test "x$path" != "x$new_path"; then
49989    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49992  fi
49993
49994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49996
49997    else
49998      # We're on a unix platform. Hooray! :)
49999      path="$POTENTIAL_FREETYPE_LIB_PATH"
50000      has_space=`$ECHO "$path" | $GREP " "`
50001      if test "x$has_space" != x; then
50002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50005      fi
50006
50007      # Use eval to expand a potential ~
50008      eval path="$path"
50009      if test ! -f "$path" && test ! -d "$path"; then
50010        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50011      fi
50012
50013      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50014    fi
50015  fi
50016
50017
50018    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50020$as_echo_n "checking for freetype includes... " >&6; }
50021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50022$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50023    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50025$as_echo_n "checking for freetype libraries... " >&6; }
50026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50027$as_echo "$FREETYPE_LIB_PATH" >&6; }
50028  fi
50029
50030          fi
50031
50032          if test "x$FOUND_FREETYPE" != xyes; then
50033            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
50034
50035  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50036  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50037  METHOD="well-known location"
50038
50039  # Let's start with an optimistic view of the world :-)
50040  FOUND_FREETYPE=yes
50041
50042  # First look for the canonical freetype main include file ft2build.h.
50043  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50044    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50045    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50046    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50047      # Fail.
50048      FOUND_FREETYPE=no
50049    fi
50050  fi
50051
50052  if test "x$FOUND_FREETYPE" = xyes; then
50053    # Include file found, let's continue the sanity check.
50054    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50055$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50056
50057    # Reset to default value
50058    FREETYPE_BASE_NAME=freetype
50059    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50060    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50061      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50063        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50064        # for the .6 version explicitly.
50065        FREETYPE_BASE_NAME=freetype.6
50066        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50067        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50068$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50069      else
50070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50071$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50072        FOUND_FREETYPE=no
50073      fi
50074    else
50075      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50076        # On Windows, we will need both .lib and .dll file.
50077        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50078          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50080          FOUND_FREETYPE=no
50081        fi
50082      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50084        # Found lib in isa dir, use that instead.
50085        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50086        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50087$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50088      fi
50089    fi
50090  fi
50091
50092  if test "x$FOUND_FREETYPE" = xyes; then
50093
50094  # Only process if variable expands to non-empty
50095
50096  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50098
50099  # Input might be given as Windows format, start by converting to
50100  # unix format.
50101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50102  new_path=`$CYGPATH -u "$path"`
50103
50104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50107  # "foo.exe" is OK but "foo" is an error.
50108  #
50109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50110  # It is also a way to make sure we got the proper file name for the real test later on.
50111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50112  if test "x$test_shortpath" = x; then
50113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50116  fi
50117
50118  # Call helper function which possibly converts this using DOS-style short mode.
50119  # If so, the updated path is stored in $new_path.
50120
50121  input_path="$new_path"
50122  # Check if we need to convert this using DOS-style short mode. If the path
50123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50124  # take no chances and rewrite it.
50125  # Note: m4 eats our [], so we need to use [ and ] instead.
50126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50127  if test "x$has_forbidden_chars" != x; then
50128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50132      # Going to short mode and back again did indeed matter. Since short mode is
50133      # case insensitive, let's make it lowercase to improve readability.
50134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50135      # Now convert it back to Unix-style (cygpath)
50136      input_path=`$CYGPATH -u "$shortmode_path"`
50137      new_path="$input_path"
50138    fi
50139  fi
50140
50141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50142  if test "x$test_cygdrive_prefix" = x; then
50143    # As a simple fix, exclude /usr/bin since it's not a real path.
50144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50146      # a path prefixed by /cygdrive for fixpath to work.
50147      new_path="$CYGWIN_ROOT_PATH$input_path"
50148    fi
50149  fi
50150
50151
50152  if test "x$path" != "x$new_path"; then
50153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50156  fi
50157
50158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50159
50160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50161  has_colon=`$ECHO $path | $GREP ^.:`
50162  new_path="$path"
50163  if test "x$has_colon" = x; then
50164    # Not in mixed or Windows style, start by that.
50165    new_path=`cmd //c echo $path`
50166  fi
50167
50168
50169  input_path="$new_path"
50170  # Check if we need to convert this using DOS-style short mode. If the path
50171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50172  # take no chances and rewrite it.
50173  # Note: m4 eats our [], so we need to use [ and ] instead.
50174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50175  if test "x$has_forbidden_chars" != x; then
50176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50178  fi
50179
50180
50181  windows_path="$new_path"
50182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50183    unix_path=`$CYGPATH -u "$windows_path"`
50184    new_path="$unix_path"
50185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50187    new_path="$unix_path"
50188  fi
50189
50190  if test "x$path" != "x$new_path"; then
50191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50194  fi
50195
50196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50198
50199    else
50200      # We're on a unix platform. Hooray! :)
50201      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50202      has_space=`$ECHO "$path" | $GREP " "`
50203      if test "x$has_space" != x; then
50204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50207      fi
50208
50209      # Use eval to expand a potential ~
50210      eval path="$path"
50211      if test ! -f "$path" && test ! -d "$path"; then
50212        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50213      fi
50214
50215      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50216    fi
50217  fi
50218
50219
50220  # Only process if variable expands to non-empty
50221
50222  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50224
50225  # Input might be given as Windows format, start by converting to
50226  # unix format.
50227  path="$POTENTIAL_FREETYPE_LIB_PATH"
50228  new_path=`$CYGPATH -u "$path"`
50229
50230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50233  # "foo.exe" is OK but "foo" is an error.
50234  #
50235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50236  # It is also a way to make sure we got the proper file name for the real test later on.
50237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50238  if test "x$test_shortpath" = x; then
50239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50241    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50242  fi
50243
50244  # Call helper function which possibly converts this using DOS-style short mode.
50245  # If so, the updated path is stored in $new_path.
50246
50247  input_path="$new_path"
50248  # Check if we need to convert this using DOS-style short mode. If the path
50249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50250  # take no chances and rewrite it.
50251  # Note: m4 eats our [], so we need to use [ and ] instead.
50252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50253  if test "x$has_forbidden_chars" != x; then
50254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50258      # Going to short mode and back again did indeed matter. Since short mode is
50259      # case insensitive, let's make it lowercase to improve readability.
50260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50261      # Now convert it back to Unix-style (cygpath)
50262      input_path=`$CYGPATH -u "$shortmode_path"`
50263      new_path="$input_path"
50264    fi
50265  fi
50266
50267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50268  if test "x$test_cygdrive_prefix" = x; then
50269    # As a simple fix, exclude /usr/bin since it's not a real path.
50270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50272      # a path prefixed by /cygdrive for fixpath to work.
50273      new_path="$CYGWIN_ROOT_PATH$input_path"
50274    fi
50275  fi
50276
50277
50278  if test "x$path" != "x$new_path"; then
50279    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50281$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50282  fi
50283
50284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50285
50286  path="$POTENTIAL_FREETYPE_LIB_PATH"
50287  has_colon=`$ECHO $path | $GREP ^.:`
50288  new_path="$path"
50289  if test "x$has_colon" = x; then
50290    # Not in mixed or Windows style, start by that.
50291    new_path=`cmd //c echo $path`
50292  fi
50293
50294
50295  input_path="$new_path"
50296  # Check if we need to convert this using DOS-style short mode. If the path
50297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50298  # take no chances and rewrite it.
50299  # Note: m4 eats our [], so we need to use [ and ] instead.
50300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50301  if test "x$has_forbidden_chars" != x; then
50302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50304  fi
50305
50306
50307  windows_path="$new_path"
50308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50309    unix_path=`$CYGPATH -u "$windows_path"`
50310    new_path="$unix_path"
50311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50313    new_path="$unix_path"
50314  fi
50315
50316  if test "x$path" != "x$new_path"; then
50317    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50319$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50320  fi
50321
50322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50324
50325    else
50326      # We're on a unix platform. Hooray! :)
50327      path="$POTENTIAL_FREETYPE_LIB_PATH"
50328      has_space=`$ECHO "$path" | $GREP " "`
50329      if test "x$has_space" != x; then
50330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50333      fi
50334
50335      # Use eval to expand a potential ~
50336      eval path="$path"
50337      if test ! -f "$path" && test ! -d "$path"; then
50338        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50339      fi
50340
50341      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50342    fi
50343  fi
50344
50345
50346    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50348$as_echo_n "checking for freetype includes... " >&6; }
50349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50350$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50351    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50353$as_echo_n "checking for freetype libraries... " >&6; }
50354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50355$as_echo "$FREETYPE_LIB_PATH" >&6; }
50356  fi
50357
50358          fi
50359
50360          if test "x$FOUND_FREETYPE" != xyes; then
50361            FREETYPE_BASE_DIR="$SYSROOT/usr"
50362            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50363
50364  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50365  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
50366  METHOD="well-known location"
50367
50368  # Let's start with an optimistic view of the world :-)
50369  FOUND_FREETYPE=yes
50370
50371  # First look for the canonical freetype main include file ft2build.h.
50372  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50373    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50374    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50375    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50376      # Fail.
50377      FOUND_FREETYPE=no
50378    fi
50379  fi
50380
50381  if test "x$FOUND_FREETYPE" = xyes; then
50382    # Include file found, let's continue the sanity check.
50383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50384$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50385
50386    # Reset to default value
50387    FREETYPE_BASE_NAME=freetype
50388    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50389    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50390      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50391          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50392        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50393        # for the .6 version explicitly.
50394        FREETYPE_BASE_NAME=freetype.6
50395        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50396        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50397$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50398      else
50399        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50400$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50401        FOUND_FREETYPE=no
50402      fi
50403    else
50404      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50405        # On Windows, we will need both .lib and .dll file.
50406        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50407          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50408$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50409          FOUND_FREETYPE=no
50410        fi
50411      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50412          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50413        # Found lib in isa dir, use that instead.
50414        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50415        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50416$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50417      fi
50418    fi
50419  fi
50420
50421  if test "x$FOUND_FREETYPE" = xyes; then
50422
50423  # Only process if variable expands to non-empty
50424
50425  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50427
50428  # Input might be given as Windows format, start by converting to
50429  # unix format.
50430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50431  new_path=`$CYGPATH -u "$path"`
50432
50433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50436  # "foo.exe" is OK but "foo" is an error.
50437  #
50438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50439  # It is also a way to make sure we got the proper file name for the real test later on.
50440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50441  if test "x$test_shortpath" = x; then
50442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50444    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50445  fi
50446
50447  # Call helper function which possibly converts this using DOS-style short mode.
50448  # If so, the updated path is stored in $new_path.
50449
50450  input_path="$new_path"
50451  # Check if we need to convert this using DOS-style short mode. If the path
50452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50453  # take no chances and rewrite it.
50454  # Note: m4 eats our [], so we need to use [ and ] instead.
50455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50456  if test "x$has_forbidden_chars" != x; then
50457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50461      # Going to short mode and back again did indeed matter. Since short mode is
50462      # case insensitive, let's make it lowercase to improve readability.
50463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50464      # Now convert it back to Unix-style (cygpath)
50465      input_path=`$CYGPATH -u "$shortmode_path"`
50466      new_path="$input_path"
50467    fi
50468  fi
50469
50470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50471  if test "x$test_cygdrive_prefix" = x; then
50472    # As a simple fix, exclude /usr/bin since it's not a real path.
50473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50475      # a path prefixed by /cygdrive for fixpath to work.
50476      new_path="$CYGWIN_ROOT_PATH$input_path"
50477    fi
50478  fi
50479
50480
50481  if test "x$path" != "x$new_path"; then
50482    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50485  fi
50486
50487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50488
50489  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50490  has_colon=`$ECHO $path | $GREP ^.:`
50491  new_path="$path"
50492  if test "x$has_colon" = x; then
50493    # Not in mixed or Windows style, start by that.
50494    new_path=`cmd //c echo $path`
50495  fi
50496
50497
50498  input_path="$new_path"
50499  # Check if we need to convert this using DOS-style short mode. If the path
50500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50501  # take no chances and rewrite it.
50502  # Note: m4 eats our [], so we need to use [ and ] instead.
50503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50504  if test "x$has_forbidden_chars" != x; then
50505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50507  fi
50508
50509
50510  windows_path="$new_path"
50511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50512    unix_path=`$CYGPATH -u "$windows_path"`
50513    new_path="$unix_path"
50514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50516    new_path="$unix_path"
50517  fi
50518
50519  if test "x$path" != "x$new_path"; then
50520    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50523  fi
50524
50525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50527
50528    else
50529      # We're on a unix platform. Hooray! :)
50530      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50531      has_space=`$ECHO "$path" | $GREP " "`
50532      if test "x$has_space" != x; then
50533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50536      fi
50537
50538      # Use eval to expand a potential ~
50539      eval path="$path"
50540      if test ! -f "$path" && test ! -d "$path"; then
50541        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50542      fi
50543
50544      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50545    fi
50546  fi
50547
50548
50549  # Only process if variable expands to non-empty
50550
50551  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50553
50554  # Input might be given as Windows format, start by converting to
50555  # unix format.
50556  path="$POTENTIAL_FREETYPE_LIB_PATH"
50557  new_path=`$CYGPATH -u "$path"`
50558
50559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50562  # "foo.exe" is OK but "foo" is an error.
50563  #
50564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50565  # It is also a way to make sure we got the proper file name for the real test later on.
50566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50567  if test "x$test_shortpath" = x; then
50568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50570    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50571  fi
50572
50573  # Call helper function which possibly converts this using DOS-style short mode.
50574  # If so, the updated path is stored in $new_path.
50575
50576  input_path="$new_path"
50577  # Check if we need to convert this using DOS-style short mode. If the path
50578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50579  # take no chances and rewrite it.
50580  # Note: m4 eats our [], so we need to use [ and ] instead.
50581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50582  if test "x$has_forbidden_chars" != x; then
50583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50587      # Going to short mode and back again did indeed matter. Since short mode is
50588      # case insensitive, let's make it lowercase to improve readability.
50589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50590      # Now convert it back to Unix-style (cygpath)
50591      input_path=`$CYGPATH -u "$shortmode_path"`
50592      new_path="$input_path"
50593    fi
50594  fi
50595
50596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50597  if test "x$test_cygdrive_prefix" = x; then
50598    # As a simple fix, exclude /usr/bin since it's not a real path.
50599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50601      # a path prefixed by /cygdrive for fixpath to work.
50602      new_path="$CYGWIN_ROOT_PATH$input_path"
50603    fi
50604  fi
50605
50606
50607  if test "x$path" != "x$new_path"; then
50608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50611  fi
50612
50613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50614
50615  path="$POTENTIAL_FREETYPE_LIB_PATH"
50616  has_colon=`$ECHO $path | $GREP ^.:`
50617  new_path="$path"
50618  if test "x$has_colon" = x; then
50619    # Not in mixed or Windows style, start by that.
50620    new_path=`cmd //c echo $path`
50621  fi
50622
50623
50624  input_path="$new_path"
50625  # Check if we need to convert this using DOS-style short mode. If the path
50626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50627  # take no chances and rewrite it.
50628  # Note: m4 eats our [], so we need to use [ and ] instead.
50629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50630  if test "x$has_forbidden_chars" != x; then
50631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50633  fi
50634
50635
50636  windows_path="$new_path"
50637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50638    unix_path=`$CYGPATH -u "$windows_path"`
50639    new_path="$unix_path"
50640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50642    new_path="$unix_path"
50643  fi
50644
50645  if test "x$path" != "x$new_path"; then
50646    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50649  fi
50650
50651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50653
50654    else
50655      # We're on a unix platform. Hooray! :)
50656      path="$POTENTIAL_FREETYPE_LIB_PATH"
50657      has_space=`$ECHO "$path" | $GREP " "`
50658      if test "x$has_space" != x; then
50659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50662      fi
50663
50664      # Use eval to expand a potential ~
50665      eval path="$path"
50666      if test ! -f "$path" && test ! -d "$path"; then
50667        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50668      fi
50669
50670      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50671    fi
50672  fi
50673
50674
50675    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50677$as_echo_n "checking for freetype includes... " >&6; }
50678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50679$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50680    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50682$as_echo_n "checking for freetype libraries... " >&6; }
50683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50684$as_echo "$FREETYPE_LIB_PATH" >&6; }
50685  fi
50686
50687            else
50688
50689  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50690  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
50691  METHOD="well-known location"
50692
50693  # Let's start with an optimistic view of the world :-)
50694  FOUND_FREETYPE=yes
50695
50696  # First look for the canonical freetype main include file ft2build.h.
50697  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50698    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50699    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50700    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50701      # Fail.
50702      FOUND_FREETYPE=no
50703    fi
50704  fi
50705
50706  if test "x$FOUND_FREETYPE" = xyes; then
50707    # Include file found, let's continue the sanity check.
50708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50709$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50710
50711    # Reset to default value
50712    FREETYPE_BASE_NAME=freetype
50713    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50714    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50715      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50716          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50717        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50718        # for the .6 version explicitly.
50719        FREETYPE_BASE_NAME=freetype.6
50720        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50721        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50722$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50723      else
50724        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50725$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50726        FOUND_FREETYPE=no
50727      fi
50728    else
50729      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50730        # On Windows, we will need both .lib and .dll file.
50731        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50732          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50733$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50734          FOUND_FREETYPE=no
50735        fi
50736      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50737          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50738        # Found lib in isa dir, use that instead.
50739        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50740        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50741$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50742      fi
50743    fi
50744  fi
50745
50746  if test "x$FOUND_FREETYPE" = xyes; then
50747
50748  # Only process if variable expands to non-empty
50749
50750  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50752
50753  # Input might be given as Windows format, start by converting to
50754  # unix format.
50755  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50756  new_path=`$CYGPATH -u "$path"`
50757
50758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50761  # "foo.exe" is OK but "foo" is an error.
50762  #
50763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50764  # It is also a way to make sure we got the proper file name for the real test later on.
50765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50766  if test "x$test_shortpath" = x; then
50767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50769    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50770  fi
50771
50772  # Call helper function which possibly converts this using DOS-style short mode.
50773  # If so, the updated path is stored in $new_path.
50774
50775  input_path="$new_path"
50776  # Check if we need to convert this using DOS-style short mode. If the path
50777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50778  # take no chances and rewrite it.
50779  # Note: m4 eats our [], so we need to use [ and ] instead.
50780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50781  if test "x$has_forbidden_chars" != x; then
50782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50786      # Going to short mode and back again did indeed matter. Since short mode is
50787      # case insensitive, let's make it lowercase to improve readability.
50788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50789      # Now convert it back to Unix-style (cygpath)
50790      input_path=`$CYGPATH -u "$shortmode_path"`
50791      new_path="$input_path"
50792    fi
50793  fi
50794
50795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50796  if test "x$test_cygdrive_prefix" = x; then
50797    # As a simple fix, exclude /usr/bin since it's not a real path.
50798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50800      # a path prefixed by /cygdrive for fixpath to work.
50801      new_path="$CYGWIN_ROOT_PATH$input_path"
50802    fi
50803  fi
50804
50805
50806  if test "x$path" != "x$new_path"; then
50807    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50810  fi
50811
50812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50813
50814  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50815  has_colon=`$ECHO $path | $GREP ^.:`
50816  new_path="$path"
50817  if test "x$has_colon" = x; then
50818    # Not in mixed or Windows style, start by that.
50819    new_path=`cmd //c echo $path`
50820  fi
50821
50822
50823  input_path="$new_path"
50824  # Check if we need to convert this using DOS-style short mode. If the path
50825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50826  # take no chances and rewrite it.
50827  # Note: m4 eats our [], so we need to use [ and ] instead.
50828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50829  if test "x$has_forbidden_chars" != x; then
50830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50832  fi
50833
50834
50835  windows_path="$new_path"
50836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50837    unix_path=`$CYGPATH -u "$windows_path"`
50838    new_path="$unix_path"
50839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50841    new_path="$unix_path"
50842  fi
50843
50844  if test "x$path" != "x$new_path"; then
50845    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50848  fi
50849
50850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50852
50853    else
50854      # We're on a unix platform. Hooray! :)
50855      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50856      has_space=`$ECHO "$path" | $GREP " "`
50857      if test "x$has_space" != x; then
50858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50860        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50861      fi
50862
50863      # Use eval to expand a potential ~
50864      eval path="$path"
50865      if test ! -f "$path" && test ! -d "$path"; then
50866        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50867      fi
50868
50869      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50870    fi
50871  fi
50872
50873
50874  # Only process if variable expands to non-empty
50875
50876  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50878
50879  # Input might be given as Windows format, start by converting to
50880  # unix format.
50881  path="$POTENTIAL_FREETYPE_LIB_PATH"
50882  new_path=`$CYGPATH -u "$path"`
50883
50884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50887  # "foo.exe" is OK but "foo" is an error.
50888  #
50889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50890  # It is also a way to make sure we got the proper file name for the real test later on.
50891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50892  if test "x$test_shortpath" = x; then
50893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50895    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50896  fi
50897
50898  # Call helper function which possibly converts this using DOS-style short mode.
50899  # If so, the updated path is stored in $new_path.
50900
50901  input_path="$new_path"
50902  # Check if we need to convert this using DOS-style short mode. If the path
50903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50904  # take no chances and rewrite it.
50905  # Note: m4 eats our [], so we need to use [ and ] instead.
50906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50907  if test "x$has_forbidden_chars" != x; then
50908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50912      # Going to short mode and back again did indeed matter. Since short mode is
50913      # case insensitive, let's make it lowercase to improve readability.
50914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50915      # Now convert it back to Unix-style (cygpath)
50916      input_path=`$CYGPATH -u "$shortmode_path"`
50917      new_path="$input_path"
50918    fi
50919  fi
50920
50921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50922  if test "x$test_cygdrive_prefix" = x; then
50923    # As a simple fix, exclude /usr/bin since it's not a real path.
50924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50926      # a path prefixed by /cygdrive for fixpath to work.
50927      new_path="$CYGWIN_ROOT_PATH$input_path"
50928    fi
50929  fi
50930
50931
50932  if test "x$path" != "x$new_path"; then
50933    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50936  fi
50937
50938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50939
50940  path="$POTENTIAL_FREETYPE_LIB_PATH"
50941  has_colon=`$ECHO $path | $GREP ^.:`
50942  new_path="$path"
50943  if test "x$has_colon" = x; then
50944    # Not in mixed or Windows style, start by that.
50945    new_path=`cmd //c echo $path`
50946  fi
50947
50948
50949  input_path="$new_path"
50950  # Check if we need to convert this using DOS-style short mode. If the path
50951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50952  # take no chances and rewrite it.
50953  # Note: m4 eats our [], so we need to use [ and ] instead.
50954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50955  if test "x$has_forbidden_chars" != x; then
50956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50958  fi
50959
50960
50961  windows_path="$new_path"
50962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50963    unix_path=`$CYGPATH -u "$windows_path"`
50964    new_path="$unix_path"
50965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50967    new_path="$unix_path"
50968  fi
50969
50970  if test "x$path" != "x$new_path"; then
50971    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50974  fi
50975
50976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50978
50979    else
50980      # We're on a unix platform. Hooray! :)
50981      path="$POTENTIAL_FREETYPE_LIB_PATH"
50982      has_space=`$ECHO "$path" | $GREP " "`
50983      if test "x$has_space" != x; then
50984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50987      fi
50988
50989      # Use eval to expand a potential ~
50990      eval path="$path"
50991      if test ! -f "$path" && test ! -d "$path"; then
50992        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50993      fi
50994
50995      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50996    fi
50997  fi
50998
50999
51000    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51002$as_echo_n "checking for freetype includes... " >&6; }
51003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51004$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51005    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51007$as_echo_n "checking for freetype libraries... " >&6; }
51008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51009$as_echo "$FREETYPE_LIB_PATH" >&6; }
51010  fi
51011
51012              if test "x$FOUND_FREETYPE" != xyes; then
51013
51014  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51015  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
51016  METHOD="well-known location"
51017
51018  # Let's start with an optimistic view of the world :-)
51019  FOUND_FREETYPE=yes
51020
51021  # First look for the canonical freetype main include file ft2build.h.
51022  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51023    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51024    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51025    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51026      # Fail.
51027      FOUND_FREETYPE=no
51028    fi
51029  fi
51030
51031  if test "x$FOUND_FREETYPE" = xyes; then
51032    # Include file found, let's continue the sanity check.
51033    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51034$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51035
51036    # Reset to default value
51037    FREETYPE_BASE_NAME=freetype
51038    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51039    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51040      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51041          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51042        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51043        # for the .6 version explicitly.
51044        FREETYPE_BASE_NAME=freetype.6
51045        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51046        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51047$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51048      else
51049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51050$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51051        FOUND_FREETYPE=no
51052      fi
51053    else
51054      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51055        # On Windows, we will need both .lib and .dll file.
51056        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51057          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51058$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51059          FOUND_FREETYPE=no
51060        fi
51061      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51063        # Found lib in isa dir, use that instead.
51064        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51065        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51066$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51067      fi
51068    fi
51069  fi
51070
51071  if test "x$FOUND_FREETYPE" = xyes; then
51072
51073  # Only process if variable expands to non-empty
51074
51075  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51076    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51077
51078  # Input might be given as Windows format, start by converting to
51079  # unix format.
51080  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51081  new_path=`$CYGPATH -u "$path"`
51082
51083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51086  # "foo.exe" is OK but "foo" is an error.
51087  #
51088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51089  # It is also a way to make sure we got the proper file name for the real test later on.
51090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51091  if test "x$test_shortpath" = x; then
51092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51093$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51094    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51095  fi
51096
51097  # Call helper function which possibly converts this using DOS-style short mode.
51098  # If so, the updated path is stored in $new_path.
51099
51100  input_path="$new_path"
51101  # Check if we need to convert this using DOS-style short mode. If the path
51102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51103  # take no chances and rewrite it.
51104  # Note: m4 eats our [], so we need to use [ and ] instead.
51105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51106  if test "x$has_forbidden_chars" != x; then
51107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51111      # Going to short mode and back again did indeed matter. Since short mode is
51112      # case insensitive, let's make it lowercase to improve readability.
51113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51114      # Now convert it back to Unix-style (cygpath)
51115      input_path=`$CYGPATH -u "$shortmode_path"`
51116      new_path="$input_path"
51117    fi
51118  fi
51119
51120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51121  if test "x$test_cygdrive_prefix" = x; then
51122    # As a simple fix, exclude /usr/bin since it's not a real path.
51123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51125      # a path prefixed by /cygdrive for fixpath to work.
51126      new_path="$CYGWIN_ROOT_PATH$input_path"
51127    fi
51128  fi
51129
51130
51131  if test "x$path" != "x$new_path"; then
51132    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51134$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51135  fi
51136
51137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51138
51139  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51140  has_colon=`$ECHO $path | $GREP ^.:`
51141  new_path="$path"
51142  if test "x$has_colon" = x; then
51143    # Not in mixed or Windows style, start by that.
51144    new_path=`cmd //c echo $path`
51145  fi
51146
51147
51148  input_path="$new_path"
51149  # Check if we need to convert this using DOS-style short mode. If the path
51150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51151  # take no chances and rewrite it.
51152  # Note: m4 eats our [], so we need to use [ and ] instead.
51153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51154  if test "x$has_forbidden_chars" != x; then
51155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51157  fi
51158
51159
51160  windows_path="$new_path"
51161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51162    unix_path=`$CYGPATH -u "$windows_path"`
51163    new_path="$unix_path"
51164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51166    new_path="$unix_path"
51167  fi
51168
51169  if test "x$path" != "x$new_path"; then
51170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51173  fi
51174
51175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51177
51178    else
51179      # We're on a unix platform. Hooray! :)
51180      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51181      has_space=`$ECHO "$path" | $GREP " "`
51182      if test "x$has_space" != x; then
51183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51184$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51185        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51186      fi
51187
51188      # Use eval to expand a potential ~
51189      eval path="$path"
51190      if test ! -f "$path" && test ! -d "$path"; then
51191        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51192      fi
51193
51194      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51195    fi
51196  fi
51197
51198
51199  # Only process if variable expands to non-empty
51200
51201  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51203
51204  # Input might be given as Windows format, start by converting to
51205  # unix format.
51206  path="$POTENTIAL_FREETYPE_LIB_PATH"
51207  new_path=`$CYGPATH -u "$path"`
51208
51209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51212  # "foo.exe" is OK but "foo" is an error.
51213  #
51214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51215  # It is also a way to make sure we got the proper file name for the real test later on.
51216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51217  if test "x$test_shortpath" = x; then
51218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51219$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51220    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51221  fi
51222
51223  # Call helper function which possibly converts this using DOS-style short mode.
51224  # If so, the updated path is stored in $new_path.
51225
51226  input_path="$new_path"
51227  # Check if we need to convert this using DOS-style short mode. If the path
51228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51229  # take no chances and rewrite it.
51230  # Note: m4 eats our [], so we need to use [ and ] instead.
51231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51232  if test "x$has_forbidden_chars" != x; then
51233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51237      # Going to short mode and back again did indeed matter. Since short mode is
51238      # case insensitive, let's make it lowercase to improve readability.
51239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51240      # Now convert it back to Unix-style (cygpath)
51241      input_path=`$CYGPATH -u "$shortmode_path"`
51242      new_path="$input_path"
51243    fi
51244  fi
51245
51246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51247  if test "x$test_cygdrive_prefix" = x; then
51248    # As a simple fix, exclude /usr/bin since it's not a real path.
51249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51251      # a path prefixed by /cygdrive for fixpath to work.
51252      new_path="$CYGWIN_ROOT_PATH$input_path"
51253    fi
51254  fi
51255
51256
51257  if test "x$path" != "x$new_path"; then
51258    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51260$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51261  fi
51262
51263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51264
51265  path="$POTENTIAL_FREETYPE_LIB_PATH"
51266  has_colon=`$ECHO $path | $GREP ^.:`
51267  new_path="$path"
51268  if test "x$has_colon" = x; then
51269    # Not in mixed or Windows style, start by that.
51270    new_path=`cmd //c echo $path`
51271  fi
51272
51273
51274  input_path="$new_path"
51275  # Check if we need to convert this using DOS-style short mode. If the path
51276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51277  # take no chances and rewrite it.
51278  # Note: m4 eats our [], so we need to use [ and ] instead.
51279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51280  if test "x$has_forbidden_chars" != x; then
51281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51283  fi
51284
51285
51286  windows_path="$new_path"
51287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51288    unix_path=`$CYGPATH -u "$windows_path"`
51289    new_path="$unix_path"
51290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51292    new_path="$unix_path"
51293  fi
51294
51295  if test "x$path" != "x$new_path"; then
51296    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51298$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51299  fi
51300
51301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51303
51304    else
51305      # We're on a unix platform. Hooray! :)
51306      path="$POTENTIAL_FREETYPE_LIB_PATH"
51307      has_space=`$ECHO "$path" | $GREP " "`
51308      if test "x$has_space" != x; then
51309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51310$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51312      fi
51313
51314      # Use eval to expand a potential ~
51315      eval path="$path"
51316      if test ! -f "$path" && test ! -d "$path"; then
51317        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51318      fi
51319
51320      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51321    fi
51322  fi
51323
51324
51325    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51327$as_echo_n "checking for freetype includes... " >&6; }
51328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51329$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51330    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51332$as_echo_n "checking for freetype libraries... " >&6; }
51333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51334$as_echo "$FREETYPE_LIB_PATH" >&6; }
51335  fi
51336
51337              fi
51338            fi
51339          fi
51340        fi
51341      fi # end check in well-known locations
51342
51343      if test "x$FOUND_FREETYPE" != xyes; then
51344
51345  # Print a helpful message on how to acquire the necessary build dependency.
51346  # freetype is the help tag: freetype, cups, alsa etc
51347  MISSING_DEPENDENCY=freetype
51348
51349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51350    cygwin_help $MISSING_DEPENDENCY
51351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51352    msys_help $MISSING_DEPENDENCY
51353  else
51354    PKGHANDLER_COMMAND=
51355
51356    case $PKGHANDLER in
51357      apt-get)
51358        apt_help     $MISSING_DEPENDENCY ;;
51359      yum)
51360        yum_help     $MISSING_DEPENDENCY ;;
51361      port)
51362        port_help    $MISSING_DEPENDENCY ;;
51363      pkgutil)
51364        pkgutil_help $MISSING_DEPENDENCY ;;
51365      pkgadd)
51366        pkgadd_help  $MISSING_DEPENDENCY ;;
51367    esac
51368
51369    if test "x$PKGHANDLER_COMMAND" != x; then
51370      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51371    fi
51372  fi
51373
51374        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
51375      fi
51376    fi # end user specified settings
51377
51378    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
51379    if test "x$FREETYPE_CFLAGS" = x; then
51380
51381  # Only process if variable expands to non-empty
51382
51383  if test "x$FREETYPE_INCLUDE_PATH" != x; then
51384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51385
51386  # Input might be given as Windows format, start by converting to
51387  # unix format.
51388  path="$FREETYPE_INCLUDE_PATH"
51389  new_path=`$CYGPATH -u "$path"`
51390
51391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51394  # "foo.exe" is OK but "foo" is an error.
51395  #
51396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51397  # It is also a way to make sure we got the proper file name for the real test later on.
51398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51399  if test "x$test_shortpath" = x; then
51400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51401$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51402    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
51403  fi
51404
51405  # Call helper function which possibly converts this using DOS-style short mode.
51406  # If so, the updated path is stored in $new_path.
51407
51408  input_path="$new_path"
51409  # Check if we need to convert this using DOS-style short mode. If the path
51410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51411  # take no chances and rewrite it.
51412  # Note: m4 eats our [], so we need to use [ and ] instead.
51413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51414  if test "x$has_forbidden_chars" != x; then
51415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51419      # Going to short mode and back again did indeed matter. Since short mode is
51420      # case insensitive, let's make it lowercase to improve readability.
51421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51422      # Now convert it back to Unix-style (cygpath)
51423      input_path=`$CYGPATH -u "$shortmode_path"`
51424      new_path="$input_path"
51425    fi
51426  fi
51427
51428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51429  if test "x$test_cygdrive_prefix" = x; then
51430    # As a simple fix, exclude /usr/bin since it's not a real path.
51431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51433      # a path prefixed by /cygdrive for fixpath to work.
51434      new_path="$CYGWIN_ROOT_PATH$input_path"
51435    fi
51436  fi
51437
51438
51439  if test "x$path" != "x$new_path"; then
51440    FREETYPE_INCLUDE_PATH="$new_path"
51441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51442$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51443  fi
51444
51445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51446
51447  path="$FREETYPE_INCLUDE_PATH"
51448  has_colon=`$ECHO $path | $GREP ^.:`
51449  new_path="$path"
51450  if test "x$has_colon" = x; then
51451    # Not in mixed or Windows style, start by that.
51452    new_path=`cmd //c echo $path`
51453  fi
51454
51455
51456  input_path="$new_path"
51457  # Check if we need to convert this using DOS-style short mode. If the path
51458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51459  # take no chances and rewrite it.
51460  # Note: m4 eats our [], so we need to use [ and ] instead.
51461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51462  if test "x$has_forbidden_chars" != x; then
51463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51465  fi
51466
51467
51468  windows_path="$new_path"
51469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51470    unix_path=`$CYGPATH -u "$windows_path"`
51471    new_path="$unix_path"
51472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51474    new_path="$unix_path"
51475  fi
51476
51477  if test "x$path" != "x$new_path"; then
51478    FREETYPE_INCLUDE_PATH="$new_path"
51479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51480$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51481  fi
51482
51483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51485
51486    else
51487      # We're on a unix platform. Hooray! :)
51488      path="$FREETYPE_INCLUDE_PATH"
51489      has_space=`$ECHO "$path" | $GREP " "`
51490      if test "x$has_space" != x; then
51491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51492$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51494      fi
51495
51496      # Use eval to expand a potential ~
51497      eval path="$path"
51498      if test ! -f "$path" && test ! -d "$path"; then
51499        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51500      fi
51501
51502      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51503    fi
51504  fi
51505
51506      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
51507        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
51508      else
51509        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
51510      fi
51511    fi
51512
51513    if test "x$FREETYPE_LIBS" = x; then
51514
51515  # Only process if variable expands to non-empty
51516
51517  if test "x$FREETYPE_LIB_PATH" != x; then
51518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51519
51520  # Input might be given as Windows format, start by converting to
51521  # unix format.
51522  path="$FREETYPE_LIB_PATH"
51523  new_path=`$CYGPATH -u "$path"`
51524
51525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51528  # "foo.exe" is OK but "foo" is an error.
51529  #
51530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51531  # It is also a way to make sure we got the proper file name for the real test later on.
51532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51533  if test "x$test_shortpath" = x; then
51534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51535$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51536    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
51537  fi
51538
51539  # Call helper function which possibly converts this using DOS-style short mode.
51540  # If so, the updated path is stored in $new_path.
51541
51542  input_path="$new_path"
51543  # Check if we need to convert this using DOS-style short mode. If the path
51544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51545  # take no chances and rewrite it.
51546  # Note: m4 eats our [], so we need to use [ and ] instead.
51547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51548  if test "x$has_forbidden_chars" != x; then
51549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51553      # Going to short mode and back again did indeed matter. Since short mode is
51554      # case insensitive, let's make it lowercase to improve readability.
51555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51556      # Now convert it back to Unix-style (cygpath)
51557      input_path=`$CYGPATH -u "$shortmode_path"`
51558      new_path="$input_path"
51559    fi
51560  fi
51561
51562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51563  if test "x$test_cygdrive_prefix" = x; then
51564    # As a simple fix, exclude /usr/bin since it's not a real path.
51565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51567      # a path prefixed by /cygdrive for fixpath to work.
51568      new_path="$CYGWIN_ROOT_PATH$input_path"
51569    fi
51570  fi
51571
51572
51573  if test "x$path" != "x$new_path"; then
51574    FREETYPE_LIB_PATH="$new_path"
51575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51576$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51577  fi
51578
51579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51580
51581  path="$FREETYPE_LIB_PATH"
51582  has_colon=`$ECHO $path | $GREP ^.:`
51583  new_path="$path"
51584  if test "x$has_colon" = x; then
51585    # Not in mixed or Windows style, start by that.
51586    new_path=`cmd //c echo $path`
51587  fi
51588
51589
51590  input_path="$new_path"
51591  # Check if we need to convert this using DOS-style short mode. If the path
51592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51593  # take no chances and rewrite it.
51594  # Note: m4 eats our [], so we need to use [ and ] instead.
51595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51596  if test "x$has_forbidden_chars" != x; then
51597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51599  fi
51600
51601
51602  windows_path="$new_path"
51603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51604    unix_path=`$CYGPATH -u "$windows_path"`
51605    new_path="$unix_path"
51606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51608    new_path="$unix_path"
51609  fi
51610
51611  if test "x$path" != "x$new_path"; then
51612    FREETYPE_LIB_PATH="$new_path"
51613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51614$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51615  fi
51616
51617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51619
51620    else
51621      # We're on a unix platform. Hooray! :)
51622      path="$FREETYPE_LIB_PATH"
51623      has_space=`$ECHO "$path" | $GREP " "`
51624      if test "x$has_space" != x; then
51625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51626$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51628      fi
51629
51630      # Use eval to expand a potential ~
51631      eval path="$path"
51632      if test ! -f "$path" && test ! -d "$path"; then
51633        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51634      fi
51635
51636      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51637    fi
51638  fi
51639
51640      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51641        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
51642      else
51643        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
51644      fi
51645    fi
51646
51647    # Try to compile it
51648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
51649$as_echo_n "checking if we can compile and link with freetype... " >&6; }
51650    ac_ext=cpp
51651ac_cpp='$CXXCPP $CPPFLAGS'
51652ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51653ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51654ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51655
51656    PREV_CXXCFLAGS="$CXXFLAGS"
51657    PREV_LIBS="$LIBS"
51658    PREV_CXX="$CXX"
51659    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
51660    LIBS="$LIBS $FREETYPE_LIBS"
51661    CXX="$FIXPATH $CXX"
51662    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51663/* end confdefs.h.  */
51664
51665          #include<ft2build.h>
51666          #include FT_FREETYPE_H
51667          int main () {
51668            FT_Init_FreeType(NULL);
51669            return 0;
51670          }
51671
51672_ACEOF
51673if ac_fn_cxx_try_link "$LINENO"; then :
51674
51675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51676$as_echo "yes" >&6; }
51677
51678else
51679
51680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51681$as_echo "no" >&6; }
51682          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
51683$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
51684          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
51685$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
51686
51687
51688  # Print a helpful message on how to acquire the necessary build dependency.
51689  # freetype is the help tag: freetype, cups, alsa etc
51690  MISSING_DEPENDENCY=freetype
51691
51692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51693    cygwin_help $MISSING_DEPENDENCY
51694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51695    msys_help $MISSING_DEPENDENCY
51696  else
51697    PKGHANDLER_COMMAND=
51698
51699    case $PKGHANDLER in
51700      apt-get)
51701        apt_help     $MISSING_DEPENDENCY ;;
51702      yum)
51703        yum_help     $MISSING_DEPENDENCY ;;
51704      port)
51705        port_help    $MISSING_DEPENDENCY ;;
51706      pkgutil)
51707        pkgutil_help $MISSING_DEPENDENCY ;;
51708      pkgadd)
51709        pkgadd_help  $MISSING_DEPENDENCY ;;
51710    esac
51711
51712    if test "x$PKGHANDLER_COMMAND" != x; then
51713      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51714    fi
51715  fi
51716
51717
51718          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
51719
51720
51721fi
51722rm -f core conftest.err conftest.$ac_objext \
51723    conftest$ac_exeext conftest.$ac_ext
51724    CXXCFLAGS="$PREV_CXXFLAGS"
51725    LIBS="$PREV_LIBS"
51726    CXX="$PREV_CXX"
51727    ac_ext=cpp
51728ac_cpp='$CXXCPP $CPPFLAGS'
51729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51732
51733
51734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
51735$as_echo_n "checking if we should bundle freetype... " >&6; }
51736    if test "x$BUNDLE_FREETYPE" = xyes; then
51737      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
51738    fi
51739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
51740$as_echo "$BUNDLE_FREETYPE" >&6; }
51741
51742  fi # end freetype needed
51743
51744
51745
51746
51747
51748
51749
51750# Check whether --with-alsa was given.
51751if test "${with_alsa+set}" = set; then :
51752  withval=$with_alsa;
51753fi
51754
51755
51756# Check whether --with-alsa-include was given.
51757if test "${with_alsa_include+set}" = set; then :
51758  withval=$with_alsa_include;
51759fi
51760
51761
51762# Check whether --with-alsa-lib was given.
51763if test "${with_alsa_lib+set}" = set; then :
51764  withval=$with_alsa_lib;
51765fi
51766
51767
51768  if test "x$NEEDS_LIB_ALSA" = xfalse; then
51769    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
51770      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
51771$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
51772    fi
51773    ALSA_CFLAGS=
51774    ALSA_LIBS=
51775  else
51776    ALSA_FOUND=no
51777
51778    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
51779      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
51780    fi
51781
51782    if test "x${with_alsa}" != x; then
51783      ALSA_LIBS="-L${with_alsa}/lib -lasound"
51784      ALSA_CFLAGS="-I${with_alsa}/include"
51785      ALSA_FOUND=yes
51786    fi
51787    if test "x${with_alsa_include}" != x; then
51788      ALSA_CFLAGS="-I${with_alsa_include}"
51789      ALSA_FOUND=yes
51790    fi
51791    if test "x${with_alsa_lib}" != x; then
51792      ALSA_LIBS="-L${with_alsa_lib} -lasound"
51793      ALSA_FOUND=yes
51794    fi
51795    # Do not try pkg-config if we have a sysroot set.
51796    if test "x$SYSROOT" = x; then
51797      if test "x$ALSA_FOUND" = xno; then
51798
51799pkg_failed=no
51800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
51801$as_echo_n "checking for ALSA... " >&6; }
51802
51803if test -n "$ALSA_CFLAGS"; then
51804    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
51805 elif test -n "$PKG_CONFIG"; then
51806    if test -n "$PKG_CONFIG" && \
51807    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51808  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51809  ac_status=$?
51810  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51811  test $ac_status = 0; }; then
51812  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
51813else
51814  pkg_failed=yes
51815fi
51816 else
51817    pkg_failed=untried
51818fi
51819if test -n "$ALSA_LIBS"; then
51820    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
51821 elif test -n "$PKG_CONFIG"; then
51822    if test -n "$PKG_CONFIG" && \
51823    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51824  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51825  ac_status=$?
51826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51827  test $ac_status = 0; }; then
51828  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
51829else
51830  pkg_failed=yes
51831fi
51832 else
51833    pkg_failed=untried
51834fi
51835
51836
51837
51838if test $pkg_failed = yes; then
51839
51840if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51841        _pkg_short_errors_supported=yes
51842else
51843        _pkg_short_errors_supported=no
51844fi
51845        if test $_pkg_short_errors_supported = yes; then
51846	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
51847        else
51848	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
51849        fi
51850	# Put the nasty error message in config.log where it belongs
51851	echo "$ALSA_PKG_ERRORS" >&5
51852
51853	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51854$as_echo "no" >&6; }
51855                ALSA_FOUND=no
51856elif test $pkg_failed = untried; then
51857	ALSA_FOUND=no
51858else
51859	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
51860	ALSA_LIBS=$pkg_cv_ALSA_LIBS
51861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51862$as_echo "yes" >&6; }
51863	ALSA_FOUND=yes
51864fi
51865      fi
51866    fi
51867    if test "x$ALSA_FOUND" = xno; then
51868      for ac_header in alsa/asoundlib.h
51869do :
51870  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
51871if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
51872  cat >>confdefs.h <<_ACEOF
51873#define HAVE_ALSA_ASOUNDLIB_H 1
51874_ACEOF
51875
51876            ALSA_FOUND=yes
51877            ALSA_CFLAGS=-Iignoreme
51878            ALSA_LIBS=-lasound
51879            DEFAULT_ALSA=yes
51880
51881else
51882  ALSA_FOUND=no
51883
51884fi
51885
51886done
51887
51888    fi
51889    if test "x$ALSA_FOUND" = xno; then
51890
51891  # Print a helpful message on how to acquire the necessary build dependency.
51892  # alsa is the help tag: freetype, cups, alsa etc
51893  MISSING_DEPENDENCY=alsa
51894
51895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51896    cygwin_help $MISSING_DEPENDENCY
51897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51898    msys_help $MISSING_DEPENDENCY
51899  else
51900    PKGHANDLER_COMMAND=
51901
51902    case $PKGHANDLER in
51903      apt-get)
51904        apt_help     $MISSING_DEPENDENCY ;;
51905      yum)
51906        yum_help     $MISSING_DEPENDENCY ;;
51907      port)
51908        port_help    $MISSING_DEPENDENCY ;;
51909      pkgutil)
51910        pkgutil_help $MISSING_DEPENDENCY ;;
51911      pkgadd)
51912        pkgadd_help  $MISSING_DEPENDENCY ;;
51913    esac
51914
51915    if test "x$PKGHANDLER_COMMAND" != x; then
51916      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51917    fi
51918  fi
51919
51920      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
51921    fi
51922  fi
51923
51924
51925
51926
51927
51928
51929# Check whether --with-libffi was given.
51930if test "${with_libffi+set}" = set; then :
51931  withval=$with_libffi;
51932fi
51933
51934
51935# Check whether --with-libffi-include was given.
51936if test "${with_libffi_include+set}" = set; then :
51937  withval=$with_libffi_include;
51938fi
51939
51940
51941# Check whether --with-libffi-lib was given.
51942if test "${with_libffi_lib+set}" = set; then :
51943  withval=$with_libffi_lib;
51944fi
51945
51946
51947  if test "x$NEEDS_LIB_FFI" = xfalse; then
51948    if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
51949      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
51950$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
51951    fi
51952    LIBFFI_CFLAGS=
51953    LIBFFI_LIBS=
51954  else
51955    LIBFFI_FOUND=no
51956
51957    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
51958      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
51959    fi
51960
51961    if test "x${with_libffi}" != x; then
51962      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
51963      LIBFFI_CFLAGS="-I${with_libffi}/include"
51964      LIBFFI_FOUND=yes
51965    fi
51966    if test "x${with_libffi_include}" != x; then
51967      LIBFFI_CFLAGS="-I${with_libffi_include}"
51968      LIBFFI_FOUND=yes
51969    fi
51970    if test "x${with_libffi_lib}" != x; then
51971      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
51972      LIBFFI_FOUND=yes
51973    fi
51974    # Do not try pkg-config if we have a sysroot set.
51975    if test "x$SYSROOT" = x; then
51976      if test "x$LIBFFI_FOUND" = xno; then
51977        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
51978
51979pkg_failed=no
51980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
51981$as_echo_n "checking for LIBFFI... " >&6; }
51982
51983if test -n "$LIBFFI_CFLAGS"; then
51984    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
51985 elif test -n "$PKG_CONFIG"; then
51986    if test -n "$PKG_CONFIG" && \
51987    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
51988  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
51989  ac_status=$?
51990  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51991  test $ac_status = 0; }; then
51992  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
51993else
51994  pkg_failed=yes
51995fi
51996 else
51997    pkg_failed=untried
51998fi
51999if test -n "$LIBFFI_LIBS"; then
52000    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
52001 elif test -n "$PKG_CONFIG"; then
52002    if test -n "$PKG_CONFIG" && \
52003    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
52004  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
52005  ac_status=$?
52006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52007  test $ac_status = 0; }; then
52008  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
52009else
52010  pkg_failed=yes
52011fi
52012 else
52013    pkg_failed=untried
52014fi
52015
52016
52017
52018if test $pkg_failed = yes; then
52019
52020if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52021        _pkg_short_errors_supported=yes
52022else
52023        _pkg_short_errors_supported=no
52024fi
52025        if test $_pkg_short_errors_supported = yes; then
52026	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
52027        else
52028	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
52029        fi
52030	# Put the nasty error message in config.log where it belongs
52031	echo "$LIBFFI_PKG_ERRORS" >&5
52032
52033	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52034$as_echo "no" >&6; }
52035                LIBFFI_FOUND=no
52036elif test $pkg_failed = untried; then
52037	LIBFFI_FOUND=no
52038else
52039	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
52040	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
52041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52042$as_echo "yes" >&6; }
52043	LIBFFI_FOUND=yes
52044fi
52045      fi
52046    fi
52047    if test "x$LIBFFI_FOUND" = xno; then
52048      for ac_header in ffi.h
52049do :
52050  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
52051if test "x$ac_cv_header_ffi_h" = xyes; then :
52052  cat >>confdefs.h <<_ACEOF
52053#define HAVE_FFI_H 1
52054_ACEOF
52055
52056            LIBFFI_FOUND=yes
52057            LIBFFI_CFLAGS=
52058            LIBFFI_LIBS=-lffi
52059
52060else
52061  LIBFFI_FOUND=no
52062
52063fi
52064
52065done
52066
52067    fi
52068    if test "x$LIBFFI_FOUND" = xno; then
52069
52070  # Print a helpful message on how to acquire the necessary build dependency.
52071  # ffi is the help tag: freetype, cups, alsa etc
52072  MISSING_DEPENDENCY=ffi
52073
52074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52075    cygwin_help $MISSING_DEPENDENCY
52076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52077    msys_help $MISSING_DEPENDENCY
52078  else
52079    PKGHANDLER_COMMAND=
52080
52081    case $PKGHANDLER in
52082      apt-get)
52083        apt_help     $MISSING_DEPENDENCY ;;
52084      yum)
52085        yum_help     $MISSING_DEPENDENCY ;;
52086      port)
52087        port_help    $MISSING_DEPENDENCY ;;
52088      pkgutil)
52089        pkgutil_help $MISSING_DEPENDENCY ;;
52090      pkgadd)
52091        pkgadd_help  $MISSING_DEPENDENCY ;;
52092    esac
52093
52094    if test "x$PKGHANDLER_COMMAND" != x; then
52095      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52096    fi
52097  fi
52098
52099      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
52100    fi
52101
52102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
52103$as_echo_n "checking if libffi works... " >&6; }
52104    ac_ext=c
52105ac_cpp='$CPP $CPPFLAGS'
52106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52108ac_compiler_gnu=$ac_cv_c_compiler_gnu
52109
52110    OLD_CFLAGS="$CFLAGS"
52111    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
52112    OLD_LIBS="$LIBS"
52113    LIBS="$LIBS $LIBFFI_LIBS"
52114    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52115/* end confdefs.h.  */
52116#include <ffi.h>
52117int
52118main ()
52119{
52120
52121          ffi_call(NULL, NULL, NULL, NULL);
52122          return 0;
52123
52124  ;
52125  return 0;
52126}
52127_ACEOF
52128if ac_fn_c_try_link "$LINENO"; then :
52129  LIBFFI_WORKS=yes
52130else
52131  LIBFFI_WORKS=no
52132
52133fi
52134rm -f core conftest.err conftest.$ac_objext \
52135    conftest$ac_exeext conftest.$ac_ext
52136    CFLAGS="$OLD_CFLAGS"
52137    LIBS="$OLD_LIBS"
52138    ac_ext=cpp
52139ac_cpp='$CXXCPP $CPPFLAGS'
52140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52143
52144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
52145$as_echo "$LIBFFI_WORKS" >&6; }
52146
52147    if test "x$LIBFFI_WORKS" = xno; then
52148
52149  # Print a helpful message on how to acquire the necessary build dependency.
52150  # ffi is the help tag: freetype, cups, alsa etc
52151  MISSING_DEPENDENCY=ffi
52152
52153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52154    cygwin_help $MISSING_DEPENDENCY
52155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52156    msys_help $MISSING_DEPENDENCY
52157  else
52158    PKGHANDLER_COMMAND=
52159
52160    case $PKGHANDLER in
52161      apt-get)
52162        apt_help     $MISSING_DEPENDENCY ;;
52163      yum)
52164        yum_help     $MISSING_DEPENDENCY ;;
52165      port)
52166        port_help    $MISSING_DEPENDENCY ;;
52167      pkgutil)
52168        pkgutil_help $MISSING_DEPENDENCY ;;
52169      pkgadd)
52170        pkgadd_help  $MISSING_DEPENDENCY ;;
52171    esac
52172
52173    if test "x$PKGHANDLER_COMMAND" != x; then
52174      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52175    fi
52176  fi
52177
52178      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
52179    fi
52180  fi
52181
52182
52183
52184
52185
52186  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
52187    # Extract the first word of "llvm-config", so it can be a program name with args.
52188set dummy llvm-config; ac_word=$2
52189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52190$as_echo_n "checking for $ac_word... " >&6; }
52191if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
52192  $as_echo_n "(cached) " >&6
52193else
52194  if test -n "$LLVM_CONFIG"; then
52195  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
52196else
52197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52198for as_dir in $PATH
52199do
52200  IFS=$as_save_IFS
52201  test -z "$as_dir" && as_dir=.
52202    for ac_exec_ext in '' $ac_executable_extensions; do
52203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52204    ac_cv_prog_LLVM_CONFIG="llvm-config"
52205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52206    break 2
52207  fi
52208done
52209  done
52210IFS=$as_save_IFS
52211
52212fi
52213fi
52214LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
52215if test -n "$LLVM_CONFIG"; then
52216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
52217$as_echo "$LLVM_CONFIG" >&6; }
52218else
52219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52220$as_echo "no" >&6; }
52221fi
52222
52223
52224
52225    if test "x$LLVM_CONFIG" != xllvm-config; then
52226      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
52227    fi
52228
52229    llvm_components="jit mcjit engine nativecodegen native"
52230    unset LLVM_CFLAGS
52231    for flag in $("$LLVM_CONFIG" --cxxflags); do
52232      if echo "${flag}" | grep -q '^-[ID]'; then
52233        if test "${flag}" != "-D_DEBUG" ; then
52234          if test "${LLVM_CFLAGS}" != "" ; then
52235            LLVM_CFLAGS="${LLVM_CFLAGS} "
52236          fi
52237          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
52238        fi
52239      fi
52240    done
52241    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
52242    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
52243
52244    unset LLVM_LDFLAGS
52245    for flag in $("${LLVM_CONFIG}" --ldflags); do
52246      if echo "${flag}" | grep -q '^-L'; then
52247        if test "${LLVM_LDFLAGS}" != ""; then
52248          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
52249        fi
52250        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
52251      fi
52252    done
52253
52254    unset LLVM_LIBS
52255    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
52256      if echo "${flag}" | grep -q '^-l'; then
52257        if test "${LLVM_LIBS}" != ""; then
52258          LLVM_LIBS="${LLVM_LIBS} "
52259        fi
52260        LLVM_LIBS="${LLVM_LIBS}${flag}"
52261      fi
52262    done
52263
52264
52265
52266
52267  fi
52268
52269
52270
52271# Check whether --with-libjpeg was given.
52272if test "${with_libjpeg+set}" = set; then :
52273  withval=$with_libjpeg;
52274fi
52275
52276
52277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
52278$as_echo_n "checking for which libjpeg to use... " >&6; }
52279  # default is bundled
52280  DEFAULT_LIBJPEG=bundled
52281  # if user didn't specify, use DEFAULT_LIBJPEG
52282  if test "x${with_libjpeg}" = "x"; then
52283    with_libjpeg=${DEFAULT_LIBJPEG}
52284  fi
52285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
52286$as_echo "${with_libjpeg}" >&6; }
52287
52288  if test "x${with_libjpeg}" = "xbundled"; then
52289    USE_EXTERNAL_LIBJPEG=false
52290  elif test "x${with_libjpeg}" = "xsystem"; then
52291    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
52292if test "x$ac_cv_header_jpeglib_h" = xyes; then :
52293
52294else
52295   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
52296fi
52297
52298
52299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
52300$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
52301if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
52302  $as_echo_n "(cached) " >&6
52303else
52304  ac_check_lib_save_LIBS=$LIBS
52305LIBS="-ljpeg  $LIBS"
52306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52307/* end confdefs.h.  */
52308
52309/* Override any GCC internal prototype to avoid an error.
52310   Use char because int might match the return type of a GCC
52311   builtin and then its argument prototype would still apply.  */
52312#ifdef __cplusplus
52313extern "C"
52314#endif
52315char jpeg_CreateDecompress ();
52316int
52317main ()
52318{
52319return jpeg_CreateDecompress ();
52320  ;
52321  return 0;
52322}
52323_ACEOF
52324if ac_fn_cxx_try_link "$LINENO"; then :
52325  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
52326else
52327  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
52328fi
52329rm -f core conftest.err conftest.$ac_objext \
52330    conftest$ac_exeext conftest.$ac_ext
52331LIBS=$ac_check_lib_save_LIBS
52332fi
52333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
52334$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
52335if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
52336  cat >>confdefs.h <<_ACEOF
52337#define HAVE_LIBJPEG 1
52338_ACEOF
52339
52340  LIBS="-ljpeg $LIBS"
52341
52342else
52343   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
52344fi
52345
52346
52347    USE_EXTERNAL_LIBJPEG=true
52348  else
52349    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
52350  fi
52351
52352
52353
52354
52355
52356# Check whether --with-giflib was given.
52357if test "${with_giflib+set}" = set; then :
52358  withval=$with_giflib;
52359fi
52360
52361
52362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
52363$as_echo_n "checking for which giflib to use... " >&6; }
52364  # default is bundled
52365  DEFAULT_GIFLIB=bundled
52366  # if user didn't specify, use DEFAULT_GIFLIB
52367  if test "x${with_giflib}" = "x"; then
52368    with_giflib=${DEFAULT_GIFLIB}
52369  fi
52370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
52371$as_echo "${with_giflib}" >&6; }
52372
52373  if test "x${with_giflib}" = "xbundled"; then
52374    USE_EXTERNAL_LIBGIF=false
52375  elif test "x${with_giflib}" = "xsystem"; then
52376    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
52377if test "x$ac_cv_header_gif_lib_h" = xyes; then :
52378
52379else
52380   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
52381fi
52382
52383
52384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
52385$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
52386if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
52387  $as_echo_n "(cached) " >&6
52388else
52389  ac_check_lib_save_LIBS=$LIBS
52390LIBS="-lgif  $LIBS"
52391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52392/* end confdefs.h.  */
52393
52394/* Override any GCC internal prototype to avoid an error.
52395   Use char because int might match the return type of a GCC
52396   builtin and then its argument prototype would still apply.  */
52397#ifdef __cplusplus
52398extern "C"
52399#endif
52400char DGifGetCode ();
52401int
52402main ()
52403{
52404return DGifGetCode ();
52405  ;
52406  return 0;
52407}
52408_ACEOF
52409if ac_fn_cxx_try_link "$LINENO"; then :
52410  ac_cv_lib_gif_DGifGetCode=yes
52411else
52412  ac_cv_lib_gif_DGifGetCode=no
52413fi
52414rm -f core conftest.err conftest.$ac_objext \
52415    conftest$ac_exeext conftest.$ac_ext
52416LIBS=$ac_check_lib_save_LIBS
52417fi
52418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
52419$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
52420if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
52421  cat >>confdefs.h <<_ACEOF
52422#define HAVE_LIBGIF 1
52423_ACEOF
52424
52425  LIBS="-lgif $LIBS"
52426
52427else
52428   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
52429fi
52430
52431
52432    USE_EXTERNAL_LIBGIF=true
52433  else
52434    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
52435  fi
52436
52437
52438
52439
52440
52441# Check whether --with-libpng was given.
52442if test "${with_libpng+set}" = set; then :
52443  withval=$with_libpng;
52444fi
52445
52446
52447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
52448$as_echo_n "checking for which libpng to use... " >&6; }
52449
52450  # default is bundled
52451  DEFAULT_LIBPNG=bundled
52452  # if user didn't specify, use DEFAULT_LIBPNG
52453  if test "x${with_libpng}" = "x"; then
52454      with_libpng=${DEFAULT_LIBPNG}
52455  fi
52456
52457  if test "x${with_libpng}" = "xbundled"; then
52458      USE_EXTERNAL_LIBPNG=false
52459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52460$as_echo "bundled" >&6; }
52461  elif test "x${with_libpng}" = "xsystem"; then
52462
52463pkg_failed=no
52464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
52465$as_echo_n "checking for PNG... " >&6; }
52466
52467if test -n "$PNG_CFLAGS"; then
52468    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
52469 elif test -n "$PKG_CONFIG"; then
52470    if test -n "$PKG_CONFIG" && \
52471    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52472  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52473  ac_status=$?
52474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52475  test $ac_status = 0; }; then
52476  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
52477else
52478  pkg_failed=yes
52479fi
52480 else
52481    pkg_failed=untried
52482fi
52483if test -n "$PNG_LIBS"; then
52484    pkg_cv_PNG_LIBS="$PNG_LIBS"
52485 elif test -n "$PKG_CONFIG"; then
52486    if test -n "$PKG_CONFIG" && \
52487    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52488  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52489  ac_status=$?
52490  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52491  test $ac_status = 0; }; then
52492  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
52493else
52494  pkg_failed=yes
52495fi
52496 else
52497    pkg_failed=untried
52498fi
52499
52500
52501
52502if test $pkg_failed = yes; then
52503
52504if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52505        _pkg_short_errors_supported=yes
52506else
52507        _pkg_short_errors_supported=no
52508fi
52509        if test $_pkg_short_errors_supported = yes; then
52510	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
52511        else
52512	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
52513        fi
52514	# Put the nasty error message in config.log where it belongs
52515	echo "$PNG_PKG_ERRORS" >&5
52516
52517	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52518$as_echo "no" >&6; }
52519                 LIBPNG_FOUND=no
52520elif test $pkg_failed = untried; then
52521	 LIBPNG_FOUND=no
52522else
52523	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
52524	PNG_LIBS=$pkg_cv_PNG_LIBS
52525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52526$as_echo "yes" >&6; }
52527	 LIBPNG_FOUND=yes
52528fi
52529      if test "x${LIBPNG_FOUND}" = "xyes"; then
52530          USE_EXTERNAL_LIBPNG=true
52531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52532$as_echo "system" >&6; }
52533      else
52534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52535$as_echo "system not found" >&6; }
52536          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
52537      fi
52538  else
52539      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
52540  fi
52541
52542
52543
52544
52545
52546# Check whether --with-zlib was given.
52547if test "${with_zlib+set}" = set; then :
52548  withval=$with_zlib;
52549fi
52550
52551
52552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
52553$as_echo_n "checking for compress in -lz... " >&6; }
52554if ${ac_cv_lib_z_compress+:} false; then :
52555  $as_echo_n "(cached) " >&6
52556else
52557  ac_check_lib_save_LIBS=$LIBS
52558LIBS="-lz  $LIBS"
52559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52560/* end confdefs.h.  */
52561
52562/* Override any GCC internal prototype to avoid an error.
52563   Use char because int might match the return type of a GCC
52564   builtin and then its argument prototype would still apply.  */
52565#ifdef __cplusplus
52566extern "C"
52567#endif
52568char compress ();
52569int
52570main ()
52571{
52572return compress ();
52573  ;
52574  return 0;
52575}
52576_ACEOF
52577if ac_fn_cxx_try_link "$LINENO"; then :
52578  ac_cv_lib_z_compress=yes
52579else
52580  ac_cv_lib_z_compress=no
52581fi
52582rm -f core conftest.err conftest.$ac_objext \
52583    conftest$ac_exeext conftest.$ac_ext
52584LIBS=$ac_check_lib_save_LIBS
52585fi
52586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
52587$as_echo "$ac_cv_lib_z_compress" >&6; }
52588if test "x$ac_cv_lib_z_compress" = xyes; then :
52589   ZLIB_FOUND=yes
52590else
52591   ZLIB_FOUND=no
52592fi
52593
52594
52595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
52596$as_echo_n "checking for which zlib to use... " >&6; }
52597
52598  DEFAULT_ZLIB=bundled
52599  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52600    # On macosx default is system...on others default is bundled
52601    DEFAULT_ZLIB=system
52602  fi
52603
52604  if test "x${ZLIB_FOUND}" != "xyes"; then
52605    # If we don't find any system...set default to bundled
52606    DEFAULT_ZLIB=bundled
52607  fi
52608
52609  # If user didn't specify, use DEFAULT_ZLIB
52610  if test "x${with_zlib}" = "x"; then
52611    with_zlib=${DEFAULT_ZLIB}
52612  fi
52613
52614  if test "x${with_zlib}" = "xbundled"; then
52615    USE_EXTERNAL_LIBZ=false
52616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52617$as_echo "bundled" >&6; }
52618  elif test "x${with_zlib}" = "xsystem"; then
52619    if test "x${ZLIB_FOUND}" = "xyes"; then
52620      USE_EXTERNAL_LIBZ=true
52621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52622$as_echo "system" >&6; }
52623    else
52624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52625$as_echo "system not found" >&6; }
52626      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
52627    fi
52628  else
52629    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
52630  fi
52631
52632
52633
52634
52635
52636# Check whether --with-lcms was given.
52637if test "${with_lcms+set}" = set; then :
52638  withval=$with_lcms;
52639fi
52640
52641
52642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
52643$as_echo_n "checking for which lcms to use... " >&6; }
52644
52645  DEFAULT_LCMS=bundled
52646  # If user didn't specify, use DEFAULT_LCMS
52647  if test "x${with_lcms}" = "x"; then
52648      with_lcms=${DEFAULT_LCMS}
52649  fi
52650
52651  if test "x${with_lcms}" = "xbundled"; then
52652    USE_EXTERNAL_LCMS=false
52653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52654$as_echo "bundled" >&6; }
52655  elif test "x${with_lcms}" = "xsystem"; then
52656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52657$as_echo "system" >&6; }
52658
52659pkg_failed=no
52660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
52661$as_echo_n "checking for LCMS... " >&6; }
52662
52663if test -n "$LCMS_CFLAGS"; then
52664    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
52665 elif test -n "$PKG_CONFIG"; then
52666    if test -n "$PKG_CONFIG" && \
52667    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52668  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52669  ac_status=$?
52670  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52671  test $ac_status = 0; }; then
52672  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
52673else
52674  pkg_failed=yes
52675fi
52676 else
52677    pkg_failed=untried
52678fi
52679if test -n "$LCMS_LIBS"; then
52680    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
52681 elif test -n "$PKG_CONFIG"; then
52682    if test -n "$PKG_CONFIG" && \
52683    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52684  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52685  ac_status=$?
52686  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52687  test $ac_status = 0; }; then
52688  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
52689else
52690  pkg_failed=yes
52691fi
52692 else
52693    pkg_failed=untried
52694fi
52695
52696
52697
52698if test $pkg_failed = yes; then
52699
52700if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52701        _pkg_short_errors_supported=yes
52702else
52703        _pkg_short_errors_supported=no
52704fi
52705        if test $_pkg_short_errors_supported = yes; then
52706	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
52707        else
52708	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
52709        fi
52710	# Put the nasty error message in config.log where it belongs
52711	echo "$LCMS_PKG_ERRORS" >&5
52712
52713	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52714$as_echo "no" >&6; }
52715                LCMS_FOUND=no
52716elif test $pkg_failed = untried; then
52717	LCMS_FOUND=no
52718else
52719	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
52720	LCMS_LIBS=$pkg_cv_LCMS_LIBS
52721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52722$as_echo "yes" >&6; }
52723	LCMS_FOUND=yes
52724fi
52725    if test "x${LCMS_FOUND}" = "xyes"; then
52726      USE_EXTERNAL_LCMS=true
52727    else
52728      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
52729    fi
52730  else
52731    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
52732  fi
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744  # Setup libm (the maths library)
52745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
52746$as_echo_n "checking for cos in -lm... " >&6; }
52747if ${ac_cv_lib_m_cos+:} false; then :
52748  $as_echo_n "(cached) " >&6
52749else
52750  ac_check_lib_save_LIBS=$LIBS
52751LIBS="-lm  $LIBS"
52752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52753/* end confdefs.h.  */
52754
52755/* Override any GCC internal prototype to avoid an error.
52756   Use char because int might match the return type of a GCC
52757   builtin and then its argument prototype would still apply.  */
52758#ifdef __cplusplus
52759extern "C"
52760#endif
52761char cos ();
52762int
52763main ()
52764{
52765return cos ();
52766  ;
52767  return 0;
52768}
52769_ACEOF
52770if ac_fn_cxx_try_link "$LINENO"; then :
52771  ac_cv_lib_m_cos=yes
52772else
52773  ac_cv_lib_m_cos=no
52774fi
52775rm -f core conftest.err conftest.$ac_objext \
52776    conftest$ac_exeext conftest.$ac_ext
52777LIBS=$ac_check_lib_save_LIBS
52778fi
52779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
52780$as_echo "$ac_cv_lib_m_cos" >&6; }
52781if test "x$ac_cv_lib_m_cos" = xyes; then :
52782  cat >>confdefs.h <<_ACEOF
52783#define HAVE_LIBM 1
52784_ACEOF
52785
52786  LIBS="-lm $LIBS"
52787
52788else
52789
52790      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
52791$as_echo "$as_me: Maths library was not found" >&6;}
52792
52793fi
52794
52795  LIBM=-lm
52796
52797
52798  # Setup libdl (for dynamic library loading)
52799  save_LIBS="$LIBS"
52800  LIBS=""
52801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
52802$as_echo_n "checking for dlopen in -ldl... " >&6; }
52803if ${ac_cv_lib_dl_dlopen+:} false; then :
52804  $as_echo_n "(cached) " >&6
52805else
52806  ac_check_lib_save_LIBS=$LIBS
52807LIBS="-ldl  $LIBS"
52808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52809/* end confdefs.h.  */
52810
52811/* Override any GCC internal prototype to avoid an error.
52812   Use char because int might match the return type of a GCC
52813   builtin and then its argument prototype would still apply.  */
52814#ifdef __cplusplus
52815extern "C"
52816#endif
52817char dlopen ();
52818int
52819main ()
52820{
52821return dlopen ();
52822  ;
52823  return 0;
52824}
52825_ACEOF
52826if ac_fn_cxx_try_link "$LINENO"; then :
52827  ac_cv_lib_dl_dlopen=yes
52828else
52829  ac_cv_lib_dl_dlopen=no
52830fi
52831rm -f core conftest.err conftest.$ac_objext \
52832    conftest$ac_exeext conftest.$ac_ext
52833LIBS=$ac_check_lib_save_LIBS
52834fi
52835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
52836$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
52837if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
52838  cat >>confdefs.h <<_ACEOF
52839#define HAVE_LIBDL 1
52840_ACEOF
52841
52842  LIBS="-ldl $LIBS"
52843
52844fi
52845
52846  LIBDL="$LIBS"
52847
52848  LIBS="$save_LIBS"
52849
52850  # Deprecated libraries, keep the flags for backwards compatibility
52851  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52852
52853
52854# Check whether --with-dxsdk was given.
52855if test "${with_dxsdk+set}" = set; then :
52856  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52857$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52858fi
52859
52860
52861
52862
52863# Check whether --with-dxsdk-lib was given.
52864if test "${with_dxsdk_lib+set}" = set; then :
52865  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52866$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52867fi
52868
52869
52870
52871
52872# Check whether --with-dxsdk-include was given.
52873if test "${with_dxsdk_include+set}" = set; then :
52874  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52875$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52876fi
52877
52878
52879  fi
52880
52881  # Control if libzip can use mmap. Available for purposes of overriding.
52882  LIBZIP_CAN_USE_MMAP=true
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897###############################################################################
52898#
52899# We need to do some final tweaking, when everything else is done.
52900#
52901###############################################################################
52902
52903
52904  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52905
52906
52907  # The name of the Service Agent jar.
52908  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52909  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52910    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52911  fi
52912
52913
52914
52915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52916$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52917
52918    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52919      ENABLE_INTREE_EC=yes
52920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52921$as_echo "yes" >&6; }
52922    else
52923      ENABLE_INTREE_EC=no
52924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52925$as_echo "no" >&6; }
52926    fi
52927
52928
52929
52930
52931###############################################################################
52932#
52933# Configure parts of the build that only affect the build performance,
52934# not the result.
52935#
52936###############################################################################
52937
52938
52939  # How many cores do we have on this build system?
52940
52941# Check whether --with-num-cores was given.
52942if test "${with_num_cores+set}" = set; then :
52943  withval=$with_num_cores;
52944fi
52945
52946  if test "x$with_num_cores" = x; then
52947    # The number of cores were not specified, try to probe them.
52948
52949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52950$as_echo_n "checking for number of cores... " >&6; }
52951  NUM_CORES=1
52952  FOUND_CORES=no
52953
52954  if test -f /proc/cpuinfo; then
52955    # Looks like a Linux (or cygwin) system
52956    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52957    FOUND_CORES=yes
52958  elif test -x /usr/sbin/psrinfo; then
52959    # Looks like a Solaris system
52960    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52961    FOUND_CORES=yes
52962  elif test -x /usr/sbin/system_profiler; then
52963    # Looks like a MacOSX system
52964    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52965    FOUND_CORES=yes
52966  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52967    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52968    FOUND_CORES=yes
52969  elif test -n "$NUMBER_OF_PROCESSORS"; then
52970    # On windows, look in the env
52971    NUM_CORES=$NUMBER_OF_PROCESSORS
52972    FOUND_CORES=yes
52973  fi
52974
52975  if test "x$FOUND_CORES" = xyes; then
52976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52977$as_echo "$NUM_CORES" >&6; }
52978  else
52979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52980$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52981    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52982$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52983  fi
52984
52985  else
52986    NUM_CORES=$with_num_cores
52987  fi
52988
52989
52990
52991  # How much memory do we have on this build system?
52992
52993# Check whether --with-memory-size was given.
52994if test "${with_memory_size+set}" = set; then :
52995  withval=$with_memory_size;
52996fi
52997
52998  if test "x$with_memory_size" = x; then
52999    # The memory size was not specified, try to probe it.
53000
53001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
53002$as_echo_n "checking for memory size... " >&6; }
53003  # Default to 1024 MB
53004  MEMORY_SIZE=1024
53005  FOUND_MEM=no
53006
53007  if test -f /proc/meminfo; then
53008    # Looks like a Linux (or cygwin) system
53009    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
53010    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
53011    FOUND_MEM=yes
53012  elif test -x /usr/sbin/prtconf; then
53013    # Looks like a Solaris or AIX system
53014    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
53015    FOUND_MEM=yes
53016  elif test -x /usr/sbin/system_profiler; then
53017    # Looks like a MacOSX system
53018    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
53019    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
53020    FOUND_MEM=yes
53021  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53022    # Windows, but without cygwin
53023    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
53024    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
53025    FOUND_MEM=yes
53026  fi
53027
53028  if test "x$FOUND_MEM" = xyes; then
53029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
53030$as_echo "$MEMORY_SIZE MB" >&6; }
53031  else
53032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
53033$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
53034    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
53035$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
53036  fi
53037
53038  else
53039    MEMORY_SIZE=$with_memory_size
53040  fi
53041
53042
53043
53044  # Provide a decent default number of parallel jobs for make depending on
53045  # number of cores, amount of memory and machine architecture.
53046
53047# Check whether --with-jobs was given.
53048if test "${with_jobs+set}" = set; then :
53049  withval=$with_jobs;
53050fi
53051
53052  if test "x$with_jobs" = x; then
53053    # Number of jobs was not specified, calculate.
53054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
53055$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
53056    # Approximate memory in GB.
53057    memory_gb=`expr $MEMORY_SIZE / 1024`
53058    # Pick the lowest of memory in gb and number of cores.
53059    if test "$memory_gb" -lt "$NUM_CORES"; then
53060      JOBS="$memory_gb"
53061    else
53062      JOBS="$NUM_CORES"
53063      # On bigger machines, leave some room for other processes to run
53064      if test "$JOBS" -gt "4"; then
53065        JOBS=`expr $JOBS '*' 90 / 100`
53066      fi
53067    fi
53068    # Cap number of jobs to 16
53069    if test "$JOBS" -gt "16"; then
53070      JOBS=16
53071    fi
53072    if test "$JOBS" -eq "0"; then
53073      JOBS=1
53074    fi
53075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53076$as_echo "$JOBS" >&6; }
53077  else
53078    JOBS=$with_jobs
53079  fi
53080
53081
53082
53083# Setup arguments for the boot jdk (after cores and memory have been setup)
53084
53085  ##############################################################################
53086  #
53087  # Specify jvm options for anything that is run with the Boot JDK.
53088  # Not all JVM:s accept the same arguments on the command line.
53089  #
53090
53091# Check whether --with-boot-jdk-jvmargs was given.
53092if test "${with_boot_jdk_jvmargs+set}" = set; then :
53093  withval=$with_boot_jdk_jvmargs;
53094fi
53095
53096
53097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
53098$as_echo_n "checking flags for boot jdk java command ... " >&6; }
53099
53100  # Disable special log output when a debug build is used as Boot JDK...
53101
53102  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
53103  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
53104  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
53105  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53106  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53107  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53108    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
53109    JVM_ARG_OK=true
53110  else
53111    $ECHO "Arg failed:" >&5
53112    $ECHO "$OUTPUT" >&5
53113    JVM_ARG_OK=false
53114  fi
53115
53116
53117  # Apply user provided options.
53118
53119  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
53120  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
53121  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
53122  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53123  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53124  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53125    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
53126    JVM_ARG_OK=true
53127  else
53128    $ECHO "Arg failed:" >&5
53129    $ECHO "$OUTPUT" >&5
53130    JVM_ARG_OK=false
53131  fi
53132
53133
53134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
53135$as_echo "$boot_jdk_jvmargs" >&6; }
53136
53137  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
53138  JAVA_FLAGS=$boot_jdk_jvmargs
53139
53140
53141
53142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
53143$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
53144
53145  # Starting amount of heap memory.
53146
53147  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
53148  $ECHO "Command: $JAVA -Xms64M -version" >&5
53149  OUTPUT=`$JAVA -Xms64M -version 2>&1`
53150  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53151  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53152  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53153    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
53154    JVM_ARG_OK=true
53155  else
53156    $ECHO "Arg failed:" >&5
53157    $ECHO "$OUTPUT" >&5
53158    JVM_ARG_OK=false
53159  fi
53160
53161
53162  # Maximum amount of heap memory.
53163  # Maximum stack size.
53164  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
53165  if test "x$BUILD_NUM_BITS" = x32; then
53166    if test "$JVM_MAX_HEAP" -gt "1100"; then
53167      JVM_MAX_HEAP=1100
53168    elif test "$JVM_MAX_HEAP" -lt "512"; then
53169      JVM_MAX_HEAP=512
53170    fi
53171    STACK_SIZE=768
53172  else
53173    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
53174    # pointers are used. Apparently, we need to increase the heap and stack
53175    # space for the jvm. More specifically, when running javac to build huge
53176    # jdk batch
53177    if test "$JVM_MAX_HEAP" -gt "1600"; then
53178      JVM_MAX_HEAP=1600
53179    elif test "$JVM_MAX_HEAP" -lt "512"; then
53180      JVM_MAX_HEAP=512
53181    fi
53182    STACK_SIZE=1536
53183  fi
53184
53185  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
53186  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
53187  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
53188  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53189  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53190  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53191    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
53192    JVM_ARG_OK=true
53193  else
53194    $ECHO "Arg failed:" >&5
53195    $ECHO "$OUTPUT" >&5
53196    JVM_ARG_OK=false
53197  fi
53198
53199
53200  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53201  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53202  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53203  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53204  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53206    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53207    JVM_ARG_OK=true
53208  else
53209    $ECHO "Arg failed:" >&5
53210    $ECHO "$OUTPUT" >&5
53211    JVM_ARG_OK=false
53212  fi
53213
53214
53215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53216$as_echo "$boot_jdk_jvmargs_big" >&6; }
53217
53218  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53219
53220
53221
53222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53223$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53224
53225  # Use serial gc for small short lived tools if possible
53226
53227  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53228  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53229  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53230  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53231  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53232  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53233    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53234    JVM_ARG_OK=true
53235  else
53236    $ECHO "Arg failed:" >&5
53237    $ECHO "$OUTPUT" >&5
53238    JVM_ARG_OK=false
53239  fi
53240
53241
53242  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53243  $ECHO "Command: $JAVA -Xms32M -version" >&5
53244  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53245  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53246  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53247  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53248    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53249    JVM_ARG_OK=true
53250  else
53251    $ECHO "Arg failed:" >&5
53252    $ECHO "$OUTPUT" >&5
53253    JVM_ARG_OK=false
53254  fi
53255
53256
53257  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53258  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53259  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53260  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53261  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53262  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53263    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53264    JVM_ARG_OK=true
53265  else
53266    $ECHO "Arg failed:" >&5
53267    $ECHO "$OUTPUT" >&5
53268    JVM_ARG_OK=false
53269  fi
53270
53271
53272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53273$as_echo "$boot_jdk_jvmargs_small" >&6; }
53274
53275  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53276
53277
53278  JAVA_TOOL_FLAGS_SMALL=""
53279  for f in $JAVA_FLAGS_SMALL; do
53280    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53281  done
53282
53283
53284
53285# Setup smart javac (after cores and memory have been setup)
53286
53287
53288# Check whether --with-sjavac-server-java was given.
53289if test "${with_sjavac_server_java+set}" = set; then :
53290  withval=$with_sjavac_server_java;
53291fi
53292
53293
53294  if test "x$with_sjavac_server_java" != x; then
53295    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53296    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53297    if test "x$FOUND_VERSION" = x; then
53298      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53299    fi
53300  else
53301    SJAVAC_SERVER_JAVA="$JAVA"
53302  fi
53303
53304
53305  if test "$MEMORY_SIZE" -gt "3000"; then
53306
53307  $ECHO "Check if jvm arg is ok: -d64" >&5
53308  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53309  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53310  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53311  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53312  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53313    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53314    JVM_ARG_OK=true
53315  else
53316    $ECHO "Arg failed:" >&5
53317    $ECHO "$OUTPUT" >&5
53318    JVM_ARG_OK=false
53319  fi
53320
53321    if test "$JVM_ARG_OK" = true; then
53322      JVM_64BIT=true
53323      JVM_ARG_OK=false
53324    fi
53325  fi
53326
53327  MX_VALUE=`expr $MEMORY_SIZE / 2`
53328  if test "$JVM_64BIT" = true; then
53329    # Set ms lower than mx since more than one instance of the server might
53330    # get launched at the same time before they figure out which instance won.
53331    MS_VALUE=512
53332    if test "$MX_VALUE" -gt "2048"; then
53333      MX_VALUE=2048
53334    fi
53335  else
53336    MS_VALUE=256
53337    if test "$MX_VALUE" -gt "1500"; then
53338      MX_VALUE=1500
53339    fi
53340  fi
53341  if test "$MX_VALUE" -lt "512"; then
53342    MX_VALUE=512
53343  fi
53344
53345  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53346  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53347  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53348  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53349  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53350  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53351    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53352    JVM_ARG_OK=true
53353  else
53354    $ECHO "Arg failed:" >&5
53355    $ECHO "$OUTPUT" >&5
53356    JVM_ARG_OK=false
53357  fi
53358
53359
53360
53361  # Check whether --enable-sjavac was given.
53362if test "${enable_sjavac+set}" = set; then :
53363  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53364else
53365  ENABLE_SJAVAC='no'
53366fi
53367
53368  if test "x$JVM_ARG_OK" = "xfalse"; then
53369    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53370$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53371    ENABLE_SJAVAC=no;
53372  fi
53373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53374$as_echo_n "checking whether to use sjavac... " >&6; }
53375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53376$as_echo "$ENABLE_SJAVAC" >&6; }
53377
53378
53379
53380# Can the C/C++ compiler use precompiled headers?
53381
53382
53383  ###############################################################################
53384  #
53385  # Can the C/C++ compiler use precompiled headers?
53386  #
53387  # Check whether --enable-precompiled-headers was given.
53388if test "${enable_precompiled_headers+set}" = set; then :
53389  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53390else
53391  ENABLE_PRECOMPH=yes
53392fi
53393
53394
53395  USE_PRECOMPILED_HEADER=1
53396  if test "x$ENABLE_PRECOMPH" = xno; then
53397    USE_PRECOMPILED_HEADER=0
53398  fi
53399
53400  if test "x$ENABLE_PRECOMPH" = xyes; then
53401    # Check that the compiler actually supports precomp headers.
53402    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53403      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53404$as_echo_n "checking that precompiled headers work... " >&6; }
53405      echo "int alfa();" > conftest.h
53406      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53407      if test ! -f conftest.hpp.gch; then
53408        USE_PRECOMPILED_HEADER=0
53409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53410$as_echo "no" >&6; }
53411      else
53412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53413$as_echo "yes" >&6; }
53414      fi
53415      rm -f conftest.h conftest.hpp.gch
53416    fi
53417  fi
53418
53419
53420
53421
53422# Setup use of ccache, if available
53423
53424  # Check whether --enable-ccache was given.
53425if test "${enable_ccache+set}" = set; then :
53426  enableval=$enable_ccache;
53427fi
53428
53429
53430  CCACHE=
53431  CCACHE_STATUS=
53432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53433$as_echo_n "checking is ccache enabled... " >&6; }
53434  if test "x$enable_ccache" = xyes; then
53435    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53437$as_echo "yes" >&6; }
53438      OLD_PATH="$PATH"
53439      if test "x$TOOLCHAIN_PATH" != x; then
53440        PATH=$TOOLCHAIN_PATH:$PATH
53441      fi
53442
53443
53444
53445  # Publish this variable in the help.
53446
53447
53448  if [ -z "${CCACHE+x}" ]; then
53449    # The variable is not set by user, try to locate tool using the code snippet
53450    for ac_prog in ccache
53451do
53452  # Extract the first word of "$ac_prog", so it can be a program name with args.
53453set dummy $ac_prog; ac_word=$2
53454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53455$as_echo_n "checking for $ac_word... " >&6; }
53456if ${ac_cv_path_CCACHE+:} false; then :
53457  $as_echo_n "(cached) " >&6
53458else
53459  case $CCACHE in
53460  [\\/]* | ?:[\\/]*)
53461  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53462  ;;
53463  *)
53464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53465for as_dir in $PATH
53466do
53467  IFS=$as_save_IFS
53468  test -z "$as_dir" && as_dir=.
53469    for ac_exec_ext in '' $ac_executable_extensions; do
53470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53471    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53473    break 2
53474  fi
53475done
53476  done
53477IFS=$as_save_IFS
53478
53479  ;;
53480esac
53481fi
53482CCACHE=$ac_cv_path_CCACHE
53483if test -n "$CCACHE"; then
53484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53485$as_echo "$CCACHE" >&6; }
53486else
53487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53488$as_echo "no" >&6; }
53489fi
53490
53491
53492  test -n "$CCACHE" && break
53493done
53494
53495  else
53496    # The variable is set, but is it from the command line or the environment?
53497
53498    # Try to remove the string !CCACHE! from our list.
53499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53501      # If it failed, the variable was not from the command line. Ignore it,
53502      # but warn the user (except for BASH, which is always set by the calling BASH).
53503      if test "xCCACHE" != xBASH; then
53504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53505$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53506      fi
53507      # Try to locate tool using the code snippet
53508      for ac_prog in ccache
53509do
53510  # Extract the first word of "$ac_prog", so it can be a program name with args.
53511set dummy $ac_prog; ac_word=$2
53512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53513$as_echo_n "checking for $ac_word... " >&6; }
53514if ${ac_cv_path_CCACHE+:} false; then :
53515  $as_echo_n "(cached) " >&6
53516else
53517  case $CCACHE in
53518  [\\/]* | ?:[\\/]*)
53519  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53520  ;;
53521  *)
53522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53523for as_dir in $PATH
53524do
53525  IFS=$as_save_IFS
53526  test -z "$as_dir" && as_dir=.
53527    for ac_exec_ext in '' $ac_executable_extensions; do
53528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53529    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53531    break 2
53532  fi
53533done
53534  done
53535IFS=$as_save_IFS
53536
53537  ;;
53538esac
53539fi
53540CCACHE=$ac_cv_path_CCACHE
53541if test -n "$CCACHE"; then
53542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53543$as_echo "$CCACHE" >&6; }
53544else
53545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53546$as_echo "no" >&6; }
53547fi
53548
53549
53550  test -n "$CCACHE" && break
53551done
53552
53553    else
53554      # If it succeeded, then it was overridden by the user. We will use it
53555      # for the tool.
53556
53557      # First remove it from the list of overridden variables, so we can test
53558      # for unknown variables in the end.
53559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53560
53561      # Check if we try to supply an empty value
53562      if test "x$CCACHE" = x; then
53563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
53564$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
53565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53566$as_echo_n "checking for CCACHE... " >&6; }
53567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
53568$as_echo "disabled" >&6; }
53569      else
53570        # Check if the provided tool contains a complete path.
53571        tool_specified="$CCACHE"
53572        tool_basename="${tool_specified##*/}"
53573        if test "x$tool_basename" = "x$tool_specified"; then
53574          # A command without a complete path is provided, search $PATH.
53575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53576$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53577          # Extract the first word of "$tool_basename", so it can be a program name with args.
53578set dummy $tool_basename; ac_word=$2
53579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53580$as_echo_n "checking for $ac_word... " >&6; }
53581if ${ac_cv_path_CCACHE+:} false; then :
53582  $as_echo_n "(cached) " >&6
53583else
53584  case $CCACHE in
53585  [\\/]* | ?:[\\/]*)
53586  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53587  ;;
53588  *)
53589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53590for as_dir in $PATH
53591do
53592  IFS=$as_save_IFS
53593  test -z "$as_dir" && as_dir=.
53594    for ac_exec_ext in '' $ac_executable_extensions; do
53595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53596    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53598    break 2
53599  fi
53600done
53601  done
53602IFS=$as_save_IFS
53603
53604  ;;
53605esac
53606fi
53607CCACHE=$ac_cv_path_CCACHE
53608if test -n "$CCACHE"; then
53609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53610$as_echo "$CCACHE" >&6; }
53611else
53612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53613$as_echo "no" >&6; }
53614fi
53615
53616
53617          if test "x$CCACHE" = x; then
53618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53619          fi
53620        else
53621          # Otherwise we believe it is a complete path. Use it as it is.
53622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53623$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53625$as_echo_n "checking for CCACHE... " >&6; }
53626          if test ! -x "$tool_specified"; then
53627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53628$as_echo "not found" >&6; }
53629            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53630          fi
53631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53632$as_echo "$tool_specified" >&6; }
53633        fi
53634      fi
53635    fi
53636  fi
53637
53638
53639
53640  if test "x$CCACHE" = x; then
53641    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53642  fi
53643
53644
53645      PATH="$OLD_PATH"
53646      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53647      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53648    else
53649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53650$as_echo "no" >&6; }
53651      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53652$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53653    fi
53654  elif test "x$enable_ccache" = xno; then
53655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53656$as_echo "no, explicitly disabled" >&6; }
53657    CCACHE_STATUS="Disabled"
53658  elif test "x$enable_ccache" = x; then
53659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53660$as_echo "no" >&6; }
53661  else
53662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53663$as_echo "unknown" >&6; }
53664    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53665  fi
53666
53667
53668
53669# Check whether --with-ccache-dir was given.
53670if test "${with_ccache_dir+set}" = set; then :
53671  withval=$with_ccache_dir;
53672fi
53673
53674
53675  if test "x$with_ccache_dir" != x; then
53676    # When using a non home ccache directory, assume the use is to share ccache files
53677    # with other users. Thus change the umask.
53678    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53679    if test "x$CCACHE" = x; then
53680      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53681$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53682    fi
53683  fi
53684
53685  if test "x$CCACHE" != x; then
53686
53687  if test "x$CCACHE" != x; then
53688    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53689      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53690          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53691      if test "x$HAS_BAD_CCACHE" != "x"; then
53692        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53693      fi
53694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53695$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53696      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53697      PUSHED_FLAGS="$CXXFLAGS"
53698      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53699      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53700/* end confdefs.h.  */
53701
53702int
53703main ()
53704{
53705
53706  ;
53707  return 0;
53708}
53709_ACEOF
53710if ac_fn_cxx_try_compile "$LINENO"; then :
53711  CC_KNOWS_CCACHE_TRICK=yes
53712else
53713  CC_KNOWS_CCACHE_TRICK=no
53714fi
53715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53716      CXXFLAGS="$PUSHED_FLAGS"
53717      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53719$as_echo "yes" >&6; }
53720        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53721
53722        CCACHE_SLOPPINESS=pch_defines,time_macros
53723      else
53724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53725$as_echo "no" >&6; }
53726        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53727      fi
53728    fi
53729
53730    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53731        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53732
53733    if test "x$SET_CCACHE_DIR" != x; then
53734      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53735      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53736    fi
53737  fi
53738
53739  fi
53740
53741
53742###############################################################################
53743#
53744# And now the finish...
53745#
53746###############################################################################
53747
53748# Check for some common pitfalls
53749
53750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53751    file_to_test="$SRC_ROOT/LICENSE"
53752    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53753      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
53754    fi
53755  fi
53756
53757
53758  # Did user specify any unknown variables?
53759
53760  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53761    # Replace the separating ! with spaces before presenting for end user.
53762    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53763    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53764$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53765  fi
53766
53767
53768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53769$as_echo_n "checking if build directory is on local disk... " >&6; }
53770
53771  # df -l lists only local disks; if the given directory is not found then
53772  # a non-zero exit code is given
53773  if test "x$DF" = x; then
53774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53775      # msys does not have df; use Windows "net use" instead.
53776      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53777      if test "x$IS_NETWORK_DISK" = x; then
53778        OUTPUT_DIR_IS_LOCAL="yes"
53779      else
53780        OUTPUT_DIR_IS_LOCAL="no"
53781      fi
53782    else
53783      # No df here, say it's local
53784      OUTPUT_DIR_IS_LOCAL="yes"
53785    fi
53786  else
53787    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53788      OUTPUT_DIR_IS_LOCAL="yes"
53789    else
53790      OUTPUT_DIR_IS_LOCAL="no"
53791    fi
53792  fi
53793
53794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53795$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53796
53797
53798
53799  # Check if the user has any old-style ALT_ variables set.
53800  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53801
53802  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53803  # Since we can't properly handle the dependencies for this, warn the user about the situation
53804  if test -e $OUTPUT_ROOT/spec.gmk; then
53805    IS_RECONFIGURE=yes
53806  else
53807    IS_RECONFIGURE=no
53808  fi
53809
53810
53811# At the end, call the custom hook. (Dummy macro if no custom sources available)
53812
53813
53814# We're messing a bit with internal autoconf variables to put the config.status
53815# in the output directory instead of the current directory.
53816CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53817
53818# Create the actual output files. Now the main work of configure is done.
53819cat >confcache <<\_ACEOF
53820# This file is a shell script that caches the results of configure
53821# tests run on this system so they can be shared between configure
53822# scripts and configure runs, see configure's option --config-cache.
53823# It is not useful on other systems.  If it contains results you don't
53824# want to keep, you may remove or edit it.
53825#
53826# config.status only pays attention to the cache file if you give it
53827# the --recheck option to rerun configure.
53828#
53829# `ac_cv_env_foo' variables (set or unset) will be overridden when
53830# loading this file, other *unset* `ac_cv_foo' will be assigned the
53831# following values.
53832
53833_ACEOF
53834
53835# The following way of writing the cache mishandles newlines in values,
53836# but we know of no workaround that is simple, portable, and efficient.
53837# So, we kill variables containing newlines.
53838# Ultrix sh set writes to stderr and can't be redirected directly,
53839# and sets the high bit in the cache file unless we assign to the vars.
53840(
53841  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53842    eval ac_val=\$$ac_var
53843    case $ac_val in #(
53844    *${as_nl}*)
53845      case $ac_var in #(
53846      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53847$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53848      esac
53849      case $ac_var in #(
53850      _ | IFS | as_nl) ;; #(
53851      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53852      *) { eval $ac_var=; unset $ac_var;} ;;
53853      esac ;;
53854    esac
53855  done
53856
53857  (set) 2>&1 |
53858    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53859    *${as_nl}ac_space=\ *)
53860      # `set' does not quote correctly, so add quotes: double-quote
53861      # substitution turns \\\\ into \\, and sed turns \\ into \.
53862      sed -n \
53863	"s/'/'\\\\''/g;
53864	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53865      ;; #(
53866    *)
53867      # `set' quotes correctly as required by POSIX, so do not add quotes.
53868      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53869      ;;
53870    esac |
53871    sort
53872) |
53873  sed '
53874     /^ac_cv_env_/b end
53875     t clear
53876     :clear
53877     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53878     t end
53879     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53880     :end' >>confcache
53881if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53882  if test -w "$cache_file"; then
53883    if test "x$cache_file" != "x/dev/null"; then
53884      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53885$as_echo "$as_me: updating cache $cache_file" >&6;}
53886      if test ! -f "$cache_file" || test -h "$cache_file"; then
53887	cat confcache >"$cache_file"
53888      else
53889        case $cache_file in #(
53890        */* | ?:*)
53891	  mv -f confcache "$cache_file"$$ &&
53892	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53893        *)
53894	  mv -f confcache "$cache_file" ;;
53895	esac
53896      fi
53897    fi
53898  else
53899    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53900$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53901  fi
53902fi
53903rm -f confcache
53904
53905test "x$prefix" = xNONE && prefix=$ac_default_prefix
53906# Let make expand exec_prefix.
53907test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53908
53909# Transform confdefs.h into DEFS.
53910# Protect against shell expansion while executing Makefile rules.
53911# Protect against Makefile macro expansion.
53912#
53913# If the first sed substitution is executed (which looks for macros that
53914# take arguments), then branch to the quote section.  Otherwise,
53915# look for a macro that doesn't take arguments.
53916ac_script='
53917:mline
53918/\\$/{
53919 N
53920 s,\\\n,,
53921 b mline
53922}
53923t clear
53924:clear
53925s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53926t quote
53927s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53928t quote
53929b any
53930:quote
53931s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53932s/\[/\\&/g
53933s/\]/\\&/g
53934s/\$/$$/g
53935H
53936:any
53937${
53938	g
53939	s/^\n//
53940	s/\n/ /g
53941	p
53942}
53943'
53944DEFS=`sed -n "$ac_script" confdefs.h`
53945
53946
53947ac_libobjs=
53948ac_ltlibobjs=
53949U=
53950for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53951  # 1. Remove the extension, and $U if already installed.
53952  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53953  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53954  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53955  #    will be set to the directory where LIBOBJS objects are built.
53956  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53957  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53958done
53959LIBOBJS=$ac_libobjs
53960
53961LTLIBOBJS=$ac_ltlibobjs
53962
53963
53964
53965: "${CONFIG_STATUS=./config.status}"
53966ac_write_fail=0
53967ac_clean_files_save=$ac_clean_files
53968ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53969{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53970$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53971as_write_fail=0
53972cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53973#! $SHELL
53974# Generated by $as_me.
53975# Run this file to recreate the current configuration.
53976# Compiler output produced by configure, useful for debugging
53977# configure, is in config.log if it exists.
53978
53979debug=false
53980ac_cs_recheck=false
53981ac_cs_silent=false
53982
53983SHELL=\${CONFIG_SHELL-$SHELL}
53984export SHELL
53985_ASEOF
53986cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53987## -------------------- ##
53988## M4sh Initialization. ##
53989## -------------------- ##
53990
53991# Be more Bourne compatible
53992DUALCASE=1; export DUALCASE # for MKS sh
53993if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53994  emulate sh
53995  NULLCMD=:
53996  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53997  # is contrary to our usage.  Disable this feature.
53998  alias -g '${1+"$@"}'='"$@"'
53999  setopt NO_GLOB_SUBST
54000else
54001  case `(set -o) 2>/dev/null` in #(
54002  *posix*) :
54003    set -o posix ;; #(
54004  *) :
54005     ;;
54006esac
54007fi
54008
54009
54010as_nl='
54011'
54012export as_nl
54013# Printing a long string crashes Solaris 7 /usr/bin/printf.
54014as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
54015as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
54016as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
54017# Prefer a ksh shell builtin over an external printf program on Solaris,
54018# but without wasting forks for bash or zsh.
54019if test -z "$BASH_VERSION$ZSH_VERSION" \
54020    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
54021  as_echo='print -r --'
54022  as_echo_n='print -rn --'
54023elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
54024  as_echo='printf %s\n'
54025  as_echo_n='printf %s'
54026else
54027  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54028    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54029    as_echo_n='/usr/ucb/echo -n'
54030  else
54031    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
54032    as_echo_n_body='eval
54033      arg=$1;
54034      case $arg in #(
54035      *"$as_nl"*)
54036	expr "X$arg" : "X\\(.*\\)$as_nl";
54037	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
54038      esac;
54039      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
54040    '
54041    export as_echo_n_body
54042    as_echo_n='sh -c $as_echo_n_body as_echo'
54043  fi
54044  export as_echo_body
54045  as_echo='sh -c $as_echo_body as_echo'
54046fi
54047
54048# The user is always right.
54049if test "${PATH_SEPARATOR+set}" != set; then
54050  PATH_SEPARATOR=:
54051  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
54052    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
54053      PATH_SEPARATOR=';'
54054  }
54055fi
54056
54057
54058# IFS
54059# We need space, tab and new line, in precisely that order.  Quoting is
54060# there to prevent editors from complaining about space-tab.
54061# (If _AS_PATH_WALK were called with IFS unset, it would disable word
54062# splitting by setting IFS to empty value.)
54063IFS=" ""	$as_nl"
54064
54065# Find who we are.  Look in the path if we contain no directory separator.
54066as_myself=
54067case $0 in #((
54068  *[\\/]* ) as_myself=$0 ;;
54069  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54070for as_dir in $PATH
54071do
54072  IFS=$as_save_IFS
54073  test -z "$as_dir" && as_dir=.
54074    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54075  done
54076IFS=$as_save_IFS
54077
54078     ;;
54079esac
54080# We did not find ourselves, most probably we were run as `sh COMMAND'
54081# in which case we are not to be found in the path.
54082if test "x$as_myself" = x; then
54083  as_myself=$0
54084fi
54085if test ! -f "$as_myself"; then
54086  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54087  exit 1
54088fi
54089
54090# Unset variables that we do not need and which cause bugs (e.g. in
54091# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
54092# suppresses any "Segmentation fault" message there.  '((' could
54093# trigger a bug in pdksh 5.2.14.
54094for as_var in BASH_ENV ENV MAIL MAILPATH
54095do eval test x\${$as_var+set} = xset \
54096  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54097done
54098PS1='$ '
54099PS2='> '
54100PS4='+ '
54101
54102# NLS nuisances.
54103LC_ALL=C
54104export LC_ALL
54105LANGUAGE=C
54106export LANGUAGE
54107
54108# CDPATH.
54109(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54110
54111
54112# as_fn_error STATUS ERROR [LINENO LOG_FD]
54113# ----------------------------------------
54114# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54115# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54116# script with STATUS, using 1 if that was 0.
54117as_fn_error ()
54118{
54119  as_status=$1; test $as_status -eq 0 && as_status=1
54120  if test "$4"; then
54121    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54122    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54123  fi
54124  $as_echo "$as_me: error: $2" >&2
54125  as_fn_exit $as_status
54126} # as_fn_error
54127
54128
54129# as_fn_set_status STATUS
54130# -----------------------
54131# Set $? to STATUS, without forking.
54132as_fn_set_status ()
54133{
54134  return $1
54135} # as_fn_set_status
54136
54137# as_fn_exit STATUS
54138# -----------------
54139# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54140as_fn_exit ()
54141{
54142  set +e
54143  as_fn_set_status $1
54144  exit $1
54145} # as_fn_exit
54146
54147# as_fn_unset VAR
54148# ---------------
54149# Portably unset VAR.
54150as_fn_unset ()
54151{
54152  { eval $1=; unset $1;}
54153}
54154as_unset=as_fn_unset
54155# as_fn_append VAR VALUE
54156# ----------------------
54157# Append the text in VALUE to the end of the definition contained in VAR. Take
54158# advantage of any shell optimizations that allow amortized linear growth over
54159# repeated appends, instead of the typical quadratic growth present in naive
54160# implementations.
54161if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54162  eval 'as_fn_append ()
54163  {
54164    eval $1+=\$2
54165  }'
54166else
54167  as_fn_append ()
54168  {
54169    eval $1=\$$1\$2
54170  }
54171fi # as_fn_append
54172
54173# as_fn_arith ARG...
54174# ------------------
54175# Perform arithmetic evaluation on the ARGs, and store the result in the
54176# global $as_val. Take advantage of shells that can avoid forks. The arguments
54177# must be portable across $(()) and expr.
54178if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54179  eval 'as_fn_arith ()
54180  {
54181    as_val=$(( $* ))
54182  }'
54183else
54184  as_fn_arith ()
54185  {
54186    as_val=`expr "$@" || test $? -eq 1`
54187  }
54188fi # as_fn_arith
54189
54190
54191if expr a : '\(a\)' >/dev/null 2>&1 &&
54192   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54193  as_expr=expr
54194else
54195  as_expr=false
54196fi
54197
54198if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54199  as_basename=basename
54200else
54201  as_basename=false
54202fi
54203
54204if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54205  as_dirname=dirname
54206else
54207  as_dirname=false
54208fi
54209
54210as_me=`$as_basename -- "$0" ||
54211$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54212	 X"$0" : 'X\(//\)$' \| \
54213	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54214$as_echo X/"$0" |
54215    sed '/^.*\/\([^/][^/]*\)\/*$/{
54216	    s//\1/
54217	    q
54218	  }
54219	  /^X\/\(\/\/\)$/{
54220	    s//\1/
54221	    q
54222	  }
54223	  /^X\/\(\/\).*/{
54224	    s//\1/
54225	    q
54226	  }
54227	  s/.*/./; q'`
54228
54229# Avoid depending upon Character Ranges.
54230as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54231as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54232as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54233as_cr_digits='0123456789'
54234as_cr_alnum=$as_cr_Letters$as_cr_digits
54235
54236ECHO_C= ECHO_N= ECHO_T=
54237case `echo -n x` in #(((((
54238-n*)
54239  case `echo 'xy\c'` in
54240  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54241  xy)  ECHO_C='\c';;
54242  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54243       ECHO_T='	';;
54244  esac;;
54245*)
54246  ECHO_N='-n';;
54247esac
54248
54249rm -f conf$$ conf$$.exe conf$$.file
54250if test -d conf$$.dir; then
54251  rm -f conf$$.dir/conf$$.file
54252else
54253  rm -f conf$$.dir
54254  mkdir conf$$.dir 2>/dev/null
54255fi
54256if (echo >conf$$.file) 2>/dev/null; then
54257  if ln -s conf$$.file conf$$ 2>/dev/null; then
54258    as_ln_s='ln -s'
54259    # ... but there are two gotchas:
54260    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54261    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54262    # In both cases, we have to default to `cp -pR'.
54263    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54264      as_ln_s='cp -pR'
54265  elif ln conf$$.file conf$$ 2>/dev/null; then
54266    as_ln_s=ln
54267  else
54268    as_ln_s='cp -pR'
54269  fi
54270else
54271  as_ln_s='cp -pR'
54272fi
54273rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54274rmdir conf$$.dir 2>/dev/null
54275
54276
54277# as_fn_mkdir_p
54278# -------------
54279# Create "$as_dir" as a directory, including parents if necessary.
54280as_fn_mkdir_p ()
54281{
54282
54283  case $as_dir in #(
54284  -*) as_dir=./$as_dir;;
54285  esac
54286  test -d "$as_dir" || eval $as_mkdir_p || {
54287    as_dirs=
54288    while :; do
54289      case $as_dir in #(
54290      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54291      *) as_qdir=$as_dir;;
54292      esac
54293      as_dirs="'$as_qdir' $as_dirs"
54294      as_dir=`$as_dirname -- "$as_dir" ||
54295$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54296	 X"$as_dir" : 'X\(//\)[^/]' \| \
54297	 X"$as_dir" : 'X\(//\)$' \| \
54298	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54299$as_echo X"$as_dir" |
54300    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54301	    s//\1/
54302	    q
54303	  }
54304	  /^X\(\/\/\)[^/].*/{
54305	    s//\1/
54306	    q
54307	  }
54308	  /^X\(\/\/\)$/{
54309	    s//\1/
54310	    q
54311	  }
54312	  /^X\(\/\).*/{
54313	    s//\1/
54314	    q
54315	  }
54316	  s/.*/./; q'`
54317      test -d "$as_dir" && break
54318    done
54319    test -z "$as_dirs" || eval "mkdir $as_dirs"
54320  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54321
54322
54323} # as_fn_mkdir_p
54324if mkdir -p . 2>/dev/null; then
54325  as_mkdir_p='mkdir -p "$as_dir"'
54326else
54327  test -d ./-p && rmdir ./-p
54328  as_mkdir_p=false
54329fi
54330
54331
54332# as_fn_executable_p FILE
54333# -----------------------
54334# Test if FILE is an executable regular file.
54335as_fn_executable_p ()
54336{
54337  test -f "$1" && test -x "$1"
54338} # as_fn_executable_p
54339as_test_x='test -x'
54340as_executable_p=as_fn_executable_p
54341
54342# Sed expression to map a string onto a valid CPP name.
54343as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54344
54345# Sed expression to map a string onto a valid variable name.
54346as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54347
54348
54349exec 6>&1
54350## ----------------------------------- ##
54351## Main body of $CONFIG_STATUS script. ##
54352## ----------------------------------- ##
54353_ASEOF
54354test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54355
54356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54357# Save the log message, to keep $0 and so on meaningful, and to
54358# report actual input values of CONFIG_FILES etc. instead of their
54359# values after options handling.
54360ac_log="
54361This file was extended by OpenJDK $as_me jdk9, which was
54362generated by GNU Autoconf 2.69.  Invocation command line was
54363
54364  CONFIG_FILES    = $CONFIG_FILES
54365  CONFIG_HEADERS  = $CONFIG_HEADERS
54366  CONFIG_LINKS    = $CONFIG_LINKS
54367  CONFIG_COMMANDS = $CONFIG_COMMANDS
54368  $ $0 $@
54369
54370on `(hostname || uname -n) 2>/dev/null | sed 1q`
54371"
54372
54373_ACEOF
54374
54375case $ac_config_files in *"
54376"*) set x $ac_config_files; shift; ac_config_files=$*;;
54377esac
54378
54379
54380
54381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54382# Files that config.status was made for.
54383config_files="$ac_config_files"
54384
54385_ACEOF
54386
54387cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54388ac_cs_usage="\
54389\`$as_me' instantiates files and other configuration actions
54390from templates according to the current configuration.  Unless the files
54391and actions are specified as TAGs, all are instantiated by default.
54392
54393Usage: $0 [OPTION]... [TAG]...
54394
54395  -h, --help       print this help, then exit
54396  -V, --version    print version number and configuration settings, then exit
54397      --config     print configuration, then exit
54398  -q, --quiet, --silent
54399                   do not print progress messages
54400  -d, --debug      don't remove temporary files
54401      --recheck    update $as_me by reconfiguring in the same conditions
54402      --file=FILE[:TEMPLATE]
54403                   instantiate the configuration file FILE
54404
54405Configuration files:
54406$config_files
54407
54408Report bugs to <build-dev@openjdk.java.net>.
54409OpenJDK home page: <http://openjdk.java.net>."
54410
54411_ACEOF
54412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54413ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54414ac_cs_version="\\
54415OpenJDK config.status jdk9
54416configured by $0, generated by GNU Autoconf 2.69,
54417  with options \\"\$ac_cs_config\\"
54418
54419Copyright (C) 2012 Free Software Foundation, Inc.
54420This config.status script is free software; the Free Software Foundation
54421gives unlimited permission to copy, distribute and modify it."
54422
54423ac_pwd='$ac_pwd'
54424srcdir='$srcdir'
54425AWK='$AWK'
54426test -n "\$AWK" || AWK=awk
54427_ACEOF
54428
54429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54430# The default lists apply if the user does not specify any file.
54431ac_need_defaults=:
54432while test $# != 0
54433do
54434  case $1 in
54435  --*=?*)
54436    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54437    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54438    ac_shift=:
54439    ;;
54440  --*=)
54441    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54442    ac_optarg=
54443    ac_shift=:
54444    ;;
54445  *)
54446    ac_option=$1
54447    ac_optarg=$2
54448    ac_shift=shift
54449    ;;
54450  esac
54451
54452  case $ac_option in
54453  # Handling of the options.
54454  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54455    ac_cs_recheck=: ;;
54456  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54457    $as_echo "$ac_cs_version"; exit ;;
54458  --config | --confi | --conf | --con | --co | --c )
54459    $as_echo "$ac_cs_config"; exit ;;
54460  --debug | --debu | --deb | --de | --d | -d )
54461    debug=: ;;
54462  --file | --fil | --fi | --f )
54463    $ac_shift
54464    case $ac_optarg in
54465    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54466    '') as_fn_error $? "missing file argument" ;;
54467    esac
54468    as_fn_append CONFIG_FILES " '$ac_optarg'"
54469    ac_need_defaults=false;;
54470  --he | --h |  --help | --hel | -h )
54471    $as_echo "$ac_cs_usage"; exit ;;
54472  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54473  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54474    ac_cs_silent=: ;;
54475
54476  # This is an error.
54477  -*) as_fn_error $? "unrecognized option: \`$1'
54478Try \`$0 --help' for more information." ;;
54479
54480  *) as_fn_append ac_config_targets " $1"
54481     ac_need_defaults=false ;;
54482
54483  esac
54484  shift
54485done
54486
54487ac_configure_extra_args=
54488
54489if $ac_cs_silent; then
54490  exec 6>/dev/null
54491  ac_configure_extra_args="$ac_configure_extra_args --silent"
54492fi
54493
54494_ACEOF
54495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54496if \$ac_cs_recheck; then
54497  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54498  shift
54499  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54500  CONFIG_SHELL='$SHELL'
54501  export CONFIG_SHELL
54502  exec "\$@"
54503fi
54504
54505_ACEOF
54506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54507exec 5>>config.log
54508{
54509  echo
54510  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54511## Running $as_me. ##
54512_ASBOX
54513  $as_echo "$ac_log"
54514} >&5
54515
54516_ACEOF
54517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54518_ACEOF
54519
54520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54521
54522# Handling of arguments.
54523for ac_config_target in $ac_config_targets
54524do
54525  case $ac_config_target in
54526    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54527    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54528    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54529    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54530    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54531
54532  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54533  esac
54534done
54535
54536
54537# If the user did not use the arguments to specify the items to instantiate,
54538# then the envvar interface is used.  Set only those that are not.
54539# We use the long form for the default assignment because of an extremely
54540# bizarre bug on SunOS 4.1.3.
54541if $ac_need_defaults; then
54542  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54543fi
54544
54545# Have a temporary directory for convenience.  Make it in the build tree
54546# simply because there is no reason against having it here, and in addition,
54547# creating and moving files from /tmp can sometimes cause problems.
54548# Hook for its removal unless debugging.
54549# Note that there is a small window in which the directory will not be cleaned:
54550# after its creation but before its name has been assigned to `$tmp'.
54551$debug ||
54552{
54553  tmp= ac_tmp=
54554  trap 'exit_status=$?
54555  : "${ac_tmp:=$tmp}"
54556  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54557' 0
54558  trap 'as_fn_exit 1' 1 2 13 15
54559}
54560# Create a (secure) tmp directory for tmp files.
54561
54562{
54563  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54564  test -d "$tmp"
54565}  ||
54566{
54567  tmp=./conf$$-$RANDOM
54568  (umask 077 && mkdir "$tmp")
54569} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54570ac_tmp=$tmp
54571
54572# Set up the scripts for CONFIG_FILES section.
54573# No need to generate them if there are no CONFIG_FILES.
54574# This happens for instance with `./config.status config.h'.
54575if test -n "$CONFIG_FILES"; then
54576
54577
54578ac_cr=`echo X | tr X '\015'`
54579# On cygwin, bash can eat \r inside `` if the user requested igncr.
54580# But we know of no other shell where ac_cr would be empty at this
54581# point, so we can use a bashism as a fallback.
54582if test "x$ac_cr" = x; then
54583  eval ac_cr=\$\'\\r\'
54584fi
54585ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54586if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54587  ac_cs_awk_cr='\\r'
54588else
54589  ac_cs_awk_cr=$ac_cr
54590fi
54591
54592echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54593_ACEOF
54594
54595
54596{
54597  echo "cat >conf$$subs.awk <<_ACEOF" &&
54598  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54599  echo "_ACEOF"
54600} >conf$$subs.sh ||
54601  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54602ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54603ac_delim='%!_!# '
54604for ac_last_try in false false false false false :; do
54605  . ./conf$$subs.sh ||
54606    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54607
54608  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54609  if test $ac_delim_n = $ac_delim_num; then
54610    break
54611  elif $ac_last_try; then
54612    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54613  else
54614    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54615  fi
54616done
54617rm -f conf$$subs.sh
54618
54619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54620cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54621_ACEOF
54622sed -n '
54623h
54624s/^/S["/; s/!.*/"]=/
54625p
54626g
54627s/^[^!]*!//
54628:repl
54629t repl
54630s/'"$ac_delim"'$//
54631t delim
54632:nl
54633h
54634s/\(.\{148\}\)..*/\1/
54635t more1
54636s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54637p
54638n
54639b repl
54640:more1
54641s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54642p
54643g
54644s/.\{148\}//
54645t nl
54646:delim
54647h
54648s/\(.\{148\}\)..*/\1/
54649t more2
54650s/["\\]/\\&/g; s/^/"/; s/$/"/
54651p
54652b
54653:more2
54654s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54655p
54656g
54657s/.\{148\}//
54658t delim
54659' <conf$$subs.awk | sed '
54660/^[^""]/{
54661  N
54662  s/\n//
54663}
54664' >>$CONFIG_STATUS || ac_write_fail=1
54665rm -f conf$$subs.awk
54666cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54667_ACAWK
54668cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54669  for (key in S) S_is_set[key] = 1
54670  FS = ""
54671
54672}
54673{
54674  line = $ 0
54675  nfields = split(line, field, "@")
54676  substed = 0
54677  len = length(field[1])
54678  for (i = 2; i < nfields; i++) {
54679    key = field[i]
54680    keylen = length(key)
54681    if (S_is_set[key]) {
54682      value = S[key]
54683      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54684      len += length(value) + length(field[++i])
54685      substed = 1
54686    } else
54687      len += 1 + keylen
54688  }
54689
54690  print line
54691}
54692
54693_ACAWK
54694_ACEOF
54695cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54696if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54697  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54698else
54699  cat
54700fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54701  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54702_ACEOF
54703
54704# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54705# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54706# trailing colons and then remove the whole line if VPATH becomes empty
54707# (actually we leave an empty line to preserve line numbers).
54708if test "x$srcdir" = x.; then
54709  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54710h
54711s///
54712s/^/:/
54713s/[	 ]*$/:/
54714s/:\$(srcdir):/:/g
54715s/:\${srcdir}:/:/g
54716s/:@srcdir@:/:/g
54717s/^:*//
54718s/:*$//
54719x
54720s/\(=[	 ]*\).*/\1/
54721G
54722s/\n//
54723s/^[^=]*=[	 ]*$//
54724}'
54725fi
54726
54727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54728fi # test -n "$CONFIG_FILES"
54729
54730
54731eval set X "  :F $CONFIG_FILES      "
54732shift
54733for ac_tag
54734do
54735  case $ac_tag in
54736  :[FHLC]) ac_mode=$ac_tag; continue;;
54737  esac
54738  case $ac_mode$ac_tag in
54739  :[FHL]*:*);;
54740  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54741  :[FH]-) ac_tag=-:-;;
54742  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54743  esac
54744  ac_save_IFS=$IFS
54745  IFS=:
54746  set x $ac_tag
54747  IFS=$ac_save_IFS
54748  shift
54749  ac_file=$1
54750  shift
54751
54752  case $ac_mode in
54753  :L) ac_source=$1;;
54754  :[FH])
54755    ac_file_inputs=
54756    for ac_f
54757    do
54758      case $ac_f in
54759      -) ac_f="$ac_tmp/stdin";;
54760      *) # Look for the file first in the build tree, then in the source tree
54761	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54762	 # because $ac_f cannot contain `:'.
54763	 test -f "$ac_f" ||
54764	   case $ac_f in
54765	   [\\/$]*) false;;
54766	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54767	   esac ||
54768	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54769      esac
54770      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54771      as_fn_append ac_file_inputs " '$ac_f'"
54772    done
54773
54774    # Let's still pretend it is `configure' which instantiates (i.e., don't
54775    # use $as_me), people would be surprised to read:
54776    #    /* config.h.  Generated by config.status.  */
54777    configure_input='Generated from '`
54778	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54779	`' by configure.'
54780    if test x"$ac_file" != x-; then
54781      configure_input="$ac_file.  $configure_input"
54782      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54783$as_echo "$as_me: creating $ac_file" >&6;}
54784    fi
54785    # Neutralize special characters interpreted by sed in replacement strings.
54786    case $configure_input in #(
54787    *\&* | *\|* | *\\* )
54788       ac_sed_conf_input=`$as_echo "$configure_input" |
54789       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54790    *) ac_sed_conf_input=$configure_input;;
54791    esac
54792
54793    case $ac_tag in
54794    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54795      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54796    esac
54797    ;;
54798  esac
54799
54800  ac_dir=`$as_dirname -- "$ac_file" ||
54801$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54802	 X"$ac_file" : 'X\(//\)[^/]' \| \
54803	 X"$ac_file" : 'X\(//\)$' \| \
54804	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54805$as_echo X"$ac_file" |
54806    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54807	    s//\1/
54808	    q
54809	  }
54810	  /^X\(\/\/\)[^/].*/{
54811	    s//\1/
54812	    q
54813	  }
54814	  /^X\(\/\/\)$/{
54815	    s//\1/
54816	    q
54817	  }
54818	  /^X\(\/\).*/{
54819	    s//\1/
54820	    q
54821	  }
54822	  s/.*/./; q'`
54823  as_dir="$ac_dir"; as_fn_mkdir_p
54824  ac_builddir=.
54825
54826case "$ac_dir" in
54827.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54828*)
54829  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54830  # A ".." for each directory in $ac_dir_suffix.
54831  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54832  case $ac_top_builddir_sub in
54833  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54834  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54835  esac ;;
54836esac
54837ac_abs_top_builddir=$ac_pwd
54838ac_abs_builddir=$ac_pwd$ac_dir_suffix
54839# for backward compatibility:
54840ac_top_builddir=$ac_top_build_prefix
54841
54842case $srcdir in
54843  .)  # We are building in place.
54844    ac_srcdir=.
54845    ac_top_srcdir=$ac_top_builddir_sub
54846    ac_abs_top_srcdir=$ac_pwd ;;
54847  [\\/]* | ?:[\\/]* )  # Absolute name.
54848    ac_srcdir=$srcdir$ac_dir_suffix;
54849    ac_top_srcdir=$srcdir
54850    ac_abs_top_srcdir=$srcdir ;;
54851  *) # Relative name.
54852    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54853    ac_top_srcdir=$ac_top_build_prefix$srcdir
54854    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54855esac
54856ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54857
54858
54859  case $ac_mode in
54860  :F)
54861  #
54862  # CONFIG_FILE
54863  #
54864
54865_ACEOF
54866
54867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54868# If the template does not know about datarootdir, expand it.
54869# FIXME: This hack should be removed a few years after 2.60.
54870ac_datarootdir_hack=; ac_datarootdir_seen=
54871ac_sed_dataroot='
54872/datarootdir/ {
54873  p
54874  q
54875}
54876/@datadir@/p
54877/@docdir@/p
54878/@infodir@/p
54879/@localedir@/p
54880/@mandir@/p'
54881case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54882*datarootdir*) ac_datarootdir_seen=yes;;
54883*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54884  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54885$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54886_ACEOF
54887cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54888  ac_datarootdir_hack='
54889  s&@datadir@&$datadir&g
54890  s&@docdir@&$docdir&g
54891  s&@infodir@&$infodir&g
54892  s&@localedir@&$localedir&g
54893  s&@mandir@&$mandir&g
54894  s&\\\${datarootdir}&$datarootdir&g' ;;
54895esac
54896_ACEOF
54897
54898# Neutralize VPATH when `$srcdir' = `.'.
54899# Shell code in configure.ac might set extrasub.
54900# FIXME: do we really want to maintain this feature?
54901cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54902ac_sed_extra="$ac_vpsub
54903$extrasub
54904_ACEOF
54905cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54906:t
54907/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54908s|@configure_input@|$ac_sed_conf_input|;t t
54909s&@top_builddir@&$ac_top_builddir_sub&;t t
54910s&@top_build_prefix@&$ac_top_build_prefix&;t t
54911s&@srcdir@&$ac_srcdir&;t t
54912s&@abs_srcdir@&$ac_abs_srcdir&;t t
54913s&@top_srcdir@&$ac_top_srcdir&;t t
54914s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54915s&@builddir@&$ac_builddir&;t t
54916s&@abs_builddir@&$ac_abs_builddir&;t t
54917s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54918$ac_datarootdir_hack
54919"
54920eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54921  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54922
54923test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54924  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54925  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54926      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54927  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54928which seems to be undefined.  Please make sure it is defined" >&5
54929$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54930which seems to be undefined.  Please make sure it is defined" >&2;}
54931
54932  rm -f "$ac_tmp/stdin"
54933  case $ac_file in
54934  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54935  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54936  esac \
54937  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54938 ;;
54939
54940
54941
54942  esac
54943
54944done # for ac_tag
54945
54946
54947as_fn_exit 0
54948_ACEOF
54949ac_clean_files=$ac_clean_files_save
54950
54951test $ac_write_fail = 0 ||
54952  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54953
54954
54955# configure is writing to config.log, and then calls config.status.
54956# config.status does its own redirection, appending to config.log.
54957# Unfortunately, on DOS this fails, as config.log is still kept open
54958# by configure, so config.status won't be able to write to it; its
54959# output is simply discarded.  So we exec the FD to /dev/null,
54960# effectively closing config.log, so it can be properly (re)opened and
54961# appended to by config.status.  When coming back to configure, we
54962# need to make the FD available again.
54963if test "$no_create" != yes; then
54964  ac_cs_success=:
54965  ac_config_status_args=
54966  test "$silent" = yes &&
54967    ac_config_status_args="$ac_config_status_args --quiet"
54968  exec 5>/dev/null
54969  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54970  exec 5>>config.log
54971  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54972  # would make configure fail if this is the last instruction.
54973  $ac_cs_success || as_fn_exit 1
54974fi
54975if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54976  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54977$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54978fi
54979
54980
54981# After AC_OUTPUT, we need to do final work
54982
54983
54984  # Try to move config.log (generated by autoconf) to the configure-support directory.
54985  if test -e ./config.log; then
54986    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54987  fi
54988
54989  # Rotate our log file (configure.log)
54990  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54991    $RM -f "$OUTPUT_ROOT/configure.log.old"
54992  fi
54993  if test -e "$OUTPUT_ROOT/configure.log"; then
54994    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54995  fi
54996
54997  # Move configure.log from current directory to the build output root
54998  if test -e ./configure.log; then
54999    echo found it
55000    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
55001  fi
55002
55003  # Make the compare script executable
55004  $CHMOD +x $OUTPUT_ROOT/compare.sh
55005
55006
55007# Finally output some useful information to the user
55008
55009  # Finally output some useful information to the user
55010
55011  printf "\n"
55012  printf "====================================================\n"
55013  if test "x$no_create" != "xyes"; then
55014    if test "x$IS_RECONFIGURE" != "xyes"; then
55015      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
55016    else
55017      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
55018    fi
55019  else
55020    if test "x$IS_RECONFIGURE" != "xyes"; then
55021      printf "A configuration has been successfully checked but not created\n"
55022    else
55023      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
55024    fi
55025  fi
55026  if test "x$CONFIGURE_COMMAND_LINE" != x; then
55027    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
55028  else
55029    printf "using default settings.\n"
55030  fi
55031
55032  printf "\n"
55033  printf "Configuration summary:\n"
55034  printf "* Debug level:    $DEBUG_LEVEL\n"
55035  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
55036  printf "* JDK variant:    $JDK_VARIANT\n"
55037  printf "* JVM variants:   $with_jvm_variants\n"
55038  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
55039
55040  printf "\n"
55041  printf "Tools summary:\n"
55042  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
55043    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
55044  fi
55045  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
55046  if test "x$TOOLCHAIN_VERSION" != "x"; then
55047    print_version=" $TOOLCHAIN_VERSION"
55048  fi
55049  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
55050  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
55051  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
55052
55053  printf "\n"
55054  printf "Build performance summary:\n"
55055  printf "* Cores to use:   $JOBS\n"
55056  printf "* Memory limit:   $MEMORY_SIZE MB\n"
55057  if test "x$CCACHE_STATUS" != "x"; then
55058    printf "* ccache status:  $CCACHE_STATUS\n"
55059  fi
55060  printf "\n"
55061
55062  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
55063    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
55064    printf "will result in longer build times.\n"
55065    printf "\n"
55066  fi
55067
55068  if test "x$FOUND_ALT_VARIABLES" != "x"; then
55069    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55070    printf "These are not respected, and will be ignored. It is recommended\n"
55071    printf "that you clean your environment. The following variables are set:\n"
55072    printf "$FOUND_ALT_VARIABLES\n"
55073    printf "\n"
55074  fi
55075
55076  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55077    printf "WARNING: Your build output directory is not on a local disk.\n"
55078    printf "This will severely degrade build performance!\n"
55079    printf "It is recommended that you create an output directory on a local disk,\n"
55080    printf "and run the configure script again from that directory.\n"
55081    printf "\n"
55082  fi
55083
55084  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
55085    printf "WARNING: The result of this configuration has overridden an older\n"
55086    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55087    printf "proper build. Failure to do so might result in strange build problems.\n"
55088    printf "\n"
55089  fi
55090
55091  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
55092    printf "WARNING: The result of this configuration was not saved.\n"
55093    printf "You should run without '--no-create | -n' to create the configuration.\n"
55094    printf "\n"
55095  fi
55096
55097
55098
55099  # Locate config.log.
55100  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
55101    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
55102  elif test -e "./config.log"; then
55103    CONFIG_LOG_PATH="."
55104  fi
55105
55106  if test -e "$CONFIG_LOG_PATH/config.log"; then
55107    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55108    if test $? -eq 0; then
55109      printf "The following warnings were produced. Repeated here for convenience:\n"
55110      # We must quote sed expression (using []) to stop m4 from eating the [].
55111      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55112      printf "\n"
55113    fi
55114  fi
55115
55116